mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 16:27:51 -06:00
Only consider feedrates for extrusions (Pause At Height)
CURA-6799
This commit is contained in:
parent
2a488b48e9
commit
2fa4230d1c
2 changed files with 12 additions and 11 deletions
|
@ -154,7 +154,7 @@ class PauseAtHeight(Script):
|
|||
# use offset to calculate the current height: <current_height> = <current_z> - <layer_0_z>
|
||||
layer_0_z = 0
|
||||
current_z = 0
|
||||
current_f = 0
|
||||
current_extrusion_f = 0
|
||||
got_first_g_cmd_on_layer_0 = False
|
||||
current_t = 0 #Tracks the current extruder for tracking the target temperature.
|
||||
target_temperature = {} #Tracks the current target temperature for each extruder.
|
||||
|
@ -188,9 +188,9 @@ class PauseAtHeight(Script):
|
|||
if not layers_started:
|
||||
continue
|
||||
|
||||
# If a F instruction is in the line, read the current F
|
||||
if self.getValue(line, "F") is not None:
|
||||
current_f = self.getValue(line, "F")
|
||||
# Look for the feed rate of an extrusion instruction
|
||||
if self.getValue(line, "F") is not None and self.getValue(line, "E") is not None:
|
||||
current_extrusion_f = self.getValue(line, "F")
|
||||
|
||||
# If a Z instruction is in the line, read the current Z
|
||||
if self.getValue(line, "Z") is not None:
|
||||
|
@ -328,8 +328,8 @@ class PauseAtHeight(Script):
|
|||
else:
|
||||
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n"
|
||||
|
||||
if current_f != 0:
|
||||
prepend_gcode += self.putValue(G = 1, F = current_f) + "\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")
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class PauseAtHeightforRepetier(Script):
|
|||
def execute(self, data):
|
||||
x = 0.
|
||||
y = 0.
|
||||
current_f = 0
|
||||
current_extrusion_f = 0
|
||||
current_z = 0.
|
||||
pause_z = self.getSettingValueByKey("pause_height")
|
||||
retraction_amount = self.getSettingValueByKey("retraction_amount")
|
||||
|
@ -96,10 +96,11 @@ class PauseAtHeightforRepetier(Script):
|
|||
|
||||
if self.getValue(line, 'G') == 1 or self.getValue(line, 'G') == 0:
|
||||
current_z = self.getValue(line, 'Z')
|
||||
current_f = self.getValue(line, 'F', current_f)
|
||||
if self.getValue(line, 'F') is not None and self.getValue(line, 'E') is not None:
|
||||
current_extrusion_f = self.getValue(line, 'F', current_extrusion_f)
|
||||
x = self.getValue(line, 'X', x)
|
||||
y = self.getValue(line, 'Y', y)
|
||||
if current_z != None:
|
||||
if current_z is not None:
|
||||
if current_z >= pause_z:
|
||||
|
||||
index = data.index(layer)
|
||||
|
@ -154,8 +155,8 @@ class PauseAtHeightforRepetier(Script):
|
|||
if retraction_amount != 0:
|
||||
prepend_gcode +="G1 E%f F6000\n" % (retraction_amount)
|
||||
|
||||
if current_f != 0:
|
||||
prepend_gcode += self.putValue(G=1, F=current_f) + "\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")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue