mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-01 08:14:22 +08:00
Merge branch 'griehsler-master'
This commit is contained in:
commit
314070acbc
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018 Ultimaker B.V.
|
# Copyright (c) 2019 Ultimaker B.V.
|
||||||
# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
|
# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
from typing import Optional, Tuple
|
from typing import Optional, Tuple
|
||||||
@ -45,6 +45,22 @@ class FilamentChange(Script):
|
|||||||
"unit": "mm",
|
"unit": "mm",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 300.0
|
"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")
|
layer_nums = self.getSettingValueByKey("layer_number")
|
||||||
initial_retract = self.getSettingValueByKey("initial_retract")
|
initial_retract = self.getSettingValueByKey("initial_retract")
|
||||||
later_retract = self.getSettingValueByKey("later_retract")
|
later_retract = self.getSettingValueByKey("later_retract")
|
||||||
|
x_pos = self.getSettingValueByKey("x_position")
|
||||||
|
y_pos = self.getSettingValueByKey("y_position")
|
||||||
|
|
||||||
color_change = "M600"
|
color_change = "M600"
|
||||||
|
|
||||||
@ -64,6 +82,12 @@ class FilamentChange(Script):
|
|||||||
if later_retract is not None and later_retract > 0.:
|
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"
|
color_change = color_change + " ; Generated by FilamentChange plugin"
|
||||||
|
|
||||||
layer_targets = layer_nums.split(",")
|
layer_targets = layer_nums.split(",")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user