From b77220b260a9e122ff099c5b814bdf0b57f2f31c Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 13:41:14 +0200 Subject: [PATCH] Add more ultigcode retract and unretract. CURA-5491 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 751336878d..a8ade23c67 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -304,14 +304,22 @@ class PauseAtHeight(Script): # 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" + if is_ultigcode: + prepend_gcode += self.putValue(G=10) + "; retract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" # Move the head back prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + if is_ultigcode: + prepend_gcode += self.putValue(G=11) + "; unretract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" prepend_gcode += self.putValue(G=1, F=9000) + "\n" + + prepend_gcode += self.putValue(M=82) + "\n" # reset extrude value to pre pause value