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.extrude

Extrude selected profiles from a completed Sketch.

Related guide

Signature

Sketch.extrude(self, distance, *, sym=False, profiles=None, exact_regions=False)

Use when

Leave the Sketch context and create or cut material normal to the sketch plane. Use profiles= when the Sketch contains more closed regions than the extrusion should use.

Limits

A standalone Sketch requires a finite non-zero distance and may contain multiple supported closed profiles. Nested/ambiguous regions should be selected with profiles= plus exact_regions=True. Depth.THROUGH_ALL is only meaningful for a Sketch attached to an existing Shape and cannot be combined with sym=True. Profile pick points must be fixed finite numbers; Parameters and expressions are not accepted because SolidCraft profile points are numeric. Multi-profile support does not expand Sketch.revolve(), which still requires exactly one closed profile.

Parameters

  • distance — Extrusion distance in mm, or Depth.THROUGH_ALL for an attached Sketch. Positive finite distances follow the plane normal; negative reverses it. THROUGH_ALL cuts through the attached target from the selected support face.
  • sym — When True, split a positive distance equally across both sides of the sketch plane. Defaults to False.
  • profiles — Optional non-empty sequence of fixed sketch-local (x, y) points. Each point selects the closed profile containing it. Leave None to extrude every profile.
  • exact_regions — When True, each profile point selects exactly the SolidCraft region containing that point. Only valid together with profiles=. Defaults to False.

Example

with Sketch(name="Tube profile", plane="XY") as profile:
    Circle2D(d=10)
    Circle2D(d=8)
tube = profile.extrude(30, profiles=[(4.5, 0)], exact_regions=True)