The revolve operation should be complete except for tests.

This commit is contained in:
Jeremy Wright 2014-10-19 22:23:26 -04:00
parent af386836a6
commit 458c55b64b
2 changed files with 7 additions and 5 deletions

View File

@ -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()

View File

@ -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)