OpenSCAD Vase (rotate_extrude) example
Profiles & patterns
Lesson 12 of 28
Revolve a closed wall cross-section around Z without crossing the axis.
Try changing:
stepheightbase_radiusneck_radiusrim_radiuswallaxis_gapMedium compile complexity. One rotational sweep; increasing $fn multiplies every profile edge.
Visual walkthrough: change step in the workspace Parameters panel to compile each construction stage.
How this model works
For rotate_extrude, profile X is the radius and profile Y becomes height. The polygon walks up the outside, returns down the inside, then closes across the bottom. All radii are nonnegative, and the inner profile stops above z = 0 to preserve a floor. Where the profile sits relative to the Z axis decides the result: an edge lying on X = 0 closes the center (here, the floor), a profile that stops short of the axis leaves a round opening of radius equal to the gap, and a profile with points on both sides of the axis is rejected. In this site's OpenSCAD engine, revolving the crossing profile fails with "all points for rotate_extrude() must have the same X coordinate sign" and reports the offending X range; nothing is exported. Wall thickness here is a radial difference, not a constant surface-normal offset. This decorative model is not validated as watertight or food-safe.
Place the profile beside the axis ·
ProfileShow the 2D wall cross-section standing in the XZ plane next to a thin rod that marks the Z axis. Profile X becomes radius, so the floor edge lies on the axis and every other point sits to its right.
Revolve the valid profile ·
RevolvedSweep the same polygon 360 degrees around Z. The axis edge closes the floor; raise axis_gap above zero to see that edge open into a hole instead.
Inspect a crossing profile ·
CrossingShift the same profile 8 mm left so part of it lies at negative X. This step only displays the flat profile: revolving it fails because rotate_extrude requires every point on one side of the axis.
Untitled project
main.scad
Loading draft
Ready
Z up · geometry preview
Your geometry will appear here
Preview or render the model to inspect it in 3D.
STL preview
Grid 10 units · Drag: orbit · Right-drag / two fingers: pan · Scroll / pinch: zoom
0 messages
Make it your own
Set axis_gap to 4 with step = Revolved: the floor now has an 8 mm diameter opening because its inner edge no longer touches the axis. Then reproduce the error yourself: in the editor, replace axis_gap in the two floor points with -4 and compile. Read the reported X range, then restore a value of zero or more. Finally, narrow the neck while keeping neck_radius greater than wall plus axis_gap, and identify which two segments form the floor.
Change one parameter at a time and inspect the result. Use the workspace reset action to return to this lesson’s original model.