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

Method testXYPlaneOrigins

tests/test_workplanes.py:32–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 )
31
32 def testXYPlaneOrigins(self):
33 base = Vector(0, 0, 0.25)
34 p = Plane(base, Vector(1, 0, 0), Vector(0, 0, 1))
35
36 # origin is always (0,0,0) in local coordinates
37 self.assertTupleAlmostEquals((0, 0, 0), p.toLocalCoords(p.origin).toTuple(), 2)
38
39 # (0,0,0) is always the original base in global coordinates
40 self.assertTupleAlmostEquals(
41 toTuple(base), p.toWorldCoords((0, 0)).toTuple(), 2
42 )
43
44 def testXZPlaneOrigins(self):
45 base = Vector(0, 0.25, 0)

Callers

nothing calls this directly

Calls 7

toLocalCoordsMethod · 0.95
toWorldCoordsMethod · 0.95
toTupleFunction · 0.90
VectorClass · 0.85
PlaneClass · 0.85
toTupleMethod · 0.45

Tested by

no test coverage detected