Merge pull request #73 from xix-xeaon/moveto

Fixed usage of toWorldCoordinates in move and moveTo
This commit is contained in:
Jeremy Wright 2015-02-23 08:10:23 -05:00
commit 73688899aa
2 changed files with 5 additions and 3 deletions

View File

@ -1137,7 +1137,7 @@ class Workplane(CQ):
See :py:meth:`move` to do the same thing but using relative dimensions
"""
newCenter = Vector(x,y,0)
return self.newObject([self.plane.toWorldCoordinates(newCenter)])
return self.newObject([self.plane.toWorldCoords(newCenter)])
#relative move in current plane, not drawing
def move(self, xDist=0, yDist=0):
@ -1157,7 +1157,7 @@ class Workplane(CQ):
"""
p = self._findFromPoint(True)
newCenter = p + Vector(xDist,yDist,0)
return self.newObject([self.plane.toWorldCoordinates(newCenter)])
return self.newObject([self.plane.toWorldCoords(newCenter)])
def spline(self,listOfXYTuple,forConstruction=False):

View File

@ -421,7 +421,9 @@ class Plane:
"""
if len(tuplePoint) == 2:
if isinstance(tuplePoint, Vector):
v = tuplePoint
elif len(tuplePoint) == 2:
v = Vector(tuplePoint[0], tuplePoint[1], 0)
else:
v = Vector(tuplePoint[0],tuplePoint[1],tuplePoint[2])