From 9a470f639d4641cb83b9772def6403f56c01d8a0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 22 Jun 2021 16:29:28 +0200 Subject: [PATCH] Only add G92 for Griffin if redoing layer Also, don't add it twice for the Repetier flavour. This way the code is separated better into if-else cases to make it easier to read, even though it has this line in there 3 times. Fixes issue CURA-8331. --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index a9e570e0cb..5c28073fb1 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Ultimaker B.V. +# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from ..Script import Script @@ -517,8 +517,13 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(M = extrusion_mode_numeric) + " ; switch back to " + extrusion_mode_string + " E values\n" - # reset extrude value to pre pause value - prepend_gcode += self.putValue(G = 92, E = current_e) + "\n" + # reset extrude value to pre pause value + prepend_gcode += self.putValue(G = 92, E = current_e) + "\n" + + elif redo_layer: + # All other options reset the E value to what it was before the pause because E things were added. + # If it's not yet reset, it still needs to be reset if there were any redo layers. + prepend_gcode += self.putValue(G = 92, E = current_e) + "\n" layer = prepend_gcode + layer