MCPcopy
hub / github.com/CadQuery/cadquery / test_mirror_axis

Method test_mirror_axis

tests/test_workplanes.py:178–184  ·  view source on GitHub ↗

Create a unit box and mirror it so that it doubles in size

(self)

Source from the content-addressed store, hash-verified

176 self.assertTrue("Face required, got" in str(context.exception))
177
178 def test_mirror_axis(self):
179 """Create a unit box and mirror it so that it doubles in size"""
180 b2 = Workplane().box(1, 1, 1)
181 b2 = b2.mirror((0, 0, 1), (0, 0, 0.5), union=True)
182 bbBox = b2.findSolid().BoundingBox()
183 assert [bbBox.xlen, bbBox.ylen, bbBox.zlen] == [1.0, 1.0, 2]
184 self.assertAlmostEqual(b2.findSolid().Volume(), 2, 5)
185
186 def test_mirror_workplane(self):
187 """Create a unit box and mirror it so that it doubles in size"""

Callers

nothing calls this directly

Calls 6

WorkplaneClass · 0.85
boxMethod · 0.80
findSolidMethod · 0.80
VolumeMethod · 0.80
mirrorMethod · 0.45
BoundingBoxMethod · 0.45

Tested by

no test coverage detected