I’ve been getting into 3D printing, and until recently, I was using SketchUp to create all of the models for my 3D prints. However, whenever I needed to do anything even mildly involved, like align the center of a sphere with the center of the top of a cylinder (or even create a sphere in the first place), I found the limitations of visual modeling frustrating. I thought to myself, “Why can’t I just write a program or use something like SVG to describe the model I want?”
Of course, a solution already existed: OpenSCAD. OpenSCAD is a free and open-source scripted modeling program for solid CAD objects — instead of drawing the shapes you want, you write a program that describes them. Switching to it from SketchUp has been like being able to stretch my legs after a long cramped airplane flight. Consider my latest print:
It’s a replacement tray for this card shuffler I bought for $0.25 at a garage sale a decade ago:
It only required 33 lines of code. The total time I spent starting from when I created the file in OpenSCAD to when I exported it as an STL file was twenty-two minutes, and that included pausing to feed my one-year-old daughter some mashed bananas. To design the same model in SketchUp would have taken at least an hour without the bananas. (Here’s the OpenSCAD file with some additional comments and newlines.)
So if you’re a programmer that would like to create 3D models but you find visual CAD limiting or frustrating, consider OpenSCAD.