Add more ultigcode retract and unretract. CURA-5491

This commit is contained in:
Jack Ha 2018-07-03 13:41:14 +02:00
parent e61ad750b7
commit b77220b260

View file

@ -304,14 +304,22 @@ class PauseAtHeight(Script):
# and retract again, the properly primes the nozzle # and retract again, the properly primes the nozzle
# when changing filament. # when changing filament.
if retraction_amount != 0: if retraction_amount != 0:
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" prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n"
# Move the head back # Move the head back
prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" 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" prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n"
if retraction_amount != 0: if retraction_amount != 0:
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, E=retraction_amount, F=retraction_speed * 60) + "\n"
prepend_gcode += self.putValue(G=1, F=9000) + "\n" prepend_gcode += self.putValue(G=1, F=9000) + "\n"
prepend_gcode += self.putValue(M=82) + "\n" prepend_gcode += self.putValue(M=82) + "\n"
# reset extrude value to pre pause value # reset extrude value to pre pause value