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

Method testXZPlaneOrigins

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

Source from the content-addressed store, hash-verified

42 )
43
44 def testXZPlaneOrigins(self):
45 base = Vector(0, 0.25, 0)
46 p = Plane(base, Vector(0, 0, 1), Vector(0, 1, 0))
47
48 # (0,0,0) is always the original base in global coordinates
49 self.assertTupleAlmostEquals(
50 toTuple(base), p.toWorldCoords((0, 0)).toTuple(), 2
51 )
52
53 # origin is always (0,0,0) in local coordinates
54 self.assertTupleAlmostEquals((0, 0, 0), p.toLocalCoords(p.origin).toTuple(), 2)
55
56 def testPlaneBasics(self):
57 p = Plane.XY()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected