def testXZPlaneOrigins(self): base = Vector(0,0.25,0) p = Plane(base, Vector(0,0,1), Vector(0,1,0)) #(0,0,0) is always the original base in global coordinates self.assertTupleAlmostEquals(toTuple(base), p.toWorldCoords((0,0)).toTuple() ,2 ) #origin is always (0,0,0) in local coordinates self.assertTupleAlmostEquals((0,0,0), p.toLocalCoords(p.origin).toTuple() ,2 )
def testXZPlaneOrigins(self): base = Vector(0, 0.25, 0) p = Plane(base, Vector(0, 0, 1), Vector(0, 1, 0)) # (0,0,0) is always the original base in global coordinates self.assertTupleAlmostEquals(toTuple(base), p.toWorldCoords((0, 0)).toTuple(), 2) # origin is always (0,0,0) in local coordinates self.assertTupleAlmostEquals((0, 0, 0), p.toLocalCoords(p.origin).toTuple(), 2)