Skip to content

Commit

Permalink
PauseAtHeight: added extrude amount option
Browse files Browse the repository at this point in the history
See nallath#19
I have not tested this yet with an actual print
  • Loading branch information
peteruithoven authored Sep 24, 2016
1 parent 30ebbbd commit fe04742
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/PauseAtHeight.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ def getSettingDataString(self):
"unit": "mm",
"type": "float",
"default_value": 0
},
"extrude_ammount":
{
"label": "Extrude amount",
"description": "How much filament should be extruded after pause. This is usually only needed when printing with multiple materials that require different temperatures.",
"unit": "mm",
"type": "float",
"default_value": 0
}
}
}"""
Expand All @@ -52,6 +60,7 @@ def execute(self, data):
current_z = 0.
pause_z = self.getSettingValueByKey("pause_height")
retraction_ammount = self.getSettingValueByKey("retraction_ammount")
extrude_ammount = self.getSettingValueByKey("extrude_ammount")
park_x = self.getSettingValueByKey("head_park_x")
park_y = self.getSettingValueByKey("head_park_y")
layers_started = False
Expand Down Expand Up @@ -92,6 +101,10 @@ def execute(self, data):
#Wait till the user continues printing
prepend_gcode += "M0 ;Do the actual pause\n"

# Optionally extrude material
if extrude_ammount != 0:
prepend_gcode += "G1 E%f F6000\n" % (extrude_ammount)

#Push the filament back, and retract again, the properly primes the nozzle when changing filament.
if retraction_ammount != 0:
prepend_gcode += "G1 E%f F6000\n" % (retraction_ammount)
Expand Down

0 comments on commit fe04742

Please sign in to comment.