Documentation / Node reference / code nodes
code/SDFBend
Folds a position so that whatever reads it comes out wrapped onto a cylinder.
Sdf3d
Wraps a sampled position onto a cylinder of radius one over `rate`, so a primitive reading the folded point comes out curved. The shape runs along `axis` and curves toward the axis two steps on in X to Y to Z order. Wire this into a primitive's position input. The twin of geo/SDFBend, for use inside a geo/SDFBuilder sub-network.
It is the true arc bend, not the cheap shear: the plane through `center` lands exactly on the radius asked for and keeps its length along the arc. Left unlimited the whole space wraps and anything longer than a full turn laps itself; turn `limited` on and only the band between limitMin and limitMax bends, with the space continuing straight and tangent outside it.
Bending squeezes the material on the inside of the arc, so the field this fold feeds is a bound there rather than a distance and the builder steps its march down to suit it. How far down is worked out from `rate` and `thickness`.
Parameters
| Name | Type | What it does |
|---|---|---|
| axis | UInt8 X · Y · Z | Which world axis the shape runs along. It curves toward the axis two steps on in X to Y to Z order, so X curves toward Z, Y toward X and Z toward Y. |
| thickness | Float | How thick the bent shape is across the bend. It draws nothing: the builder's march reads half of it, with the rate, to work out how far it may trust a step. Too small and a tight bend on a thick shape can be stepped through. |
| limited | Bool | Bend only the band between limitMin and limitMax and leave the space straight outside it, instead of wrapping the whole of it. |
| P | Vector3 | Position to fold. Left unwired it reads the builder's own sample position. |
| center | Vector3 | The point of the straight shape that stays put. The cylinder's axis lands one radius from it, on the side the shape curves toward. |
| rate | Float | Curvature: one over the radius the shape wraps onto, so 0.5 wraps onto a radius of 2. The sign is which way it curves. |
| limitMin | Float | Where the bend starts, measured along the straight shape from `center`. Read only when limited is on. |
| limitMax | Float | Where the bend ends, measured along the straight shape from `center`. Read only when limited is on. |
See also
- geo/SDFBend
- code/SDFTwist
- code/SDFExtrude
- code/SDFBoolean
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.