mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -06:00
Merge branch 'master' of https://github.com/griehsler/Cura into griehsler-master
This commit is contained in:
commit
3018b1b3d4
1 changed files with 25 additions and 1 deletions
|
@ -45,6 +45,22 @@ class FilamentChange(Script):
|
|||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 300.0
|
||||
},
|
||||
"x_position":
|
||||
{
|
||||
"label": "X Position",
|
||||
"description": "Extruder X position. The print head will move here for filament change.",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 0
|
||||
},
|
||||
"y_position":
|
||||
{
|
||||
"label": "Y Position",
|
||||
"description": "Extruder Y position. The print head will move here for filament change.",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 0
|
||||
}
|
||||
}
|
||||
}"""
|
||||
|
@ -55,6 +71,8 @@ class FilamentChange(Script):
|
|||
layer_nums = self.getSettingValueByKey("layer_number")
|
||||
initial_retract = self.getSettingValueByKey("initial_retract")
|
||||
later_retract = self.getSettingValueByKey("later_retract")
|
||||
x_pos = self.getSettingValueByKey("x_position")
|
||||
y_pos = self.getSettingValueByKey("y_position")
|
||||
|
||||
color_change = "M600"
|
||||
|
||||
|
@ -62,7 +80,13 @@ class FilamentChange(Script):
|
|||
color_change = color_change + (" E%.2f" % initial_retract)
|
||||
|
||||
if later_retract is not None and later_retract > 0.:
|
||||
color_change = color_change + (" L%.2f" % later_retract)
|
||||
color_change = color_change + (" L-%.2f" % later_retract)
|
||||
|
||||
if x_pos is not None:
|
||||
color_change = color_change + (" X%.2f" % x_pos)
|
||||
|
||||
if y_pos is not None:
|
||||
color_change = color_change + (" Y%.2f" % y_pos)
|
||||
|
||||
color_change = color_change + " ; Generated by FilamentChange plugin"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue