4 Using Loops and Variables
Starting with this chapter, you’ll learn ways to use OpenSCAD to work smarter, not harder. First, you’ll learn to use a very useful programming tool called a loop. Loops let you draw many similar shapes with only a few lines of code.
This is particularly useful when your designs have repeated features. For instance, if you’re creating a model of the Empire State Building, typing one individual statement for each window in the building would consume a lot of time. With a loop, you can repeat a single window along a fixed pattern so OpenSCAD can take care of the tedious work of copying and pasting the same window ...
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.