I wrote recently about the excitement surrounding Clifford Wolf’s OpenSCAD program. OpenSCAD is free software. It uses a cool keep-it-super-simple approach to 3D modeling, eliminating the resource-hungry what-you-see-is-what-you-get (WYSIWYG) editing environment favored by most 3D modeling packages, and replacing it with a text-based scripting environment in which models are programmed, instead of sculpted. Basically, you write a script describing your model’s shape and then compile it to produce the actual model, which is then rendered onscreen and can be exported to STL format for 3D printing or other purposes.
OpenSCAD has two powerful features to facilitate this programming process. The first is support for so-called “constructive solid geometry” (CSG) modeling, in which complex forms are built up as intersections, unions, and differences of simple primary shapes like boxes, cylinders, cones, and ellipsoids. If you’ve ever used the ray-tracing program POV-Ray before, this idea will be familiar to you.
The second, less-well-publicized (but perhaps equally powerful) feature of OpenSCAD is “DXF extrusion,” in which OpenSCAD will import a 2D drawing in AutoCAD’s popular drawing exchange format (DXF) and “extrude” it into the third dimension. OpenSCAD has support for linear extrusion, in which the resulting part has straight vertical sides, and also rotating extrusion, which results in a part with helical sides. Since a large number of models for rapid prototyping are simple extruded profiles, I expect this feature to see a lot of use.
In this tutorial, I’m going to show you how to use OpenSCAD to produce a simple 3D model by extruding a part profile produced in normal drawing software. I use Adobe Illustrator CS3 because I have access to it and am familiar with its interface, but the popular open source drawing program InkScape will read and write DXF files natively, and there’s no reason why it couldn’t serve just as well if you prefer it. There are a number of other free and low-cost programs that will export DXF files. OpenSCAD’s developer mentions QCAD, which, as of this writing, is available from its developer RibbonSoft for €24.
The part I’m making is one of 12 solid pentomino puzzle pieces based on the animals of the Chinese zodiac–in this case, the rabbit or “Z” pentomino. The designs are based on those of Japanese schoolteacher Sabu Oguro as published on p. 40 of Jerry Slocum and Jack Botermans’ 1986 book Puzzles Old & New: How to Make and Solve Them, an image from which is reproduced at the top of this article. My original DXF files and the extruded 3D STL files are freely available for download at Thingiverse. Becky Stern printed all the real-world models shown in this article on her MakerBot Cupcake 3D printer, and photographed them for this tutorial.