3dSynth

Tutorials / SynthBlocks

Open in the interactive tutorials reader

Tutorial 5: Twisted Prism

In this tutorial you'll create a triangular prism that twists as it rises. You'll parameterise every dimension with Set Variable blocks, centre the print with Translate, and use Rotate with Map Range to smoothly twist the shape from bottom to top.

A triangular prism twisting 90 degrees

What you'll learn

Prerequisites


Step 1: Define your variables

We'll expose every dimension as a viewport slider so you can reshape the prism interactively.

Set Variable

Interactive preview is available in the interactive reader.

Step 1

Create four variables

Add four Set Variable blocks to the top of your Path Group:

  1. prismRadius = 25

Enable Show in viewport on each one.


Step 2: Centre on the build plate

Translate

Interactive preview is available in the interactive reader.

Step 2

Add a Translate block

Drag a Translate block below the Set Variable blocks.
Set X to Bed Size X / 2 and Y to Bed Size Y / 2.
All remaining blocks go inside the Translate body.


Step 3: Add the Spiral Up block

Spiral Up

Interactive preview is available in the interactive reader.

Step 3

Add Spiral Up

From the Z Strategy category, drag a Spiral Up block into the Translate body.
Set Start Z to Layer Height (the printer-setting block), End Z to the variable prismHeight, and Rotations to prismHeight / layer_height.

Using the Layer Height block instead of a magic number means the spiral resolution automatically matches your slicer settings.


Step 4: Add Rotation Logic

Before drawing the shape, we rotate the coordinate system so the polygon twists as it rises. The Rotate block rotates everything inside it around the Z axis.

Rotate

Interactive preview is available in the interactive reader.

Step 4

Add Rotate with Map Range

  1. Drag a Rotate block into the Spiral Up body.

This maps the 0–1 height progress into a 0–90° rotation range. At the bottom the polygon is unrotated; at the top it has twisted by the full twistAngle.


Step 5: Draw the Polygon

Now we draw the shape inside the rotated coordinate system.

Polygon

Interactive preview is available in the interactive reader.

Step 5

Add a Polygon

Drag a Polygon block into the Rotate body.
Set Sides to the variable sides and Radius to the variable prismRadius.


Complete block program

Full program — Tutorial 5

Interactive preview is available in the interactive reader.


Final block structure

#BlockWhereValues
1Set Variable prismRadiusPath Group25 · Show in viewport
2Set Variable prismHeightPath Group50 · Show in viewport
3Set Variable twistAnglePath Group90 · Show in viewport
4Set Variable sidesPath Group3 · Show in viewport
5TranslatePath GroupX = Bed Size X / 2, Y = Bed Size Y / 2
6Spiral UpInside TranslateStart Z = Layer Height, End Z = prismHeight, Rot = prismHeight / layer_height
7  ↳ RotateInside Spiral
8    ↳ Map RangeAngleIn 0–1, Out 0–twistAngle
9      ↳ VariableMap InputnormZ
10  ↳ PolygonInside RotateSides = sides, Radius = prismRadius

Outcome

You have created a fully parametric twisted prism! As the printer spirals upward, the triangle rotates smoothly from 0° to 90° over the full height. Drag the sliders to experiment with different shapes instantly.


Load this tutorial

Interactive preview is available in the interactive reader.

Interactive preview is available in the interactive reader.


What's Next

Tutorial 6: Sine Wave Vase — Use math functions to create organic ripples on a vase surface.