From 74ff28cbeaa0ac9222b80690ea63c0da1bd29a1c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 5 Nov 2021 17:27:46 +0100 Subject: [PATCH] Only unretract/retract when necessary for priming Otherwise this is quite a useless move and would only cause blobs on the print. Found during work on CURA-8522. --- .../scripts/PauseAtHeight.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index a9fd602dabc..7b1601aaf06 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -489,18 +489,17 @@ def execute(self, data: List[str]) -> List[str]: # Set extruder resume temperature prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + " ; resume temperature\n" - # Push the filament back, - if retraction_amount != 0: - prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" + if extrude_amount != 0: # Need to prime after the pause. + # Push the filament back. + if retraction_amount != 0: + prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" - # Optionally extrude material - if extrude_amount != 0: + # Prime the material. prepend_gcode += self.putValue(G = 1, E = extrude_amount, F = extrude_speed * 60) + "; Extra extrude after the unpause\n" - # and retract again, the properly primes the nozzle - # when changing filament. - if retraction_amount != 0: - prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" + # And retract again to make the movements back to the starting position. + if retraction_amount != 0: + prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" # Move the head back if park_enabled: