ProjectedOrigin with origin point option

Removed ProjectedGlobalOrigin option for centerOption for the workplane cunstructor. Added origin keyword parameter that defaults to (0,0,0).
This commit is contained in:
Michael Greminger
2019-06-02 16:16:27 -05:00
parent ae65dc3579
commit 0179b674e0
2 changed files with 18 additions and 25 deletions

View File

@ -1924,17 +1924,9 @@ class TestCadQuery(BaseTest):
.plane.origin.toTuple()
self.assertTupleAlmostEquals(origin, (45.0, 30.0, 10.0), decimal_places)
# test case where plane origin is shifted with center call
r = r.faces(">Z").workplane(centerOption='ProjectedOrigin').center(30,0) \
.hole(90)
origin = r.faces(">Z").workplane(centerOption='ProjectedOrigin') \
origin = r.faces(">Z").workplane(centerOption='ProjectedOrigin',origin=(30,10,20)) \
.plane.origin.toTuple()
self.assertTupleAlmostEquals(origin, (30.0, 0.0, 10.0), decimal_places)
origin = r.faces(">Z").workplane(centerOption='ProjectedGlobalOrigin') \
.plane.origin.toTuple()
self.assertTupleAlmostEquals(origin, (0.0, 0.0, 10.0), decimal_places)
self.assertTupleAlmostEquals(origin, (30.0, 10.0, 10.0), decimal_places)
with self.assertRaises(ValueError):
origin = r.faces(">Z").workplane(centerOption='undefined')