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

Method testTranslateSolid

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

Source from the content-addressed store, hash-verified

1547 self.assertEqual(10, s.faces().size())
1548
1549 def testTranslateSolid(self):
1550 c = CQ(makeUnitCube())
1551 self.assertAlmostEqual(0.0, c.faces("<Z").vertices().item(0).val().Z, 3)
1552
1553 # TODO: it might be nice to provide a version of translate that modifies the existing geometry too
1554 d = c.translate(Vector(0, 0, 1.5))
1555 self.assertAlmostEqual(1.5, d.faces("<Z").vertices().item(0).val().Z, 3)
1556
1557 def testTranslateWire(self):
1558 c = CQ(makeUnitSquareWire())

Callers

nothing calls this directly

Calls 7

makeUnitCubeFunction · 0.90
VectorClass · 0.85
itemMethod · 0.80
valMethod · 0.45
verticesMethod · 0.45
facesMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected