Create a unit box and mirror it so that it doubles in size
(self)
| 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""" |