Path: Fix extrude() fails with zero vector

Add error message and return empty path for ProfileEdges open-edge case.
This commit is contained in:
Russell Johnson
2020-05-04 00:28:40 -05:00
parent 76617fd582
commit 8b72ea646a

View File

@@ -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)