6 Dynamic Designs with if Statements

In this chapter, you’ll learn how to use if statements to create OpenSCAD designs that respond differently to a variety of conditions. This powerful programming tool gives your designs the power to choose from several options and execute only certain lines of code. As a result, you can create dynamic designs that adapt to changing circumstances. For instance, you can use if statements to reconfigure a design quickly for 3D printing.

As an example project, here you will learn to use if statements to vary the length of tick marks on a ruler to indicate inch, half-inch, and quarter-inch increments depending ...

Get Programming with OpenSCAD now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.