March 21, 2026

3D Printing - how to do it

It has been almost a year since my last 3D printing project. My current project (i.e. this example) is to print a "dust cap" for the photo tube on my Olympus SZH10 stereo microscope.

The design should be simple, a cylinder with a cylinder inside removed -- for part of the length. I intend to use blue PETG (which is currently on my printer). I use PETG for everything and find no reason not to. It is stronger and has a higher melting point than PLA. I use Hatchbox filament and have never had a problem.

Cost

I'm putting this up front now that I am all done because it will get lost and forgotten down below. I weighed the final print and it is 17 grams. Hatchbox PETG costs me $26 for a 1000 gram spool. This works out to 44 cents for the print.

I mention this because I made a mistake in my openscad design and decided to fix it and print it again. I was curious about the cost of this decision.

Install software

I will need openscad and cura. I used to have both on my Fedora system, For the record, I am now running Fedora 43. but I did a full reinstall and now I need to install them again.
su
dnf -y install openscad
That takes care of openscad. It identifies itself as 2021.01
su
dnf -y install cura
Wow! This pulls in 160 additional packages, most of them are python packages of all manner and sort, but also qt6, and tex of all things.

Openscad

My previous projects are in the directory /Projects/3dprinting/Projects on my system. My last project was "scope", which was my microscope illuminator project. That project included a Makefile, as EVERY project ought to, no matter how simple. A Makefile is not just a tool, it is a documentation of the process used.

I create a directory for my new project:

cd /Projects/3dprinting/Projects
mkdir cap
cd cap
cp ../scope/Makefile .
cp ../tube/tube.scad test.scad
The "tube" project was a very simple shim for a microscope eyepiece. It is essentially a washer with the desired dimensions. I start with this and print another washer to check the inside diameter of the cap I want to print. I would like the dimension to be close but not tight, and I have found in the past that some trial and error is needed. I can run openscad as an interactive viewer using:
openscad test.scad
After some editing, I make the stl file via:
make test.stl

Now for Cura

Since we installed this fresh and new, we will have to do some configuring.

I launch it by typing "cura" at the command line. It identifies itself as RPM 5.4.0 and once it starts it tells me that Ultimaker Cura 5.12.0 is available.

It seems to have discovered my prior settings. It will use "standard quality 0.2mm" with 20 percent infill. It is set for Generic PETG with an 0.4mm nozzle, which looks familiar. I look at "Settings - Printer" and it shows me a Creality Ender-3 Pro. Evidently it is finding this in /home/tom/.config/cura, which is a nice help.

Typing "cura test.stl" does not work. You need to launch cura and then use "File -- Open Files" and then find test.stl in your filesystem.

Cura acts weird at this point. First I get two "rings". Now I have three. Apparently there are huge delays. There is all kinds of pointless chatter on the console about baud rates and serial devices. It takes nearly a full minute, but all the chatter eventually stops and I see my ring displayed along with the "Slice" button. Patience is the key apparently.

I click "Slice" and it tells me the print should take about 30 minutes. It offers a "save to disk" button, which I use. There is a better way, see below.

It saves to /u1/home/tom/CE3PRO_test.gcode which is not my home directory. This is clearly a Cura bug -- it should just use /home/tom and who knows how it found this orphaned home directory.

mv /u1/home/tom/CE3PRO_test.gcode .

Cura - round 2

My inside dimension is too tight, so I change the design and try again. This time I patiently wait for Cura to thrash around trying USB and serial connections. I slice and it now estimates 12 minutes.

I insert the SD card before starting Cura. In other words I put the SD card into the card reader, then plug it into my linux desktop, then start Cura. When I do this, after I slice, Cura offers to write to removeable media, and writes CE3PRO_test.gcode to my SD card directly.

Note that if you plug the card into the printer when it is on, you won't see anything in the "print from TF card" menu. You have to click the "change TF card" entry first.

Cura - round 3

I am now printing the actual cap. This will go for 2 hours. I am learning the Cura tricks. I remove the USBprinting plugin (notes on this elsewhere) and that gets rid of the 1 minute delay when I load an STL file. I also take care to have the SD card plugged in before I start Cura.

So OpenSCAD and the printer itself have given me no problems. Cura gave some small problems that I now have worked out.

Onto an SD card and off to the printer

I remove all the junk from in front of the printer, use a new paintbrush to dust it off, and clean the bed with 91 percent isopropyl alcohol.

I remove the SD card from the printer (it goes in upside down) and put it into a USB card reader. Linux mounts it as /run/media/tom/6331-3331/ as it always has.
I type "make copy", which does this:

cp CE3PRO_test.gcode /run/media/tom/6331-3331
The card now goes into the printer (upside down). I power on the printer and push the knob to get a menu. I pick "print from TF card", find test.gcode, and away we go.

It tells me "bed heating".
It first goes for 120-85 (head-bed).
Once it reaches that, itgoes for 245-85 (head-bed).
Then it starts printing!

Somewhat to my surprise, it all seems to work fine after sitting for almost a year. My notes tell me that I previously use 245-70 to print with PETG (i.e. a 70 degree bed rather than 85), but given that it is now using 85 and printing nicely, perhaps Cura is smarter than I am (or was).


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org