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

Method testSplitKeepingHalf

tests/test_cadquery.py:2327–2340  ·  view source on GitHub ↗

Tests splitting a solid

(self)

Source from the content-addressed store, hash-verified

2325 self.saveModel(result)
2326
2327 def testSplitKeepingHalf(self):
2328 """
2329 Tests splitting a solid
2330 """
2331
2332 # drill a hole in the side
2333 c = CQ(makeUnitCube()).faces(">Z").workplane().circle(0.25).cutThruAll()
2334
2335 self.assertEqual(7, c.faces().size())
2336
2337 # now cut it in half sideways
2338 result = c.faces(">Y").workplane(-0.5).split(keepTop=True)
2339 self.saveModel(result)
2340 self.assertEqual(8, result.faces().size())
2341
2342 def testSplitKeepingBoth(self):
2343 """

Callers

nothing calls this directly

Calls 8

saveModelMethod · 0.95
makeUnitCubeFunction · 0.90
cutThruAllMethod · 0.80
workplaneMethod · 0.80
circleMethod · 0.45
facesMethod · 0.45
sizeMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected