mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Make timelapse head parking optional
This commit is contained in:
parent
256aef30c9
commit
eb3670dd93
1 changed files with 17 additions and 5 deletions
|
@ -30,13 +30,21 @@ class TimeLapse(Script):
|
|||
"minimum_value": 0,
|
||||
"unit": "ms"
|
||||
},
|
||||
"park_print_head":
|
||||
{
|
||||
"label": "Park Print Head",
|
||||
"description": "Park the print head out of the way",
|
||||
"type": "bool",
|
||||
"default_value": true
|
||||
},
|
||||
"head_park_x":
|
||||
{
|
||||
"label": "Park Print Head X",
|
||||
"description": "What X location does the head move to for photo.",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 0
|
||||
"default_value": 0,
|
||||
"enabled": "park_print_head"
|
||||
},
|
||||
"head_park_y":
|
||||
{
|
||||
|
@ -44,7 +52,8 @@ class TimeLapse(Script):
|
|||
"description": "What Y location does the head move to for photo.",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 190
|
||||
"default_value": 190,
|
||||
"enabled": "park_print_head"
|
||||
},
|
||||
"park_feed_rate":
|
||||
{
|
||||
|
@ -52,7 +61,8 @@ class TimeLapse(Script):
|
|||
"description": "How fast does the head move to the park coordinates.",
|
||||
"unit": "mm/s",
|
||||
"type": "float",
|
||||
"default_value": 9000
|
||||
"default_value": 9000,
|
||||
"enabled": "park_print_head"
|
||||
}
|
||||
}
|
||||
}"""
|
||||
|
@ -60,13 +70,15 @@ class TimeLapse(Script):
|
|||
def execute(self, data):
|
||||
in_layer = False
|
||||
feed_rate = self.getSettingValueByKey("park_feed_rate")
|
||||
park_print_head = self.getSettingValueByKey("park_print_head")
|
||||
x_park = self.getSettingValueByKey("head_park_x")
|
||||
y_park = self.getSettingValueByKey("head_park_y")
|
||||
trigger_cmd = self.getSettingValueByKey("trigger_cmd")
|
||||
pause_length = self.getSettingValueByKey("pause_length")
|
||||
|
||||
if park_print_head:
|
||||
gcode_to_append = self.putValue(G = 90) + ";Absolute positioning\n"
|
||||
gcode_to_append += self.putValue(G = 1, F = feed_rate, X = x_park, Y = y_park) + ";Move into position\n"
|
||||
gcode_to_append += self.putValue(G = 1, F = feed_rate, X = x_park, Y = y_park) + ";Park print head\n"
|
||||
gcode_to_append += trigger_cmd + ";Snap Photo\n"
|
||||
gcode_to_append += self.putValue(G = 4, P = pause_length) + ";Wait for camera\n"
|
||||
for layer in data:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue