0%

Chapters

Hours read

Total Words

OpenSCAD is freely available open source software that enables nondesigners to easily create 3D designs using a text-based programming language. Itâ??s a great language for beginners because the instant 3D visualization gives you immediate feedback on the results of your code. This book channels OpenSCADâ??s visual benefits and user-friendliness into a STEAM-focused, project-based tutorial that teaches the basics of coding, 3D printing, and computational thinking while you develop your spatial reasoning by creating 3D designs with OpenSCAD.

Presuming no prior experience with either programming or 3D design, each chapter builds a scaffolded understanding of core concepts. Youâ??ll start by defining, drawing and displaying geometric primitives with text-based code, then expand your creative toolbox with transformation operations â?? like rotating, reflecting, scaling, and combining shapes.

As the projects become more sophisticated, so will your programming skills; youâ??ll use loops for replicating objects, if statements for differentiating your designs, and parameterized, self-contained modules to divide longer scripts into separate files. Along the way, you'll learn 3D printing tips so that you can produce physical mementos of your progress and get physical feedback that lets you correct mistakes in real time. In addition, the book provides hands-on and accessible design exercises at the end of each chapter so that you can practice applying new concepts immediately after they are introduced.

Youâ??ll learn:

â?¢Programming basics like working with variables, loops, conditional statements, and parameterized modules

â?¢Transformation operations, such as rotate, reflect, and scale, to create complex shapes

â?¢Extrusion techniques for turning 2D shapes into elaborate 3D designs

â?¢Computational-thinking concepts, including decomposition, abstraction, and pattern recognition

â?¢OpenSCADâ??s Boolean, Minkowski and hull operations for combining multiple 3D shapes into one

â?¢3D design fundamentals, like navigating the xyz-axis, orthogonal vs. perspective views, and constructive solid geometry

â?¢Organizing bigger designs into separate files to make code more readable and collaborative

Accessibly written for a wide audience (advanced middle schoolers, high school students, college students, artists, makers and lifelong-learners alike), this is the perfect guide to becoming proficient at programming in general and 3D modeling in particular.

- Title Page
- Copyright
- About the Authors
- Acknowledgments
- Introduction
- What Is OpenSCAD?
- Who This Book Is For
- Why Learn to Code with OpenSCAD?
- 3D Printing and OpenSCAD
- What’s in This Book
- Terminology and Conventions Used in This Book
- A Brief Introduction to 3D Design with OpenSCAD
- Understanding 3D Points
- Using the OpenSCAD 3D-View Toolbar
- Final Tips for Getting the Most Out of This Book

- Chapter 1: 3D Drawing with OpenSCAD
- Why Use OpenSCAD?
- Getting Started with OpenSCAD
- Drawing Basic 3D Shapes
- Drawing Cuboids with cube
- Drawing Spheres with sphere
- Drawing Cylinders and Cones with cylinder
- Importing 3D Models with import
- Modifying Basic Shapes
- Moving Shapes
- Smoothing Curves with $fn
- Combining 3D Shapes with Boolean Operations
- Subtracting Shapes with difference
- Carving Out Overlapping Shapes with intersection
- Grouping Shapes with union
- Getting Ready for 3D Printing
- Summary
- Design Time: 3D Shapes
- Big Projects: 3D Shapes

- Chapter 2: More Ways to Transform Shapes
- OpenSCAD Shape Transformations
- Rotating Shapes with rotate
- Reflecting Shapes with mirror
- Scaling Shapes with resize
- More Ways to Combine 3D Shapes
- Combining Shapes with hull
- Combining Shapes with minkowski
- Combining Transformations
- Summary
- Design Time: Transforming Shapes
- Big Projects: Transforming Shapes

- Chapter 3: 2D Shapes
- Drawing Basic 2D Shapes
- Drawing Circles with circle
- Drawing Rectangles with square
- Drawing Polygons with polygon
- Drawing Words with text
- Applying Transformation and Boolean Operations on 2D Shapes
- Extruding Shapes Vertically with linear_extrude
- Extruding Shapes Along a Circle with rotate_extrude
- Growing and Shrinking a Shape with offset
- Importing 2D Shapes with import
- Summary
- Design Time: 2D Shapes
- Big Projects: 2D Shapes

- Chapter 4: Using Loops and Variables
- Leaving Notes with Comments
- Writing Single-Line Comments with //
- Writing Multiline Comments with /* */
- Repeating Code with a for Loop
- Debugging for Loops with echo
- Using Variables and Arithmetic
- Naming Variables
- Applying Mathematical Operations on Variables
- Using Math and Variables Inside for Loops
- Using Arithmetic to Create Unique Patterns
- Using Nested Loops to Draw 2D and 3D Grids
- Generating the Windows in a Skyscraper with Nested Loops
- Triple Nesting to Create a 3D Grid of Shapes
- Summary
- Design Time: Loops and Variables
- Big Projects: Loops

- Chapter 5: Modules
- Chapter 6: Dynamic Designs with if Statements
- Using if Statements
- Defining Complex Conditions
- Choosing Boolean Operators
- Using Logical Operators to Combine Boolean Expressions
- Following an Expanded Order of Operations
- Making Two-Way Choices with if…else Statements
- Using Extended if Statements
- Using Nested if Statements
- Useful Applications of if Statements
- Setting Up a Design Mode and Print Mode
- Using Random Numbers as a Design Element
- Summary
- Design Time: if Statements
- Big Projects: Decisions

- Chapter 7: Designing Big Projects
- The Design Cycle
- Leaning Tower of Pisa Model
- Step 1: Investigate—Define Multiple Views
- Step 2: Plan—Apply Computational Thinking
- Step 3: Create—Use a Walking Skeleton Approach
- Step 4: Evaluate—Decide Which Design Process Steps to Repeat
- Walking Skeleton: Building the Leaning Tower of Pisa
- Iteration 1: Connecting the Tower’s Basic Building Blocks
- Iteration 2: Finding Repetition in the Middle Section
- Iteration 3: Adding More Details to the Middle Section
- Iteration 4: Adding Details to the Top Section
- Iteration 5: Adding Details to the Bottom Section
- Final Evaluation of the Design Cycle
- Design Organization Overview
- Summary

- Afterword
- Learn More About OpenSCAD
- The Open Source Ethos
- Motivation and Ecosystem
- Online Citizenship
- OpenSCAD and the Maker Movement
- Making and Creative Problem-Solving
- 2D Fabrication
- Physical Computing
- Makerspaces
- Final Ideas for More Practice
- Customizable Measuring Spoons
- Customizable Vacuum Tool
- Customizable Flowerpots
- Drawer Box
- Lab Clamps
- Chess Set
- Pegboard Wizard

- Appendix A: OpenSCAD Language Reference
- Appendix B: OpenSCAD Visual Reference
- Index