MCPcopy
hub / github.com/CadQuery/cadquery / testSolidReferencesCombineTrue

Method testSolidReferencesCombineTrue

tests/test_cadquery.py:1574–1587  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1572 self.assertEqual(6, c.faces().size()) # original is not modified
1573
1574 def testSolidReferencesCombineTrue(self):
1575 s = Workplane(Plane.XY())
1576 r = s.rect(2.0, 2.0).extrude(0.5)
1577 # the result of course has 6 faces
1578 self.assertEqual(6, r.faces().size())
1579 # the original workplane does not, because it did not have a solid initially
1580 self.assertEqual(0, s.faces().size())
1581
1582 t = r.faces(">Z").workplane().rect(0.25, 0.25).extrude(0.5, True)
1583 # of course the result has 11 faces
1584 self.assertEqual(11, t.faces().size())
1585 # r (being the parent) remains unmodified
1586 self.assertEqual(6, r.faces().size())
1587 self.saveModel(r)
1588
1589 def testSolidReferenceCombineFalse(self):
1590 s = Workplane(Plane.XY())

Callers

nothing calls this directly

Calls 8

rectMethod · 0.95
facesMethod · 0.95
saveModelMethod · 0.95
WorkplaneClass · 0.85
XYMethod · 0.80
extrudeMethod · 0.80
workplaneMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected