Skip to content

Technical Modeling with OpenSCAD by Tam Hanna [Book review]

Designing models for 3-D printing is a decidedly creative task. Common wisdom tells us that programmers and other engineering folk do not tend to excel at it. The recently updated OpenSCAD provides a nice alternative.

In principle, OpenSCAD could not be simpler. It provides you with an editor surface and rendering engine. Code is then written in a C like language, which the rendering engine transforms into an STL file. Let's start out with the following snippet:

difference()
{
cube(20);
translate([10,0,10]) cube(10);

}

One can clearly see that the language is not particularly complicated, with each statement either being made up of a block with {} or being terminated with a semicolon. When rendered, the result looks as in the figure.

Technical Modeling with OpenSCAD by Tam Hanna [Book review]

This machinists cube just scratches the surface of the possibilities. Given that the three dimensional object is described in code, it can be parametrized to create different versions of the same shape effortlessly. This parametrization can be done by non-technical persons. It, incidentally, is at the heart of the ThingiVerse customizer shown in the figure.

Technical Modeling with OpenSCAD by Tam Hanna [Book review]

OpenSCAD is ideally suited to engineering related parts. The product comes with a wide library providing interoperability with legal toys, various metric screws and even stepper motors based on the NEMA standard. Additionally, your own geometry can be packaged into modules, which can then be reused effortlessly.

Let's demonstrate this capability by creating a cube which then accepts a metric screw, a hexagonal nut and a bolt. The relevant code looks like this:

$fn=64;
use <MCAD/nuts_and_bolts.scad>
difference(){
difference()
{
translate([0,0,7.5])
cube(30, center=true);
boltHole(8, units="MM", length= 30);
}

```translate([0,0,16.5])```
```nutHole(8, units="MM", tolerance = +0.0001, proj = -1);```

}

Technical Modeling with OpenSCAD by Tam Hanna [Book review]

Technical Modeling with OpenSCAD by Tam Hanna [Book review]

When rendered, the object can be printed and accepts the screw. Our print was made on a RenkForce RF100 printer, and turned out surprisingly well.
With its development originally supported by a think tank close to the Austrian government, OpenSCAD is available for all major desktop operating systems. A Python interface furthermore lets you integrate the product into complex workflows.

Finally, let us mention that the OpenSCAD language is extremely stable. The recently-introduced upgrade of the rendering engine brought improvements, but did not affect previously created models – downward compatibility has been consistently excellent for the last five to six years of development.

While OpenSCAD is a very accessible software, learning its intricate details can be troublesome. Elektor provides a book called Technical Modeling with OpenSCAD, which is intended for programmers and electrical engineers wanting to learn more about OpenSCAD quickly. It uses practical examples from real estate renovation and various consulting projects in order to show the programming language in action.

AMAZON LINK
https://www.amazon.com/Technical-Modeling-OpenSCAD-Tam-Hanna/dp/1907920994

Similar articles

How to Bring Your Crafting Hobby to The Next Level

Crafting is a beloved hobby for many reasons. Not only is the process of creating something with your hands soothing and captivating, but when you’re done, you have something lovely to show for your time. Crafting can be the perfect individual activity or a lovely project shared with your friends or family. The following will explore things that you can incorporate into your crafting hobby to take things to the next level.

Read more