OpenSCAD Tutorial

Lesson 6 · From Model to 3D Print

Customizer parameters

Preview (F5) is fast and meant for iterating. Render (F6) computes the final solid geometry, which is what gets exported to STL. The special variable $preview is true while previewing, so $fn = $preview ? 24 : 72; keeps previews quick and exports smooth.

Comments turn top-level variables into Customizer controls in the OpenSCAD Playground and desktop OpenSCAD: // [30:5:120] makes a slider from 30 to 120 in steps of 5, /* [Plate] */ starts a group, and variables after /* [Hidden] */ do not appear. An assert stops the model with a clear message if someone picks values that cannot be printed.

Your task: cut a mounting hole near each corner, inset from both edges. Use one loop over two lists: for (x = [inset, width - inset], y = [inset, depth - inset]).

Lesson 6 in under a minute
Loading the OpenSCAD editor…
Step 15 of 16