Adaptive Layers
Stack a closed Path across N layers at a non-uniform Z spacing driven by a scalar field. Big layers where the field is low, thin layers where it's high (or vice versa) — a quick way to add detail where it matters without slowing down the whole print.
Node
Interactive preview is available in the interactive reader.
Sockets
path (in)- Path. Required — ≥2 vertices.
field (in)- PointArray. Optional. When connected, drives per-layer heights; without it, every layer has minH.
layers (in)- Int. Optional layer-count override.
zStart (in)- Float. Optional override.
toolpath (out)- Toolpath — N stacked extrusion segments at variable Z.
Parameters
Layers- Total number of layers. Default: 40.
Min layer H (mm)- Smallest permitted layer height. Default: 0.1. Reached where the field is at its minimum.
Max layer H (mm)- Largest permitted layer height. Default: 0.3. Reached where the field is at its maximum.
Z Start (mm)- Z of the first layer. Default: 0.2.
How It Works
The field's x-channel is sampled across u ∈ [0, 1] (one sample per layer). The range is auto-normalised so no prior gain wiring is needed, then:
h[l] = mix(minH, maxH, (field[u] − fMin) / (fMax − fMin))
z[l+1] = z[l] + h[l]
If no field is connected, every layer height degrades to minH — effectively a thinner Layer Stacker.