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

Method testTranslate

tests/test_cad_objects.py:514–518  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

512 matrix_almost_equal(m, vals4x4_invert)
513
514 def testTranslate(self):
515 e = Edge.makeCircle(2, (1, 2, 3))
516 e2 = e.translate(Vector(0, 0, 1))
517
518 self.assertTupleAlmostEquals((1.0, 2.0, 4.0), e2.Center().toTuple(), 3)
519
520 def testVertices(self):
521 e = Shape.cast(BRepBuilderAPI_MakeEdge(gp_Pnt(0, 0, 0), gp_Pnt(1, 1, 0)).Edge())

Callers

nothing calls this directly

Calls 6

VectorClass · 0.85
makeCircleMethod · 0.45
translateMethod · 0.45
toTupleMethod · 0.45
CenterMethod · 0.45

Tested by

no test coverage detected