Small format fix for function mirror in Shapes.py file......

This commit is contained in:
Simon Huskier 2016-01-20 17:08:32 +08:00
parent 9d9b6d310e
commit 8c8432410b

View File

@ -189,17 +189,17 @@ class Shape(object):
return BoundBox(self.wrapped.BoundBox)
def mirror(self, mirrorPlane="XY", basePointVector=(0, 0, 0)):
if mirrorPlane == "XY" or mirrorPlane== "YX":
mirrorPlaneNormalVector = FreeCAD.Base.Vector(0, 0, 1)
elif mirrorPlane == "XZ" or mirrorPlane == "ZX":
mirrorPlaneNormalVector = FreeCAD.Base.Vector(0, 1, 0)
elif mirrorPlane == "YZ" or mirrorPlane == "ZY":
mirrorPlaneNormalVector = FreeCAD.Base.Vector(1, 0, 0)
if mirrorPlane == "XY" or mirrorPlane== "YX":
mirrorPlaneNormalVector = FreeCAD.Base.Vector(0, 0, 1)
elif mirrorPlane == "XZ" or mirrorPlane == "ZX":
mirrorPlaneNormalVector = FreeCAD.Base.Vector(0, 1, 0)
elif mirrorPlane == "YZ" or mirrorPlane == "ZY":
mirrorPlaneNormalVector = FreeCAD.Base.Vector(1, 0, 0)
if type(basePointVector) == tuple:
basePointVector = Vector(basePointVector)
return Shape.cast(self.wrapped.mirror(basePointVector.wrapped, mirrorPlaneNormalVector))
return Shape.cast(self.wrapped.mirror(basePointVector.wrapped, mirrorPlaneNormalVector))
def Center(self):
# A Part.Shape object doesn't have the CenterOfMass function, but it's wrapped Solid(s) does