From 4ec9f7e281ddd0b901dfedb818ac5d6f18f245e9 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Fri, 6 Sep 2019 21:44:23 -0700 Subject: [PATCH] Prevent endless loop through negative step down values in engraver. --- src/Mod/Path/PathScripts/PathEngraveBase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathEngraveBase.py b/src/Mod/Path/PathScripts/PathEngraveBase.py index 8a88107e57..9b9239ea6d 100644 --- a/src/Mod/Path/PathScripts/PathEngraveBase.py +++ b/src/Mod/Path/PathScripts/PathEngraveBase.py @@ -53,10 +53,14 @@ class ObjectOp(PathOp.ObjectOp): zValues = [] if obj.StepDown.Value != 0: z = obj.StartDepth.Value - obj.StepDown.Value + stepdown = obj.StepDown.Value + if stepdown < 0: + stepdown = -stepdown while z > obj.FinalDepth.Value: zValues.append(z) - z -= obj.StepDown.Value + z -= stepdown + zValues.append(obj.FinalDepth.Value) return zValues