diff --git a/src/Mod/CAM/Path/Op/Vcarve.py b/src/Mod/CAM/Path/Op/Vcarve.py index 6d92417ca4..68604c7d20 100644 --- a/src/Mod/CAM/Path/Op/Vcarve.py +++ b/src/Mod/CAM/Path/Op/Vcarve.py @@ -164,7 +164,7 @@ def generateVirtualBackTrackEdges(positionHistory, nextEdge, tolerance) -> list: to follow them without lifting toolbit. This approach makes carving a lot of faster. """ - if not positionHistory: + if not positionHistory or len(positionHistory) < 2: return [] backTrackEdges = [] @@ -591,6 +591,8 @@ class ObjectVcarve(PathEngraveBase.ObjectOp): # but using some routing logic we may avoid raising CNC toolbit and using G0 # and instead traverse back already carved edges at full speed + backtrack_edges = generateVirtualBackTrackEdges(positionHistory, wire[0], obj.Tolerance) + edge_list = backtrack_edges + wire e = edge_list[0]