mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Turn 'Redo Layers' into a boolean for at most 1 layer
We've deemed it irresponsible to redo multiple layers. This will dig the nozzle back down into the layers that were printed before the pause. This doesn't include a version upgrade yet. Contributes to issue CURA-7413.
This commit is contained in:
parent
1946615fff
commit
05b0bf5988
1 changed files with 19 additions and 21 deletions
|
@ -108,13 +108,12 @@ class PauseAtHeight(Script):
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 3.3333
|
"default_value": 3.3333
|
||||||
},
|
},
|
||||||
"redo_layers":
|
"redo_layer":
|
||||||
{
|
{
|
||||||
"label": "Redo Layers",
|
"label": "Redo Layer",
|
||||||
"description": "Redo a number of previous layers after a pause to increases adhesion.",
|
"description": "Redo the last layer before the pause, to get the filament flowing again after having oozed a bit during the pause.",
|
||||||
"unit": "layers",
|
"type": "bool",
|
||||||
"type": "int",
|
"default_value": false
|
||||||
"default_value": 0
|
|
||||||
},
|
},
|
||||||
"standby_temperature":
|
"standby_temperature":
|
||||||
{
|
{
|
||||||
|
@ -160,7 +159,7 @@ class PauseAtHeight(Script):
|
||||||
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")
|
||||||
layers_started = False
|
layers_started = False
|
||||||
redo_layers = self.getSettingValueByKey("redo_layers")
|
redo_layer = self.getSettingValueByKey("redo_layer")
|
||||||
standby_temperature = self.getSettingValueByKey("standby_temperature")
|
standby_temperature = self.getSettingValueByKey("standby_temperature")
|
||||||
firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value")
|
firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value")
|
||||||
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
|
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
|
||||||
|
@ -264,15 +263,14 @@ class PauseAtHeight(Script):
|
||||||
if current_e >= 0:
|
if current_e >= 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
# include a number of previous layers
|
# Maybe redo the last layer.
|
||||||
for i in range(1, redo_layers + 1):
|
if redo_layer:
|
||||||
prev_layer = data[index - i]
|
prev_layer = data[index - 1]
|
||||||
layer = prev_layer + layer
|
layer = prev_layer + layer
|
||||||
|
|
||||||
# Get extruder's absolute position at the
|
# Get extruder's absolute position at the
|
||||||
# beginning of the first layer redone
|
# beginning of the redone layer.
|
||||||
# see https://github.com/nallath/PostProcessingPlugin/issues/55
|
# see https://github.com/nallath/PostProcessingPlugin/issues/55
|
||||||
if i == redo_layers:
|
|
||||||
# Get X and Y from the next layer (better position for
|
# Get X and Y from the next layer (better position for
|
||||||
# the nozzle)
|
# the nozzle)
|
||||||
x, y = self.getNextXY(layer)
|
x, y = self.getNextXY(layer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue