There are a lot of tools and applications connected to 3D printing available to Fedora users. In this article, I’ll guide you through one possible scenario of creating a 3D physical object: from an idea to a real thing.

My friend asked me few days ago to 3D print something for him. He said his kitchen tap is too low for him and that it obstructs him when washing dishes. He would like to move it up a bit using a circular tube with this profile (numbers are in millimeters):

Creating a digital 3D model

Already knowing how the object is shaped and sized, it might still be a hard task for someone with zero CAD or 3D modeler experience to create the model. Me being a programmer I like a modeler called OpenSCAD (you can get it in Fedora via the Software application, or using the command line with

sudo dnf install openscad

).

In OpenSCAD, instead of drawing object with your mouse, you code them. I will not try to explain the entire syntax in this article (you can find it in the manual), I’ll just explain the code for the thing we want to make.

difference() { cylinder(r=25,h=35); translate([0,0,-5]) cylinder(r=15,h=40); translate([0,0,30]) cylinder(r=22.5,h=10); } $fn=200;

This code takes a cylinder (with radius 25 and height 35) and subtracts two smaller cylinders moved a bit along the Z axis. The last line only makes the object a bit smoother than the default is. With the code entered in OpenSCAD’s code editor on the left, I use Design → Render from the menu to render the 3D model. Then I use File → Export → Export as STL… to save the model in a file format commonly used for 3D printing.

Now when the STL file is ready, I can view it in various other tools, such as MeshLab (

meshlab

package) or ADMeshGUI (available from a Copr repository).

Note: OpenSCAD, as well as STL file format, uses no units. In the 3D printing area, the numbers used are usually considered millimeters, although you might find some files online using some non-standard units such as inches.

Slicing to layers

For the object to be printed it has to be sliced to layers and paths for the 3D printer’s nozzle. There are various apps available in Fedora capable of doing it, one of the most famous tools for this is Slic3r (package

slic3r

, newer version available from Copr).

For right result, it is crucial to have the correct slicer settings for your printer and material. You should obtain those from the whoever you’ve obtained your 3D printer (or just create your settings if you have built one yourself). When you select the right settings, just click Export G-code… to generate file with instructions for the printer.

The G-Code file is just a plain text with loads of numerical control commands. Here is a snip:

G21 ; set units to millimeters M107 M190 S60 ; wait for bed temperature to be reached M109 S195 G28 ; home all axes G92 E0 ;reset extruder G90 ; use absolute coordinates M83 ; use relative distances for extrusion G1 F1800.000 E-1.00000 G1 Z0.300 F7800.000 G1 X77.706 Y77.667 F7800.000 G1 E1.00000 F1800.000 G1 X78.476 Y76.924 E0.07695 F1800.000 G1 X79.209 Y76.261 E0.07110 G1 X79.963 Y75.622 E0.07108 G1 X80.743 Y75.000 E0.07179 G1 X81.533 Y74.412 E0.07080 G1 X82.348 Y73.843 E0.07150 G1 X83.178 Y73.301 E0.07131 G1 X84.025 Y72.786 E0.07133 G1 X84.891 Y72.296 E0.07151 G1 X85.766 Y71.836 E0.07110 G1 X86.655 Y71.404 E0.07115 G1 X87.562 Y70.998 E0.07148 ...

Printing

With the gcode file, all that’s left to do is to feed those numerical control commands to the 3D printer. Some printers might have the ability to print from an SD card, others have to be connected by an USB cable during the entire print. To control you printer from Fedora, you might use Pronterface tool from Printrun (install the

pronterface

or

printrun

package). To communicate with the printer, you’re user has to be in the

dialout

group.

Once Pronterface is connected, user can load the G-code file and start the print. When you are currently printing, be sure not to accidentally suspend your computer by closing the lid.

And finally, after some time, the real thing is ready, using only free software available in Fedora and open hardware. This article was not supposed to teach you everything about the tools presented here, nor list all the tools available in Fedora. However, you now might have the idea about how it works.