From df54c400a0ccde879eb5578f1f4ff4a6d3abc8f7 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Wed, 7 Aug 2019 21:50:42 -0500 Subject: [PATCH] Draft: WorkingPlane, Pythonic style, improved the docstring, although alignToCurve is not yet implemented so it doesn't do anything --- src/Mod/Draft/WorkingPlane.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/WorkingPlane.py b/src/Mod/Draft/WorkingPlane.py index 096f982c73..c0da355c94 100644 --- a/src/Mod/Draft/WorkingPlane.py +++ b/src/Mod/Draft/WorkingPlane.py @@ -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':