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

Method testChamferAsymmetrical

tests/test_cadquery.py:2274–2286  ·  view source on GitHub ↗

Test chamfer API with a box shape for asymmetrical lengths

(self)

Source from the content-addressed store, hash-verified

2272 c1.chamfer(0.1)
2273
2274 def testChamferAsymmetrical(self):
2275 """
2276 Test chamfer API with a box shape for asymmetrical lengths
2277 """
2278 cube = CQ(makeUnitCube()).faces(">Z").chamfer(0.1, 0.2)
2279 self.saveModel(cube)
2280 self.assertEqual(10, cube.faces().size())
2281
2282 # test if edge lengths are different
2283 edge = cube.edges(">Z").vals()[0]
2284 self.assertAlmostEqual(0.6, edge.Length(), 3)
2285 edge = cube.edges("|Z").vals()[0]
2286 self.assertAlmostEqual(0.9, edge.Length(), 3)
2287
2288 def testChamferCylinder(self):
2289 """

Callers

nothing calls this directly

Calls 8

saveModelMethod · 0.95
makeUnitCubeFunction · 0.90
chamferMethod · 0.45
facesMethod · 0.45
sizeMethod · 0.45
valsMethod · 0.45
edgesMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected