| 4675 | self.assertAlmostEqual(bb.zlen, h, 1) |
| 4676 | |
| 4677 | def testUnionCompound(self): |
| 4678 | |
| 4679 | box1 = Workplane("XY").box(10, 20, 30) |
| 4680 | box2 = Workplane("YZ").box(10, 20, 30) |
| 4681 | shape_to_cut = Workplane("XY").box(15, 15, 15).translate((8, 8, 8)) |
| 4682 | |
| 4683 | list_of_shapes = [] |
| 4684 | for o in box1.all(): |
| 4685 | list_of_shapes.extend(o.vals()) |
| 4686 | for o in box2.all(): |
| 4687 | list_of_shapes.extend(o.vals()) |
| 4688 | |
| 4689 | obj = Workplane("XY").newObject(list_of_shapes).cut(shape_to_cut) |
| 4690 | |
| 4691 | assert obj.val().isValid() |
| 4692 | |
| 4693 | def testSection(self): |
| 4694 | |