OpenSCAD Tutorial
Lesson 1 · Your First Shapes
Size a cube
An OpenSCAD model is a script. Each statement creates a shape and ends with a semicolon. The three basic 3D shapes are cube, sphere, and cylinder.
cube(10)makes a cube with all three sides 10.cube([20, 10, 5])is 20 wide (X), 10 deep (Y), and 5 tall (Z).- By default a cube sits with one corner at the origin.
OpenSCAD has no units. Treat one unit as one millimeter, which is what slicers assume when you print.
Common mistake: writing cube(20, 10, 5). A cube's size is one vector in square brackets; three loose numbers do not mean width, depth, and height.
Your task: change the cube so it is 20 wide, 10 deep, and 5 tall.
Loading the OpenSCAD editor…
Step 1 of 16