Commit 57ec8866 authored by Lars Kruse's avatar Lars Kruse

add a safety move after each single line of a DropCutter run

* before: just after the whole run - this was not enough for separate lines
parent 1ea4f386
...@@ -81,19 +81,19 @@ class DropCutter(object): ...@@ -81,19 +81,19 @@ class DropCutter(object):
if point is None: if point is None:
# exceeded maxz - the cutter has to skip this point # exceeded maxz - the cutter has to skip this point
path.append((MOVE_SAFETY, None)) path.append((MOVE_SAFETY, None))
continue else:
path.append((MOVE_STRAIGHT, point)) path.append((MOVE_STRAIGHT, point))
# The progress counter may return True, if cancel was requested. # The progress counter may return True, if cancel was requested.
if draw_callback and draw_callback(tool_position=point, if draw_callback and draw_callback(tool_position=point,
toolpath=path): toolpath=path):
quit_requested = True quit_requested = True
break break
# add a move to safety height after each line of moves
path.append((MOVE_SAFETY, None))
progress_counter.increment() progress_counter.increment()
# update progress # update progress
current_line += 1 current_line += 1
if quit_requested: if quit_requested:
break break
if path and not (path[-1][0] == MOVE_SAFETY):
path.append((MOVE_SAFETY, None))
return path return path
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment