mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add repetier-specific parking if repetier flavor is selected
This commit is contained in:
parent
87633e7818
commit
c87ee61e9c
1 changed files with 63 additions and 6 deletions
|
@ -76,6 +76,15 @@ class PauseAtHeight(Script):
|
||||||
"default_value": 190,
|
"default_value": 190,
|
||||||
"enabled": "pause_method != \\\"griffin\\\""
|
"enabled": "pause_method != \\\"griffin\\\""
|
||||||
},
|
},
|
||||||
|
"head_move_z":
|
||||||
|
{
|
||||||
|
"label": "Head move Z",
|
||||||
|
"description": "The Height of Z-axis retraction before parking.",
|
||||||
|
"unit": "mm",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 15.0,
|
||||||
|
"enabled": "pause_method == \\\"repetier\\\""
|
||||||
|
},
|
||||||
"retraction_amount":
|
"retraction_amount":
|
||||||
{
|
{
|
||||||
"label": "Retraction",
|
"label": "Retraction",
|
||||||
|
@ -92,7 +101,7 @@ class PauseAtHeight(Script):
|
||||||
"unit": "mm/s",
|
"unit": "mm/s",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 25,
|
"default_value": 25,
|
||||||
"enabled": "pause_method != \\\"griffin\\\""
|
"enabled": "pause_method not in [\\\"griffin\\\", \\\"repetier\\\"]"
|
||||||
},
|
},
|
||||||
"extrude_amount":
|
"extrude_amount":
|
||||||
{
|
{
|
||||||
|
@ -110,7 +119,7 @@ class PauseAtHeight(Script):
|
||||||
"unit": "mm/s",
|
"unit": "mm/s",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 3.3333,
|
"default_value": 3.3333,
|
||||||
"enabled": "pause_method != \\\"griffin\\\""
|
"enabled": "pause_method not in [\\\"griffin\\\", \\\"repetier\\\"]"
|
||||||
},
|
},
|
||||||
"redo_layers":
|
"redo_layers":
|
||||||
{
|
{
|
||||||
|
@ -134,7 +143,8 @@ class PauseAtHeight(Script):
|
||||||
"label": "Display Text",
|
"label": "Display Text",
|
||||||
"description": "Text that should appear on the display while paused. If left empty, there will not be any message.",
|
"description": "Text that should appear on the display while paused. If left empty, there will not be any message.",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"default_value": ""
|
"default_value": "",
|
||||||
|
"enabled": "pause_method != \\\"repetier\\\""
|
||||||
},
|
},
|
||||||
"machine_name":
|
"machine_name":
|
||||||
{
|
{
|
||||||
|
@ -202,6 +212,7 @@ class PauseAtHeight(Script):
|
||||||
extrude_speed = self.getSettingValueByKey("extrude_speed")
|
extrude_speed = self.getSettingValueByKey("extrude_speed")
|
||||||
park_x = self.getSettingValueByKey("head_park_x")
|
park_x = self.getSettingValueByKey("head_park_x")
|
||||||
park_y = self.getSettingValueByKey("head_park_y")
|
park_y = self.getSettingValueByKey("head_park_y")
|
||||||
|
move_z = self.getSettingValueByKey("head_move_z")
|
||||||
layers_started = False
|
layers_started = False
|
||||||
redo_layers = self.getSettingValueByKey("redo_layers")
|
redo_layers = self.getSettingValueByKey("redo_layers")
|
||||||
standby_temperature = self.getSettingValueByKey("standby_temperature")
|
standby_temperature = self.getSettingValueByKey("standby_temperature")
|
||||||
|
@ -216,7 +227,7 @@ class PauseAtHeight(Script):
|
||||||
"griffin": self.putValue(M = 0),
|
"griffin": self.putValue(M = 0),
|
||||||
"bq": self.putValue(M = 25),
|
"bq": self.putValue(M = 25),
|
||||||
"reprap": self.putValue(M = 226),
|
"reprap": self.putValue(M = 226),
|
||||||
"repetier": self.putValue("@pause")
|
"repetier": self.putValue("@pause now change filament and press continue printing")
|
||||||
}[pause_method]
|
}[pause_method]
|
||||||
|
|
||||||
# T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value")
|
# T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value")
|
||||||
|
@ -340,7 +351,22 @@ class PauseAtHeight(Script):
|
||||||
else:
|
else:
|
||||||
prepend_gcode += ";current layer: {layer}\n".format(layer = current_layer)
|
prepend_gcode += ";current layer: {layer}\n".format(layer = current_layer)
|
||||||
|
|
||||||
if pause_method != "griffin":
|
if pause_method == "repetier":
|
||||||
|
#Retraction
|
||||||
|
prepend_gcode += self.putValue(M = 83) + " ; switch to relative E values for any needed retraction\n"
|
||||||
|
if retraction_amount != 0:
|
||||||
|
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = 6000) + "\n"
|
||||||
|
|
||||||
|
#Move the head away
|
||||||
|
prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + " ; move up a millimeter to get out of the way\n"
|
||||||
|
prepend_gcode += self.putValue(G = 1, X = park_x, Y = park_y, F = 9000) + "\n"
|
||||||
|
if current_z < move_z:
|
||||||
|
prepend_gcode += self.putValue(G = 1, Z = current_z + move_z, F = 300) + "\n"
|
||||||
|
|
||||||
|
#Disable the E steppers
|
||||||
|
prepend_gcode += self.putValue(M = 84, E = 0) + "\n"
|
||||||
|
|
||||||
|
elif pause_method != "griffin":
|
||||||
# Retraction
|
# Retraction
|
||||||
prepend_gcode += self.putValue(M = 83) + " ; switch to relative E values for any needed retraction\n"
|
prepend_gcode += self.putValue(M = 83) + " ; switch to relative E values for any needed retraction\n"
|
||||||
if retraction_amount != 0:
|
if retraction_amount != 0:
|
||||||
|
@ -370,7 +396,38 @@ class PauseAtHeight(Script):
|
||||||
# Wait till the user continues printing
|
# Wait till the user continues printing
|
||||||
prepend_gcode += pause_command + " ; Do the actual pause\n"
|
prepend_gcode += pause_command + " ; Do the actual pause\n"
|
||||||
|
|
||||||
if pause_method != "griffin":
|
if pause_method == "repetier":
|
||||||
|
#Push the filament back,
|
||||||
|
if retraction_amount != 0:
|
||||||
|
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = 6000) + "\n"
|
||||||
|
|
||||||
|
# Optionally extrude material
|
||||||
|
if extrude_amount != 0:
|
||||||
|
prepend_gcode += self.putValue(G = 1, E = extrude_amount, F = 200) + "\n"
|
||||||
|
prepend_gcode += self.putValue("@info wait for cleaning nozzle from previous filament") + "\n"
|
||||||
|
prepend_gcode += self.putValue("@pause remove the waste filament from parking area and press continue printing") + "\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 = 6000) + "\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 = 6000) + "\n"
|
||||||
|
|
||||||
|
if current_extrusion_f != 0:
|
||||||
|
prepend_gcode += self.putValue(G = 1, F = current_extrusion_f) + " ; restore extrusion feedrate\n"
|
||||||
|
else:
|
||||||
|
Logger.log("w", "No previous feedrate found in gcode, feedrate for next layer(s) might be incorrect")
|
||||||
|
|
||||||
|
prepend_gcode += self.putValue(M = 82) + "\n"
|
||||||
|
|
||||||
|
# reset extrude value to pre pause value
|
||||||
|
prepend_gcode += self.putValue(G = 92, E = current_e) + "\n"
|
||||||
|
|
||||||
|
elif pause_method != "griffin":
|
||||||
if control_temperatures:
|
if control_temperatures:
|
||||||
# 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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue