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.

Shape.fold

Fold existing sheet material along one straight line.

Related guide

Signature

Shape.fold(self, *, line, angle=90, fixed=None, position='centerline', flip=False)

Use when

Bend material that already exists in a sheet blank. Dimensions and bend allowance come from the sheet’s shared rule. Prefer an authored Sketch line when the bend line must follow later parameter edits.

Limits

One straight fold line is supported. Fixed-point input remains numeric-only; associative input must be one Sketch.line(…) result.

Parameters

  • line — Either two fixed XY/XYZ points or the Shape returned by Sketch.line(…). The Sketch-line form preserves native associativity when its endpoints use Parameters/Expressions.
  • angle — Bend angle in degrees. Defaults to 90.
  • fixed — Optional XYZ point on the side that must stay fixed.
  • position — Native bend-line position: “centerline”, “start”, “end” or “mould”. Defaults to “centerline”.
  • flip — Fold to the opposite side when True. Defaults to False.

Example

with Sketch(name="Fold line", plane="XY") as fold_sketch:
    fold_line = fold_sketch.line(
        start=(20, -(depth / 2)),
        end=(20, depth / 2),
    )
sheet.fold(
    line=fold_line,
    angle=90,
    fixed=(-20, 0, 0),
)