October 4, 2024

3D Printing - OpenSCAD - How I use it

I have OpenSCAD (and Cura) installed on my Fedora 40 system.

I keep notes like this because I don't do this often enough to remember all the details (or any of them) from one time to the next.

All my past projects are in /u1/Projects/3dprinting/Projects, I also keep this directory under Git on my github page.

The key components in any of my projects is a ".scad" file and (as always) a Makefile that looks like this:

# Makefile for my helmet bracket

helmet.stl: helmet.scad
    openscad -o helmet.stl helmet.scad

SD = /run/media/tom/6331-3331/

copy:
    #cp helmet.gcode $(SD)
    cp CE3PRO_helmet.gcode $(SD)/helmet.gcode
    rm -f $(SD)/CE3PRO_helmet.gcode
This makefile does not show the steps for converting an .stl file into a .gcode file -- I use Cura interactively to do that.

Starting a new project

I make a new directory. Copy an old Makefile and xyz.scad file into it, and get busy remembering how to use OpenSCAD.

My last project was "helmet" and in that project I had a Readme.tjt with a lot of notes, particularly about how to run Cura.

To just run OpenSCAD interactively and use the viwer I type "openscad scope.scad" but I decided to put a "make run" entry into the Makefile.

Now I can type "make run &" so it runs in the background, and whenever I do a save from my editor, it redraws the object for me.

Using Cura

This is a weird and clumsy program, but it gets the job done. Two years ago (2022), the "cura" that shipped with Fedora had some bug and I installed cura by hand as "cura2", but now (in 2024) the Fedora package cura seems OK -- but I have to reconfigure my printer and all the settings.

I follow the checklist in the Readme.tjt file and end up with a gcode file on my SD card that I can take to the printer.

I clean the print surface off with alcohol, then go straight to "print from TF". I print another Accuwedge just to be sure everything is working. The block for the scope light will take 3 hours, even with 20 percent infill.

Cura settings

This always make me crazy. I set these once, only to have it reset them and then screw up a print by not doing what I told it to do.

To change print settings, you click on a thing up top that looks like 3 horizontal lines with circles along them. It usually says "Standard Quality-0.2mm" alongside. This opens up "print settings". Here is where you set 245 and 85 for the print temperature and plate temperature. (Actually 245/80 works fine and might be better). It is forever resetting this to 215/70 and making me angry. Then to make the darn pulldown menu go away you need to click the "X" in the upper right.

Now type "print from TF card" and watch like a hawk. You should see it first go to 120/85. It leaves the print head at 120 while it heats up the bed. Once the bed gets to 85 it should start heating up the print head to 245.

Now it seems to be printing nicely with PETG. With the 215/70 settings that it always tries to sneak in on you, I was getting no adhesion and a general disaster. I have my A/C running and the room temperature is 81 degrees. Outside it is 104 F.

I just took a look at the ".gcode" file. It is all ascii and it is plain enough to see the temperature settings, though you wouldn't know without the nice comments. So there is no need to "watch the print" start like a hawk, just inspect the gcode file and see if Cura is up to any tricks.

M104 S120 ; Start heating up the nozzle most of the way
M190 S85 ; Start heating the bed, wait until target temperature reached
M109 S245 ; Finish heating the nozzle

Cura takes forever to open an STL file

Cura is just a weird program. It worked just fine yesterday. Today I use "open file" and I have to wait a full minute before the object appears in the viewer. In the meantime there are a bunch of messages about USB printing checking every tty device in the book.

Well, patience gets it done, but why wasn't this happening yesterday? The only difference I think is that I plugged in my USB card reader in advance of starting Cura -- which used to be a good idea.


Have any comments? Questions? Drop me a line!

Adventures in Computing / [email protected]