From e3d91fbdc4aed2ed0e73bddf9f9f75c7319ab264 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 17 Nov 2020 00:53:17 -0500 Subject: [PATCH] fix part offset path routing. fix another empty top case --- src/kiri/slicer2.js | 2 +- src/mode/cam/prepare.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kiri/slicer2.js b/src/kiri/slicer2.js index 7e00c746..6ce970e9 100644 --- a/src/kiri/slicer2.js +++ b/src/kiri/slicer2.js @@ -268,7 +268,7 @@ } const haslines = lines.length || opt.emptyok; - const hastops = !opt.genso || retn.tops.length || opt.notopok; + const hastops = !opt.genso || opt.notopok || (retn.tops && retn.tops.length); if (opt.each && haslines && hastops) { opt.each(retn, index, total, UTIL.time() - mark); diff --git a/src/mode/cam/prepare.js b/src/mode/cam/prepare.js index a22aa4e7..2fab8ed9 100644 --- a/src/mode/cam/prepare.js +++ b/src/mode/cam/prepare.js @@ -258,10 +258,10 @@ if ((bigXY || bigZ) && (isMove || midZ)) { let maxz = getZClearPath( terrain, - lastPoint.x, - lastPoint.y, - point.x, - point.y, + lastPoint.x - wmx, + lastPoint.y - wmy, + point.x - wmx, + point.y - wmy, Math.max(point.z, lastPoint.z), zadd, maxToolDiam/2,