Draft: WorkingPlane, removed excessive indentation

This commit is contained in:
vocx-fc
2019-08-06 23:26:27 -05:00
committed by Yorik van Havre
parent d3a41be668
commit 4ecb107098

View File

@@ -476,15 +476,15 @@ def getPlacementFromPoints(points):
"returns a placement from a list of 3 or 4 vectors"
pl = plane()
try:
pl.position = points[0]
pl.u = (points[1].sub(points[0]).normalize())
pl.v = (points[2].sub(points[0]).normalize())
if len(points) == 4:
pl.axis = (points[3].sub(points[0]).normalize())
else:
pl.axis = ((pl.u).cross(pl.v)).normalize()
pl.position = points[0]
pl.u = (points[1].sub(points[0]).normalize())
pl.v = (points[2].sub(points[0]).normalize())
if len(points) == 4:
pl.axis = (points[3].sub(points[0]).normalize())
else:
pl.axis = ((pl.u).cross(pl.v)).normalize()
except:
return None
return None
p = pl.getPlacement()
del pl
return p