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.
This commit is contained in:
Ghostkeeper 2021-11-05 17:27:46 +01:00
parent 67d76e3af8
commit 74ff28cbea
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -489,18 +489,17 @@ class PauseAtHeight(Script):
# Set extruder resume temperature # Set extruder resume temperature
prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + " ; resume temperature\n" prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + " ; resume temperature\n"
# Push the filament back, if extrude_amount != 0: # Need to prime after the pause.
if retraction_amount != 0: # Push the filament back.
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" if retraction_amount != 0:
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n"
# Optionally extrude material # Prime the material.
if extrude_amount != 0:
prepend_gcode += self.putValue(G = 1, E = extrude_amount, F = extrude_speed * 60) + "; Extra extrude after the unpause\n" 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 # And retract again to make the movements back to the starting position.
# when changing filament. if retraction_amount != 0:
if retraction_amount != 0: prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n"
prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n"
# Move the head back # Move the head back
if park_enabled: if park_enabled: