Skip to main content

Connector

Extends SceneObject

Inherited from SceneObject

name()​

name(value: string): this

Sets a custom display name for this object, overriding the default type-based name.

ParameterTypeDescription
valuestringThe display name to assign.

Methods​

rotate()​

rotate(axis: "x" | "y" | "z", angle: number): this

Rotate the connector frame around its own local X, Y, or Z axis, pivoting at its current origin.

ParameterTypeDescription
axis"x" | "y" | "z""x", "y", or "z" — the connector's local axis name.
anglenumberRotation in degrees.

offset()​

offset(x: number, y?: number, z?: number): this

Translate the connector origin along its own local axes: x · xDirection + y · yDirection + z · normal. Omitted y / z default to 0. Axes are unchanged.

ParameterTypeDescription
xnumber
ynumber(optional)
znumber(optional)

instance()​

instance(slot: number): Connector

Copy slot of this connector, made by the copy() statement that copies it: copy('circular', 'z', { count: 6, angle: 360 }, bolt) makes bolt.instance(1) … bolt.instance(5), and an assembly mates one as f.connectors.bolt.instance(3).

Slots are numbered like repeat().instance(k): a linear grid counts its cells with the first axis varying slowest, the original keeping its own cell (0, or the centre cell when centered); a circular copy counts rotation steps from the original at 0. A copy that follows a repeat — copy(holes, bolt) — takes the repeat's own slots, so bolt.instance(k) sits on holes.instance(k). The original's slot is the connector itself. A copy is the connector's frame moved by the pattern — it does not re-attach to geometry at its new place. A slot the copy skipped, a slot out of range, or a connector nothing copies throws.

Returns: Connector

ParameterTypeDescription
slotnumberThe pattern slot.