test that solid references are preserved correctly
(self)
| 1561 | self.assertAlmostEqual(1.5, d.edges().vertices().item(0).val().Z, 3) |
| 1562 | |
| 1563 | def testSolidReferencesCombine(self): |
| 1564 | "test that solid references are preserved correctly" |
| 1565 | c = CQ(makeUnitCube()) # the cube is the context solid |
| 1566 | self.assertEqual(6, c.faces().size()) # cube has six faces |
| 1567 | |
| 1568 | r = ( |
| 1569 | c.faces(">Z").workplane().circle(0.125).extrude(0.5, True) |
| 1570 | ) # make a boss, not updating the original |
| 1571 | self.assertEqual(8, r.faces().size()) # just the boss faces |
| 1572 | self.assertEqual(6, c.faces().size()) # original is not modified |
| 1573 | |
| 1574 | def testSolidReferencesCombineTrue(self): |
| 1575 | s = Workplane(Plane.XY()) |