From 2ff909b9931cbe36f144a30b02a8c8fe9795e1cb Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sat, 20 Feb 2021 11:42:36 -0600 Subject: [PATCH] Path: Add error for incorrect open-edge usage When profiling open edges, the user must currently select a top edge and then set the Final Depth manually to a value below the selected edge(s). This fix provides the user with feedback for the empty path generated. --- src/Mod/Path/PathScripts/PathProfile.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index da702108c9..9a33868067 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -640,7 +640,8 @@ class ObjectProfile(PathAreaOp.ObjectOp): PathLog.error(msg) else: flattened = self._flattenWire(obj, wire, obj.FinalDepth.Value) - if flattened: + zDiff = math.fabs(wire.BoundBox.ZMin - obj.FinalDepth.Value) + if flattened and zDiff >= self.JOB.GeometryTolerance.Value: cutWireObjs = False openEdges = list() passOffsets = [self.ofstRadius] @@ -664,7 +665,11 @@ class ObjectProfile(PathAreaOp.ObjectOp): tup = openEdges, False, 'OpenEdge', 0.0, 'X', obj.StartDepth.Value, obj.FinalDepth.Value shapes.append(tup) else: - PathLog.error(self.inaccessibleMsg) + if zDiff < self.JOB.GeometryTolerance.Value: + msg = translate('PathProfile', 'Check edge selection and Final Depth requirements for profiling open edge(s).') + PathLog.error(msg) + else: + PathLog.error(self.inaccessibleMsg) # Eif # Eif # Efor