(self)
| 4691 | assert obj.val().isValid() |
| 4692 | |
| 4693 | def testSection(self): |
| 4694 | |
| 4695 | box = Workplane("XY", origin=(1, 2, 3)).box(1, 1, 1) |
| 4696 | |
| 4697 | s1 = box.section() |
| 4698 | s2 = box.section(0.5) |
| 4699 | |
| 4700 | self.assertAlmostEqual(s1.faces().val().Area(), 1) |
| 4701 | self.assertAlmostEqual(s2.faces().val().Area(), 1) |
| 4702 | |
| 4703 | line = Workplane("XY").hLine(1) |
| 4704 | |
| 4705 | with self.assertRaises(ValueError): |
| 4706 | line.section() |
| 4707 | |
| 4708 | def testGlue(self): |
| 4709 |