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
Create an explicit named 2D sketch scope.
Signature
Sketch(*, name='Profile', on=None, parent=<Anchor.TOP: 'top'>, plane=None, origin=None, offset=None, rotation=None)Use when
Author one or more 2D profiles before creating a 3D extrusion. A Sketch may be standalone on XY/XZ/YZ or supported by an existing Shape.
Limits
Sketch(on=target) selects the body modified by the later extrusion. With the default parent=Anchor.TOP, Forge selects the largest +Z planar face at replay time. An explicit plane/origin bypasses face lookup. BOTTOM/CENTER relative placement still requires supported base metadata. offset remains a standalone-plane option. Leave the with-scope before extruding.
Parameters
name— Native sketch name. Defaults to “Profile”.on— Optional existing Shape whose surface supports the sketch.parent— Anchor selecting the supporting surface when on= is used. Defaults to Anchor.TOP.plane— Explicit sketch plane: “XY”, “XZ” or “YZ”. Defaults to “XY” when on= is not used. With on=, an explicit plane is world-based while on= still selects the body modified by the extrusion.origin— Optional explicit 3D origin for an explicit plane, in mm. May be used with on= when the Sketch should modify an existing body from a fixed world plane.offset— Optional signed offset from a standalone origin plane, in mm.rotation— Optional fixed (x, y, z) rotation in degrees for an explicit world-frame Sketch. Rotations are applied X, then Y, then Z.
Example
with Sketch(name="Base", plane="XY") as sketch:
Rectangle2D(80, 50)