From 2ce96c8c5ce060ab1cebda440ddfe4e1a4766adf Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Mon, 23 Feb 2015 08:39:47 -0500 Subject: [PATCH] Updated the embedded CadQuery library after a fix to the moveTo function. --- CadQuery/Libs/cadquery/CQ.py | 4 ++-- CadQuery/Libs/cadquery/freecad_impl/geom.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CadQuery/Libs/cadquery/CQ.py b/CadQuery/Libs/cadquery/CQ.py index bc31bfc..e98854b 100644 --- a/CadQuery/Libs/cadquery/CQ.py +++ b/CadQuery/Libs/cadquery/CQ.py @@ -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): diff --git a/CadQuery/Libs/cadquery/freecad_impl/geom.py b/CadQuery/Libs/cadquery/freecad_impl/geom.py index df2daf2..7ad2cf1 100644 --- a/CadQuery/Libs/cadquery/freecad_impl/geom.py +++ b/CadQuery/Libs/cadquery/freecad_impl/geom.py @@ -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])