Anchor
Author an element's local frame, its anchor origin and its orientation, from geometry.
What it does
Anchor reads an element's geometry and writes its local frame: the origin, the point that rotation and scale pivot around, and the orientation, its @orient quaternion. The origin can be a point on the bounding box, the centroid, the centre of mass, or a point wired in. The orientation can be left as-is, aimed at a target, aligned to the surface normal, or aligned to the longest axis of the shape.
Mode sets which way the frame is applied. Anchor to Geometry moves the anchor to the chosen point and counter-offsets the geometry so nothing shifts on screen, which is how a pivot is set up before a rotate or scale. Geometry to Anchor does the opposite: it shifts, and with an orientation rotates, the geometry so the chosen point lands on the current anchor. That is the align and justify path. Scope works Per Element, each shape or instance getting its own frame, or across the whole Collection as one combined frame.
When to use it
Rotating or scaling a shape around its centre, a corner or its base rather than the world origin: set Origin, Mode to Anchor to Geometry.
Instances prepped for a Stamp or Iterator, each with its pivot and facing direction authored consistently.
Aligning or justifying geometry to a point (corner-anchoring a panel, sitting an object on the ground, snapping edges together): Mode to Geometry to Anchor.
Elements facing a target point, or oriented along a curve's surface normal or their own long axis.
The anchor point itself as a value: wire the
anchor_pointoutput into a Transform's anchor input to set a pivot without moving anything.
| Parameter | Type | Default |
|---|---|---|
input | OneOf([Collection, FieldOf(Color), Field]) | — |
target | OneOf([Transform, Vec3, Vec2, Collection]) | — |
origin | String | "Bounding Box" |
pivot_x | Number | 0 |
pivot_y | Number | 0 |
pivot_z | Number | 0 |
orient | String | "Keep" |
mode | String | "Anchor to Geometry" |
scope | String | "Per Element" |
strength | Number | 1 |
Gotchas
The Pivot X/Y/Z sliders apply, and appear, only when Origin is Bounding Box. They are normalised -1..1 per axis, where -1 is the min edge, 0 the centre and +1 the max edge, not world units.
Scope = Per Element groups by @id, so each shape or instance in a Collection gets its own independent frame. Collection computes one combined frame for everything at once.
Anchor to Geometry is a visual no-op by design: the anchor is repositioned and the geometry counter-shifted in the same step, so the shape does not move and only its pivot changes. Use Geometry to Anchor to move the geometry itself.
Origin = Point and Orient = Aim at Target both read the target input. With nothing wired there, Point origin has nothing to anchor to and Aim at Target has nothing to aim at. Wire a Transform, position, or Collection into target first.
Worked example
Add Anchor and wire your geometry into it.
Set Origin to Bounding Box and adjust Pivot X/Y to move the pivot to a corner or edge, for example -1, -1 for the bottom-left.
Leave Mode on Anchor to Geometry so the shape stays put but now rotates and scales from that corner.
To align several shapes to a common point instead, wire a target and set Mode to Geometry to Anchor.
Wire the
anchor_pointoutput into a Transform's anchor input if the computed point is needed elsewhere in the graph.