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.

Sketch.add

Add and place a supported 2D profile in this Sketch.

Related guide

Signature

Sketch.add(self, profile, *, anchor=None, offset=(0, 0))

Use when

Add a profile explicitly or apply a deliberate sketch-local offset. Dimension-defined profiles default to semantic CENTER. Polygon2D, Text2D and native Slot profiles keep their authored coordinates.

Limits

Explicit Anchor.CENTER is supported for Circle2D, Rectangle2D and RoundedRectangle2D. Polygon2D, Text2D and native Slot profiles define their own sketch-local coordinates; leave anchor=None for those profile types.

Parameters

  • profile — Supported 2D Shape such as Rectangle2D, Circle2D, Polygon2D or a Slot constructor result.
  • anchor — Optional profile datum. Dimension-defined profiles default to Anchor.CENTER; coordinate-defined profiles keep their own coordinates.
  • offset — Sketch-local (u, v) displacement in mm. Defaults to (0, 0).

Example

sketch.add(Circle2D(d=8), anchor=Anchor.CENTER, offset=(20, 0))