diff --git a/cadquery/CQ.py b/cadquery/CQ.py index 07b24a4..3723f67 100644 --- a/cadquery/CQ.py +++ b/cadquery/CQ.py @@ -1903,7 +1903,11 @@ class Workplane(CQ): #The default end point of the vector defining the axis of rotation should be along the normal from the plane if axisEnd is None: - axisEnd = self.plane.toWorldCoords((0,1)).toTuple() + #Make sure we match the user's assumed axis of rotation if they specified an start but not an end + if axisStart[1] != 0: + axisEnd = self.plane.toWorldCoords((0,axisStart[1])).toTuple() + else: + axisEnd = self.plane.toWorldCoords((0,1)).toTuple() else: axisEnd = self.plane.toWorldCoords(axisEnd).toTuple() diff --git a/cadquery/freecad_impl/shapes.py b/cadquery/freecad_impl/shapes.py index 4c348fa..a3f13bb 100644 --- a/cadquery/freecad_impl/shapes.py +++ b/cadquery/freecad_impl/shapes.py @@ -781,10 +781,8 @@ class Solid(Shape): rotateAxis = FreeCAD.Base.Vector(axisEnd) #Convert our axis end vector into to something FreeCAD will understand (an axis specification vector) - rotateAxis[0] = 0.0 if axisStart[0] == axisEnd[0] else axisEnd[0] - rotateAxis[1] = 0.0 if axisStart[1] == axisEnd[1] else axisEnd[1] - rotateAxis[2] = 0.0 if axisStart[2] == axisEnd[2] else axisEnd[2] - print angleDegrees + rotateAxis = rotateCenter.sub(rotateAxis) + #FreeCAD wants a rotation center and then an axis to rotate around rather than an axis of rotation result = f.revolve(rotateCenter, rotateAxis, angleDegrees)