From a569bed31bf0af237a57cf32d3233e5c15f8a91b Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Thu, 8 Aug 2019 00:59:43 -0500 Subject: [PATCH] Draft: WorkingPlane, Pythonic style, improved the docstring; these methods only work when 'FreeCAD.GuiUp' is True; it should print a message to the console indicating that. --- src/Mod/Draft/WorkingPlane.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Mod/Draft/WorkingPlane.py b/src/Mod/Draft/WorkingPlane.py index e6e96ddea9..62766160a2 100644 --- a/src/Mod/Draft/WorkingPlane.py +++ b/src/Mod/Draft/WorkingPlane.py @@ -585,8 +585,8 @@ class plane: It extracts the shape of the object or subobject and then calls `alignToFace(shape, offset)`. - This method only works when the `FreeCADGui.Selection` - class is available, that is, when the graphical interface is loaded. + This method only works when `FreeCAD.GuiUp` is `True`, + that is, when the graphical interface is loaded. Parameter --------- @@ -613,6 +613,9 @@ class plane: The method could work for curves (`'Edge'` or `'Wire'`) but `alignToCurve()` isn't fully implemented. + When the interface is not loaded it should fail and print + a message, `FreeCAD.Console.PrintError()`. + See also -------- alignToFace, alignToCurve @@ -660,8 +663,8 @@ class plane: To do ----- - It should fail loudly, with a message at least - `FreeCAD.Console.PrintError()`. + When the interface is not loaded it should fail and print + a message, `FreeCAD.Console.PrintError()`. """ if self.weak: if direction and point: