mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -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
|
@ -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