Draft: WorkingPlane, Pythonic style, added whitespace

This commit is contained in:
vocx-fc
2019-08-07 10:38:11 -05:00
committed by Yorik van Havre
parent d8e154ec17
commit 1037258387

View File

@@ -145,7 +145,8 @@ class plane:
self.v = axis.cross(Vector(1, 0, 0))
self.v.normalize()
self.u = DraftVecUtils.rotate(self.v, -math.pi/2, self.axis)
offsetVector = Vector(axis); offsetVector.multiply(offset)
offsetVector = Vector(axis)
offsetVector.multiply(offset)
self.position = point.add(offsetVector)
self.weak = False
# FreeCAD.Console.PrintMessage("(position = " + str(self.position) + ")\n")
@@ -475,6 +476,7 @@ class plane:
norm = proj.cross(self.u)
return DraftVecUtils.angle(self.u, proj, norm)
def getPlacementFromPoints(points):
"returns a placement from a list of 3 or 4 vectors"
pl = plane()
@@ -492,6 +494,7 @@ def getPlacementFromPoints(points):
del pl
return p
def getPlacementFromFace(face, rotated=False):
"returns a placement from a face"
pl = plane()