Tutorial 22: Nested Polygon Mandala
Create a geometric mandala vase — concentric hexagons, each slightly rotated, creating an intricate star-like pattern when viewed from above. Use For Range with a named loop variable to control ring count, spacing, and rotation.

What you'll learn
- How to use the For Range block with a named loop variable
- How to reference the loop variable with Get Variable in expressions
- How to calculate radius and rotation from the loop index
- How For Range inside Stack Layers creates parametric patterns
Prerequisites
- Completion of Tutorial 11 (Grid Pattern) is recommended.
Step 1: Define variables
Step 1
Create five slider variables
Add five Set Variable blocks with Show in Viewport enabled:
- numRings =
4— number of concentric hexagons
Step 2: Center and add Stack Layers
Step 2
Add Translate and Stack Layers
Add Translate (center on bed). Inside the body, add Stack Layers with Start Z = Layer Height, End Z = wallHeight, Layer Height = Layer Height.
Step 3: Add For Range for concentric rings
For Range
Interactive preview is available in the interactive reader.
Step 3
Add For Range with variable 'ring'
Inside the Stack Layers body, add For Range with variable name ring, Start = 0, End = numRings, Step = 1. This iterates with ring = 0, 1, 2, 3 — one iteration per hexagon.
Step 4: Add Rotate driven by ring index
Step 4
Rotate each ring differently
Inside the For Range body, add Rotate with Angle = ring × rotateStep (Arithmetic × with Get Variable (ring) and Get Variable (rotateStep)). Ring 0 has no rotation, ring 1 rotates 15°, ring 2 rotates 30°, etc.
Step 5: Add Polygon with calculated radius
Polygon
Interactive preview is available in the interactive reader.
Step 5
Draw hexagon at calculated radius
Inside the Rotate body, add Polygon with Sides = 6. For Radius, build: innerRadius + ring × ringSpacing (Arithmetic + with Get Variable innerRadius, and Arithmetic × with Get Variable ring and Get Variable ringSpacing).
Complete block program
Full program — Tutorial 22
Interactive preview is available in the interactive reader.
Final block structure
| # | Block | Where | Values |
|---|---|---|---|
| 1–5 | Set Variable | Path Group | numRings=4, innerRadius=10, ringSpacing=8, rotateStep=15, wallHeight=30 |
| 6 | Translate | Path Group | X = bedsize_x/2, Y = bedsize_y/2 |
| 7 | ↳ Stack Layers | Inside Translate | Start Z, End Z, Layer Height |
| 8 | ↳ For Range | Inside Stack Layers | ring: 0 to numRings, step 1 |
| 9 | ↳ Rotate | Inside For Range | Angle = ring × rotateStep |
| 10 | ↳ Polygon | Inside Rotate | Sides=6, Radius = innerRadius + ring × ringSpacing |
Outcome
You should see 4 concentric hexagons — each larger and slightly rotated — forming a beautiful geometric mandala cross-section. Stacked into 3D, the overlapping hexagonal walls create an intricate lattice pattern.
Load this tutorial
Interactive preview is available in the interactive reader.
Interactive preview is available in the interactive reader.
What's Next
Tutorial 23: Name Plate — Use multiple Path Groups with TextLine to create a base plate with raised text — your first multi-part design.