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

Method testCounterBores

tests/test_cadquery.py:2296–2309  ·  view source on GitHub ↗

Tests making a set of counterbored holes in a face

(self)

Source from the content-addressed store, hash-verified

2294 self.assertEqual(4, cylinder.faces().size())
2295
2296 def testCounterBores(self):
2297 """
2298 Tests making a set of counterbored holes in a face
2299 """
2300 c = CQ(makeCube(3.0))
2301 pnts = [(-1.0, -1.0), (0.0, 0.0), (1.0, 1.0)]
2302 c = c.faces(">Z").workplane().pushPoints(pnts).cboreHole(0.1, 0.25, 0.25, 0.75)
2303 self.assertEqual(18, c.faces().size())
2304 self.saveModel(c)
2305
2306 # Tests the case where the depth of the cboreHole is not specified
2307 c2 = CQ(makeCube(3.0))
2308 c2 = c2.faces(">Z").workplane().pushPoints(pnts).cboreHole(0.1, 0.25, 0.25)
2309 self.assertEqual(15, c2.faces().size())
2310
2311 def testCounterSinks(self):
2312 """

Callers

nothing calls this directly

Calls 7

saveModelMethod · 0.95
makeCubeFunction · 0.90
cboreHoleMethod · 0.80
pushPointsMethod · 0.80
workplaneMethod · 0.80
facesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected