cadquery
Sketch
Workplane
Assembly

Workplane.mirrorY()

The mirrorY() method is used in CadQuery to create a mirror copy of an existing solid or shape around the Y-axis.

Syntax

mirrorY()

Parameters

This method does not have any parameters.

Returns

This method returns a new solid or shape that is a mirror copy of the original, with all coordinates reflected across the Y-axis.

Example

# Import the cadquery module
import cadquery as cq

# Create a box
box = cq.Workplane().box(3, 3, 3)

# Mirror the box around the Y-axis
mirror_box = box.mirrorY()

# Display the original box and the mirrored box
show_object(box)
show_object(mirror_box)

This will create a box and then create a mirror copy of the box that is reflected across the Y-axis, and display them both.

Notes

  • This method does not modify the original object, but returns a new object.
  • If the object being mirrored is not symmetric around the Y-axis, the resulting mirror copy may not be a valid solid or shape.
  • The mirrorY() method can be combined with other methods, such as translate(), rotate(), and mirrorX() to create more complex shapes and solids.