solid.Shape

Methods

Method Reference: solid.Shape.mirror

solid.Shape: S = mirror (S, N)

solid.Shape: S = mirror (S, N, P)

Reflect a shape in a plane.

The plane passes through the point P, the origin by default, with the nonzero 3-element normal N. mirror (S, [1, 0, 0]) reflects in the yz plane. A reflection turns a right-handed part into its left-handed twin; the result is a valid solid of the same volume.

The solids keep their colours.

 
 ## An L-shaped bracket and its mirror image, joined into one part
 L = union (solid.box (30, 10, 5), solid.box (5, 10, 20));
 S = union (L, mirror (L, [1, 0, 0]));
 bbox (S)
 ⇒ -30   0   0   30   10   20

See also: solid.Shape.translate, solid.Shape.rotate, solid.Shape.scale

Source Code: solid.Shape