MCPcopy Index your code
hub / github.com/CadQuery/cadquery / testSolidReferencesCombine

Method testSolidReferencesCombine

tests/test_cadquery.py:1563–1572  ·  view source on GitHub ↗

test that solid references are preserved correctly

(self)

Source from the content-addressed store, hash-verified

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())

Callers

nothing calls this directly

Calls 6

makeUnitCubeFunction · 0.90
extrudeMethod · 0.80
workplaneMethod · 0.80
sizeMethod · 0.45
facesMethod · 0.45
circleMethod · 0.45

Tested by

no test coverage detected