Getting Started with 3-D Printing: the Software

This column is the second of a two-part series on 3-D printing. In Part I, I discussed some of the overall concepts behind 3-D printing and gave an overview of some of the hardware choices that exist. In this article, I finish by explaining the different categories of software you use to interface with a 3-D printer, and I discuss some of the current community favorites in each category.

In part due to the open-source leanings of the 3-D printer community, a number of different software choices under Linux are available that you can use with the printer. Like with desktop environments or Web browsers, what software you use is in many cases a matter of personal preference. This is particularly true if your printer is from the RepRap family, because there's no "official" software bundle; instead, everyone in the community uses the software they feel works best for them at a particular time. The software is still, in some cases, in an early phase, so it pays to keep up on the latest and greatest features and newest releases. Instead of getting involved in a holy war over what software is best, I cover some of the more popular software choices and highlight what I currently use, which is based on a general consensus I've gathered from the RepRap community.

In part due to the rapid advancement in this software, and in part due to how new a lot of the software is, in most cases, you won't find any of this software packaged for your distribution. Installation then is a lot like what some of you might remember from the days before package managers like APT. Each program has its own library dependencies listed in its install documentation, and generally the software installs by extracting a tarball (which contains precompiled binaries) into some directory of your choice.

If you are new to 3-D printing, you might assume there's a single piece of software that you download and run, but it turns out that due to how the printers work, you need a few different types of software to manage the printer, including a user interface, a slicer and firmware. Each piece of software performs a specific role, and as you'll see, they all form a sort of logical progression.


The firmware is software that runs on electronics directly connected to your printer hardware. This firmware is responsible for controlling the stepper motors and heaters on the printer along with any other electronics, such as any mechanical or optical switches you use as endstops or even fans. The firmware receives instructions over the USB port in the form of G-code—a special language of machine instructions commonly used for CNC machines. The G-code will include instructions to move the printer to specific coordinates, extrude plastic and perform any other hardware functions the printer supports.

Often 3-D printer electronics are Arduino-based, and the firmware as a result is configured with the same software you might use to configure any other Arduino chip. Generally speaking though, you shouldn't have to dig too much into firmware code. There is just a single configuration header file you will need to edit, and only when you need to calibrate your printer. Calibration essentially boils down to telling your printer to do something, such as move 100 millimeters along one axis, measure what the printer actually did, then adjust the numerical settings in the firmware up or down based on the results. Beyond calibration, the firmware will allow you to control stepper motor speeds, acceleration, the size of your print bed and other limits on your printer hardware. Once you have the settings in the firmware calibrated and flash your firmware, you shouldn't need to dig around in the settings much anymore unless you make changes to your hardware.

If you use a MakerBot, your firmware selection is easy, as it has custom firmware. If you use a RepRap, the current most popular firmwares are Sprinter and Marlin. Both are compatible with the most common electronics you'll find on a RepRap, and each has extra features, such as heated build platform and SD card support. I currently use Marlin (Figure 1) as it is the default recommended firmware for my Printrbot's Printrboard. In my case, I needed to patch the default Arduino software so it had Teensylu support, and I needed to install the dfu-programmer command-line package (which happened to be packaged for Debian-based distros).

Figure 1. Marlin Configuration with Arduino Software


As I mentioned previously, the firmware accepts G-code as input and does the work of actually controlling the electronics. Generally speaking, when you print something out, you will need to convert some sort of 3-D diagram (usually an STL file) into this G-code though. The program that does this is known as a slicer, because it takes your 3-D diagram and slices it into individual layers of G-code that your printer can print.

Where the firmware settings are more concerned with stepper motors and acceleration settings, the slicer settings are more concerned with filament sizes and other settings you might want to tweak for each individual print. Other settings you control in the slicer include print layer heights, extruder and heated bed temperatures, print speeds, what fill percentage to use for solid parts, fan speeds and other settings that may change from object to object. For instance, you might choose small layer heights (like .1mm) and slower print speeds for a very precise print, but for a large bottle opener, you might have a larger layer height and faster print speeds. For parts that need to be more solid, you may pick a higher fill percentage; whereas with parts where rigidity doesn't matter as much, you may pick a lower fill percentage. When printing the same object with either PLA or ABS, you will want to change your extruder and heated bed temperatures to match your material.

The two main slicing programs for Linux are Skeinforge and Slic3r. Skeinforge is included with the ReplicatorG user interface software and has been around longer than Slic3r. Skeinforge is considered to be a reliable slicer, although slow; whereas Slic3r (Figure 2) is much faster than Skeinforge, but it's newer, so it may not be quite as reliable with all STL files, at least not yet.

Figure 2. Slic3r with the Default Print Settings Tab Open

Slic3r is what I personally use with my Printrbot, and the work flow more or less is like this: I select what I want to print, and depending on whether I feel it needs slower speeds, more cooling or a smaller layer height, I tweak those settings in Slic3r and save them. Then, I go to my user interface software to run Slic3r and print the object. I also may tweak the settings whenever I switch plastic filament, as different filaments need different extrusion temperatures and have slightly different thicknesses. Slic3r calculates just how much plastic to extrude based on your filament thickness, so even if your printer uses 3mm filament, you might discover the actual diameter is 2.85mm. Slic3r also can create multiples of a particular item or scale an item up or down in size via its settings.

User Interface

At the highest level is a program that acts as a user interface for the printer. This software communicates with the printer over a serial interface (although most printers connect to the computer over a USB cable) and provides either a command-line or graphical interface you can use to move the printer along its axes and home it, control the temperature for extrusion or a heated bed (if you have one, it can be handy to help the first layer of the print stick to the print bed) and send G-code files to the printer.

The two most popular graphical user interfaces are ReplicatorG and Pronterface (part of the Printrun suite of software). ReplicatorG has been around longer, but Pronterface seems more popular today with the RepRap community. Generally, the user interface doesn't slice STL files itself but instead hands that off to another program. For instance, ReplicatorG uses Skeinforge as its slicer, and Pronterface defaults to Skeinforge but can also use Slic3r. Once the slicer generates the G-code, the user interface then sends that G-code to the printer and monitors its progress. In my case, I use Pronterface set to use Slic3r.

In Figure 3, you can see an example of Pronterface's GUI. On the left side of the window is a set of controls I can use to control my printer manually, so I can move it around each axis, extrude filament and manually set temperature settings. In the middle of the screen is a preview grid where I can see the object I've loaded, and during a print, I can see a particular slice. On the right side is an output section that tells me how much filament a print will use, approximately how long it might take to print and a place where I can send manual G-code commands. Finally, along the bottom is an area that displays the current status of a print, including my temperature settings and how far along it is in the print job.

Figure 3. Pronterface's GUI

I generally make my print job settings in Slic3r, save them, then go to Pronterface where I will load an STL file I want to print. Pronterface then calls Slic3r behind the scenes to generate the G-code. Once the file has been sliced, I click on the Print button, which sends the G-code to the printer. The G-code includes initial instructions to heat up the extruder and heated bed to a certain temperature before homing the printer and then starting the print. Then as the print starts, I just use Pronterface to keep an eye on the progress.

Although I expect you'll still need to do plenty of experimentation and research to choose a 3-D printer and use it effectively, after reading these articles, you should have a better idea of what 3-D printers and software are available and whether it is something you want to pursue. Like with Linux distributions, there really isn't a right 3-D printer and software suite for everyone, but hopefully, you should be able to find a combination of hardware and software that fits your needs and tastes.

Kyle Rankin is a Tech Editor and columnist at Linux Journal and the Chief Security Officer at Purism. He is the author of Linux Hardening in Hostile Networks, DevOps Troubleshooting, The Official Ubuntu Server Book, Knoppix Hacks, Knoppix Pocket Reference, Linux Multimedia Hacks and Ubuntu Hacks, and also a contributor to a number of other O'Reilly books. Rankin speaks frequently on security and open-source software including at BsidesLV, O'Reilly Security Conference, OSCON, SCALE, CactusCon, Linux World Expo and Penguicon. You can follow him at @kylerankin.

Load Disqus comments