September 24, 2022

3D Printing - OpenSCAD

I am taking a look at this after getting frustrated by my first attempts to use FreeCAD. So far I am delighted, but I am a veteran programmer, so this is a world where I am very comfortable.
OpenSCAD is a script-only based modeller that uses its own description language; parts can be previewed, but cannot be interactively selected or modified by mouse in the 3D view.
I installed it easily on my Fedora system via "dnf -y install openscad".

The following two Linux Journal articles from 2019 provide a nice introduction with a concrete example:

I am very pleased with this excellent tutorial, one of the best you will find anywhere on any topic:

The second tutorial also looks very good, but I have not yet spent any time with it.

To output an STL file, you type F6 to render, then export to STL. I get a nice clean ascii STL file. Not only that it plays a nice musical sound when it does the render. So far so good.

units

OpenSCAD is unitless, but it behooves me to work in millimeters if I want Cura to properly handle the STL file I generate. Using OpenSCAD variables allows me to specify key values in inches and scale them by multiplying by 25.4 and this is working well for me.

Is union superfluous?

It is not. Here is why. You can just generate two objects A and B, but what you have then is a geometry set with 2 elements in it. If you apply union to that set to end up with a single object. In many cases this does not matter, but it is important to understand. Sometimes you need a single object to pass to something else.

Ghostcad

Someone got the bright idea of blending OpenSCAD and the Go language: I have not played with this yet.
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org