Tutorial 16: Twisted Tray
Build a designer tray with rounded corners that twists gently from base to top — like a candy dish or jewelry holder from a high-end home goods store.

What you'll learn
- How to use the Rounded Rect block with configurable corner radius
- How to use For Z for manual layer-by-layer iteration
- How to combine Rotate with
normZfor a continuous twist - Why Travel Relative Z is needed after each layer in a For Z loop
Prerequisites
- Completion of Tutorial 5 (Twisted Prism) is recommended.
Step 1: Define variables
Set Variable
Interactive preview is available in the interactive reader.
Step 1
Create five slider variables
Add five Set Variable blocks with Show in Viewport enabled:
- trayWidth =
60— X dimension
Step 2: Center and add For Z
For Z
Interactive preview is available in the interactive reader.
Step 2
Add Translate and For Z
Add Translate (center on bed). Inside the body, add For Z with Z Start = Layer Height, Z End = trayHeight, Step = Layer Height.
Step 3: Add Rotate with height-driven angle
Rotate
Interactive preview is available in the interactive reader.
Step 3
Twist the shape as it rises
Inside the For Z body, add Rotate with Angle = normZ × twistAngle (Arithmetic × with Variable normZ and Get Variable twistAngle). At the bottom (normZ=0), no rotation. At the top (normZ=1), full twist.
Step 4: Add Rounded Rect
Rounded Rect
Interactive preview is available in the interactive reader.
Step 4
Draw the rounded rectangle
Inside the Rotate body, add Rounded Rect with Width = trayWidth, Height = trayDepth, Corner Radius = cornerRadius.
Step 5: Add Travel Z
Travel (Relative) Z
Interactive preview is available in the interactive reader.
Step 5
Move up after each layer
After the Rotate block (connected via next), add Travel Relative Z with Z = Layer Height. This lifts the nozzle to the next layer after drawing.
Complete block program
Full program — Tutorial 16
Interactive preview is available in the interactive reader.
Final block structure
| # | Block | Where | Values |
|---|---|---|---|
| 1–5 | Set Variable | Path Group | trayWidth=60, trayDepth=40, cornerRadius=8, trayHeight=20, twistAngle=25 |
| 6 | Translate | Path Group | X = bedsize_x/2, Y = bedsize_y/2 |
| 7 | ↳ For Z | Inside Translate | Start = LH, End = trayHeight, Step = LH |
| 8 | ↳ Rotate | Inside For Z | Angle = normZ × twistAngle |
| 9 | ↳ Rounded Rect | Inside Rotate | Width, Height, Corner Radius from variables |
| 10 | Travel Rel Z | After Rotate | Z = Layer Height |
Outcome
You should see a tray with smooth rounded corners that twists gradually from base to top. The twist creates an elegant, designer look that's impossible with traditional manufacturing.
Load this tutorial
Interactive preview is available in the interactive reader.
Interactive preview is available in the interactive reader.
What's Next
Tutorial 17: Temperature Tower — Build a real stepped temperature calibration tower using Floor and Set Temperature to print multiple zones at different temperatures.