Create a unit box and mirror it so that it doubles in size
(self)
| 154 | self.assertTupleAlmostEquals(p.yDir.toTuple(), yAxis_.toTuple(), 4) |
| 155 | |
| 156 | def test_mirror(self): |
| 157 | """Create a unit box and mirror it so that it doubles in size""" |
| 158 | b2 = Workplane().box(1, 1, 1) |
| 159 | b2 = b2.mirror("XY", (0, 0, 0.5), union=True) |
| 160 | bbBox = b2.findSolid().BoundingBox() |
| 161 | assert [bbBox.xlen, bbBox.ylen, bbBox.zlen] == [1.0, 1.0, 2] |
| 162 | self.assertAlmostEqual(b2.findSolid().Volume(), 2, 5) |
| 163 | |
| 164 | def test_all_planes(self): |
| 165 | b2 = Workplane().box(1, 1, 1) |