Skip to content
Development version. Forge is under active development and testing. APIs, behaviour, coverage and verification results may be incomplete or change without notice; published PASS results are not a support guarantee or production-readiness claim.

Occurrence.attach

Create a rigid, planar or explicit native revolute relationship from this occurrence to another component.

Related guide

Signature

Occurrence.attach(self, target, *, parent=<Anchor.RIGHT: 'right'>, child=<Anchor.LEFT: 'left'>, offset=(0, 0), gap=0, angle=None, as_built=False, kind=None, value=None, limits=None, flip=False, name=None)

Use when

Placement should be expressed semantically between component references, including a bounded hinge/revolute axis, rather than as a calculated global XYZ pose.

Limits

Omit kind to retain automatic rigid/planar behavior. kind=“revolute” currently requires zero in-plane offset and accepts fixed finite degree value/limits. The target must be another component occurrence; AnchorFrame/AnchorTopology cover specific joint datums. as_built=True remains rigid-only.

Parameters

  • target — Parent component occurrence to attach to.
  • parent — Attachment reference on target. Defaults to Anchor.RIGHT.
  • child — Attachment reference on this occurrence. Defaults to Anchor.LEFT.
  • offset — In-plane (u, v) offset on the parent attachment plane, in mm. Defaults to (0, 0); revolute currently requires zero.
  • gap — Separation along the parent anchor normal, in mm. Defaults to 0.
  • angle — Optional joint-frame rotation in degrees.
  • as_built — When True, keep existing poses and create an as-built rigid joint.
  • kind — Optional explicit relationship kind. Currently supports “revolute”; omit for automatic rigid/planar behavior.
  • value — Initial revolute angle in degrees. Defaults to 0 when kind=“revolute”.
  • limits — Optional (minimum, maximum) revolute angular limits in degrees.
  • flip — Native joint-origin flip for a revolute relationship. Defaults to False.
  • name — Optional non-empty native joint name.

Example

moving = moving.attach(fixed, parent="hinge_axis", child="hinge_axis", kind="revolute", value=60, limits=(0, 180), name="Hinge")