Draft: WorkingPlane, Pythonic style, improved the docstring, although alignToCurve is not yet implemented so it doesn't do anything

This commit is contained in:
vocx-fc
2019-08-07 21:50:42 -05:00
committed by Yorik van Havre
parent 7ef7c17d03
commit df54c400a0

View File

@@ -432,8 +432,24 @@ class plane:
# FreeCAD.Console.PrintMessage("(position = " + str(self.position) + ")\n")
# FreeCAD.Console.PrintMessage("Current workplane: x="+str(DraftVecUtils.rounded(self.u))+" y="+str(DraftVecUtils.rounded(self.v))+" z="+str(DraftVecUtils.rounded(self.axis))+"\n")
def alignToCurve(self, shape, offset=0):
"""Align plane to curve. NOT YET IMPLEMENTED.
def alignToCurve(self, shape, offset):
Parameters
----------
shape : Part.Shape
A curve that will serve to align the plane.
It can be an `Edge` or `Wire`.
offset : float
Defaults to zero. A value which will be used to offset
the plane in the direction of its `axis`.
Returns
-------
False
Returns `False` if the shape is null.
Currently it always returns `False`.
"""
if shape.isNull():
return False
elif shape.ShapeType == 'Edge':