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

Method testSolidReferenceCombineFalse

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

Source from the content-addressed store, hash-verified

1587 self.saveModel(r)
1588
1589 def testSolidReferenceCombineFalse(self):
1590 s = Workplane(Plane.XY())
1591 r = s.rect(2.0, 2.0).extrude(0.5)
1592 # the result of course has 6 faces
1593 self.assertEqual(6, r.faces().size())
1594 # the original workplane does not, because it did not have a solid initially
1595 self.assertEqual(0, s.faces().size())
1596
1597 t = r.faces(">Z").workplane().rect(0.25, 0.25).extrude(0.5, False)
1598 # result has 6 faces, because it was not combined with the original
1599 self.assertEqual(6, t.faces().size())
1600 self.assertEqual(6, r.faces().size()) # original is unmodified as well
1601 # subsequent operations use that context solid afterwards
1602
1603 def testSimpleWorkplane(self):
1604 """

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected