Variable
Reads a context variable that changes during toolpath generation. These are the building blocks for height-aware, position-aware, and layer-aware designs.
Block
Interactive preview is available in the interactive reader.
Available Variables
z- Current absolute Z height in mm. Ranges from start Z to end Z.
normZ- Normalized height: 0 at the bottom, 1 at the top. Most commonly used variable.
layerIndex- Current layer number: 0, 1, 2, 3... Available inside For Z and Stack Layers.
t- Position along the current path segment: 0 at the start, 1 at the end.
s- Cumulative path distance traveled in mm.
normS- Normalized cumulative path distance: 0 at the start, 1 at the end of the full path.
How it works
Variable blocks output a number that changes based on the current point being generated. Connect them to Map Range, Sin, or directly to block inputs to create designs that vary with height, position, or layer.
Most useful combinations
| Pattern | Blocks | Result |
|---|---|---|
| Taper | Variable (normZ) → Map Range → radius | Radius changes with height |
| Waves | Variable (normZ) → multiply → Sin → Map Range | Wavy surface |
| Per-layer speed | Variable (normZ) → Map Range → Set Speed | Speed gradient |