From 494a85a34c579a76ada9e3b89ece82143df9607e Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Mon, 4 May 2020 00:28:40 -0500 Subject: [PATCH] Path: Fix `extrude()` fails with zero vector Add error message and return empty path for ProfileEdges open-edge case. --- src/Mod/Path/PathScripts/PathProfileEdges.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Mod/Path/PathScripts/PathProfileEdges.py b/src/Mod/Path/PathScripts/PathProfileEdges.py index 26ee36d541..b266b53ea4 100644 --- a/src/Mod/Path/PathScripts/PathProfileEdges.py +++ b/src/Mod/Path/PathScripts/PathProfileEdges.py @@ -197,6 +197,11 @@ class ObjectProfile(PathProfileBase.ObjectProfile): sdv = wBB.ZMax fdv = obj.FinalDepth.Value extLenFwd = sdv - fdv + if extLenFwd <= 0.0: + msg = translate('PathProfile', + 'For open edges, select top edge and set Final Depth manually.') + FreeCAD.Console.PrintError(msg + '\n') + return False WIRE = flatWire.Wires[0] numEdges = len(WIRE.Edges)