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.mirror
Mirror a profile or earlier Sketch result over the sketch X or Y axis.
Signature
Sketch.mirror(self, source, *, axis)Use when
Create symmetric sketch geometry from a Circle, Slot, pattern result or earlier mirror result. The returned Sketch result contains the mirrored copies and may be used by a later supported Sketch operation.
Limits
The operation must be authored inside the active Sketch. Current native qualification covers attached Sketch(on=…) use. Only the sketch X and Y origin axes are supported. SolidCraft 0.42 stores the curves selected when the mirror is created. If an upstream pattern later creates extra curves after its count changes, those new curves are not added to that existing mirror automatically.
Parameters
source— A profile already in this Sketch, or a result returned by rectangular_pattern() or mirror() in the same Sketch.axis— Mirror axis. Use Axis.X, Axis.Y, “x” or “y”.
Example
with Sketch(name="Holes", on=board, parent=Anchor.TOP) as sketch:
circle = Circle2D(d=8)
sketch.mirror(circle, axis=Axis.Y)
with Sketch(name="Slots", on=board, parent=Anchor.TOP) as sketch:
slot = SlotCenterToCenter2D((0, 0), (20, 0), 8)
pair = sketch.rectangular_pattern(
slot, count=2, spacing=30, direction=Axis.X
)
sketch.mirror(pair, axis=Axis.X)