Programming with OpenSCAD

A Beginner's Guide to Coding 3D-Printable Objects

Easy to Learn

Immediately accesible and engaging, starts from the beginning with both programming and 3D Computer-Aided Design (CAD). Provides just the right sequence of topics so that you can build a foundation in the basics before moving on to more sophisticated concepts.

Coding for 3D Design

Learn to code by following along with the activites in the book. OpenSCAD is a descriptive, text-based programming language that uses a familiar syntax, if statements, for loops, variables, and arithmetic to combine simple geometric primitives into complex objects.

3D Printing

You don't need a 3D printer to fully engage with the activities in the book. However, every project, example, and activity is designed with 3D printing in mind! 3D printing tips are sprinkled throughout the book to help you get to know your 3D printer.


Combine elements of Science, Technology, Engineering, Art, and Math as you learn to code in an interdisciplinary context. The lessons and topics in this book teach transferable skills that can be applied in many different directions.

Instant Visual Feedback

Use the OpenSCAD editor to generate a Preview of each design with a single click, so you can immediately see results from your coding. Every example in the book is paired with a full-color picture to give you even more feedback on your progress.

Loaded with Example Exercises

Every chapter is loaded with examples, including a collection of smaller Design Time activities to point you in the right direction to immediately apply your new skills. A curated selection of progressively more challenging Big Projects helps you to evolve your design skills as you learn more about OpenSCAD and 3D design.

Topics include:

3D Shapes
  • - the OpenSCAD interface
  • - drawing and placing basic 3D shapes: cuboids, spheres, cylinders, and cones
  • - importing 3D shapes generated by other applications
  • - combining multiple shapes using difference, intersection, and union
  • - exporting an OpenSCAD design
More Ways to Transform Shapes
  • - rotating shapes
  • - adjusting the proportionality of shapes
  • - reflecting shapes
  • - wrapping a hull around two shapes
  • - using minkowski to spread the properties of one shape along the edges of another shape
2D Shapes
  • - building up a 3D form from its 2D shadow with linear_extrude and rotate_extude
  • - drawing and placing basic 2D shapes: circles, rectangles, and polygons
  • - drawing and placing text (including emoji)
  • - combining 2D shapes with difference, intersection, and union
  • - reflecting, resizing, and rotating 2D shapes
  • - using offset to shink or expand the outline of a 2D shape
Using Loops and Variables
  • - repeating shapes with variables and for loops
  • - varying the characteristics of a shape (such as its size, position, or rotation) as it’s repeatedly drawn by the loop
  • - using variable naming, comments, and console logging as useful tools for planning and debugging designs
  • - using nesting to repeat a loop
  • - decomposing a design into multiple modules
  • - creating your own shapes with OpenSCAD modules
  • - choosing parameters to control important characteristics of a new shapes
  • - techniques for using variables within modules so that updating designs is quick and easy
  • - using separate files to group modules into reusable (and shareable) libraries
Dynamic Designs with if Statements
  • - creating dynamic designs that change according to a certain condition
  • - describing complex conditions using Boolean and logical operators
  • - defining default conditions with else
  • - defining mutually exclusive conditions with extended if..else if..
  • - automating design configuration
  • - using random numbers to create fun, unpredictable design elements and add organic diversity to repeated elements
Designing Big Projects
  • - moving from a concept to a finished design
  • - evolving big, multifile projects with an iterative design process
  • - formally applying elements of computational thinking: decomposition, identifying patterns, algorithms, and abstraction
  • - managing complexity by developing big projects with a "walking skeleton" approach