OpenSCAD Tutorial

Lesson 2 · Moving, Rotating, and Scaling

Turn a shape with rotate

rotate([x, y, z]) turns a shape by the given number of degrees around each axis. rotate([0, 0, 45]) turns it 45° around the vertical Z axis; rotate([0, 90, 0]) turns it 90° around Y, which tips an upright shape onto its side.

A cylinder always starts standing up along Z. To make a rod or an axle, build it upright and then rotate it.

Your task: lay the cylinder on its side so it points along the X axis, using rotate([0, 90, 0]).

Loading the OpenSCAD editor…
Step 5 of 16