mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Merge branch 'master' of https://github.com/rodrigosclosa/Cura into rodrigosclosa-master
Conflicts: plugins/PostProcessingPlugin/scripts/PauseAtHeight.py -> Merging other pausing scripts into this one plugins/PostProcessingPlugin/scripts/PauseAtHeightforRepetier.py -> Has been removed upstream
This commit is contained in:
commit
ededb2a8d2
1 changed files with 26 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2019 Ultimaker B.V.
|
# Copyright (c) 2020 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from ..Script import Script
|
from ..Script import Script
|
||||||
|
@ -183,6 +183,21 @@ class PauseAtHeight(Script):
|
||||||
},
|
},
|
||||||
"default_value": "RepRap (Marlin/Sprinter)",
|
"default_value": "RepRap (Marlin/Sprinter)",
|
||||||
"enabled": false
|
"enabled": false
|
||||||
|
"default_value": ""
|
||||||
|
},
|
||||||
|
"custom_gcode_before_pause":
|
||||||
|
{
|
||||||
|
"label": "GCODE Before Pause",
|
||||||
|
"description": "Any custom GCODE to run before the pause, for example, M300 S440 P200 to beep.",
|
||||||
|
"type": "str",
|
||||||
|
"default_value": "M300 S440 P200; M300 S660 P250; M300 S880 P300;"
|
||||||
|
},
|
||||||
|
"custom_gcode_after_pause":
|
||||||
|
{
|
||||||
|
"label": "GCODE After Pause",
|
||||||
|
"description": "Any custom GCODE to run after the pause, for example, M300 S440 P200 to beep.",
|
||||||
|
"type": "str",
|
||||||
|
"default_value": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}"""
|
}"""
|
||||||
|
@ -235,6 +250,8 @@ class PauseAtHeight(Script):
|
||||||
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
|
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
|
||||||
initial_layer_height = Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")
|
initial_layer_height = Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")
|
||||||
display_text = self.getSettingValueByKey("display_text")
|
display_text = self.getSettingValueByKey("display_text")
|
||||||
|
gcode_before = self.getSettingValueByKey("custom_gcode_before_pause")
|
||||||
|
gcode_after = self.getSettingValueByKey("custom_gcode_after_pause")
|
||||||
|
|
||||||
pause_method = self.getSettingValueByKey("pause_method")
|
pause_method = self.getSettingValueByKey("pause_method")
|
||||||
pause_command = {
|
pause_command = {
|
||||||
|
@ -411,9 +428,17 @@ class PauseAtHeight(Script):
|
||||||
if disarm_timeout > 0:
|
if disarm_timeout > 0:
|
||||||
prepend_gcode += self.putValue(M = 18, S = disarm_timeout) + " ; Set the disarm timeout\n"
|
prepend_gcode += self.putValue(M = 18, S = disarm_timeout) + " ; Set the disarm timeout\n"
|
||||||
|
|
||||||
|
# Set a custom GCODE section before pause
|
||||||
|
if gcode_before:
|
||||||
|
prepend_gcode += gcode_before + "\n"
|
||||||
|
|
||||||
# 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"
|
||||||
|
|
||||||
|
# Set a custom GCODE section before pause
|
||||||
|
if gcode_after:
|
||||||
|
prepend_gcode += gcode_after + "\n"
|
||||||
|
|
||||||
if pause_method == "repetier":
|
if pause_method == "repetier":
|
||||||
#Push the filament back,
|
#Push the filament back,
|
||||||
if retraction_amount != 0:
|
if retraction_amount != 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue