mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Adjustment bit for self.start_x, self.start_y
This commit is contained in:
parent
7e4b6a63f7
commit
703028d00d
1 changed files with 3 additions and 1 deletions
|
@ -56,6 +56,8 @@ class PurgeLinesAndUnload(Script):
|
|||
self.machine_right = self.machine_width - 1.0
|
||||
self.machine_front = 1.0
|
||||
self.machine_back = self.machine_depth - 1.0
|
||||
self.start_x = None
|
||||
self.start_y = None
|
||||
|
||||
def initialize(self) -> None:
|
||||
super().initialize()
|
||||
|
@ -352,7 +354,7 @@ class PurgeLinesAndUnload(Script):
|
|||
add_move("Y", self.machine_back)
|
||||
else:
|
||||
add_move("Y", self.machine_front)
|
||||
if len(moves) <= 1:
|
||||
if len(moves) == 1 and self.start_y:
|
||||
moves.append(f"G0 F{self.speed_travel} Y{self.start_y} ; Move to start Y\n")
|
||||
# Combine moves into a single G-code string or return a comment if no movement is needed
|
||||
return "".join(moves) if len(moves) > 1 else f";----------[Already at {location_name}, No Moves necessary]\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue