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.
This commit is contained in:
Russell Johnson
2021-02-20 11:42:36 -06:00
parent a1d3f8e490
commit 2ff909b993

View File

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