From 50d4193d56d73bde14d2a8c4461590cbd094fb70 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 19 Feb 2023 23:51:49 -0500 Subject: [PATCH] fix feed/plung in lathe. update notes --- notes.md | 1 + src/kiri-mode/cam/prepare.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/notes.md b/notes.md index af07ce46..db8a9081 100644 --- a/notes.md +++ b/notes.md @@ -68,6 +68,7 @@ # CAM +* `B` rapid moves should be max of terrain zmax and last cut layer height (roughing) * `B` in indexed stock mode, stock should rotate with indexing * `B` feed rate for next tool set before tool change (push/pop feed rates?) * `B` tab cuts cause loss of direction, parenting, depth, and it's hard to fix diff --git a/src/kiri-mode/cam/prepare.js b/src/kiri-mode/cam/prepare.js index e6a6e4e5..0710ee53 100644 --- a/src/kiri-mode/cam/prepare.js +++ b/src/kiri-mode/cam/prepare.js @@ -168,7 +168,7 @@ function prepEach(widget, settings, print, firstPoint, update) { lastTool = toolID; } feedRate = feed || feedRate; - plungeRate = plunge || plungeRate || feedRate; + plungeRate = Math.min(feedRate, plunge || plungeRate || feedRate); } function setLasering(bool, power = 0) { @@ -392,14 +392,14 @@ function prepEach(widget, settings, print, firstPoint, update) { } // set new plunge rate - if (!lasering && deltaZ < -tolerance) { + if (!lasering && deltaZ < -tolerance && currentOp.type !== 'lathe') { let threshold = Math.min(deltaXY / 2, absDeltaZ), modifier = threshold / absDeltaZ; if (synthPlunge && threshold && modifier && deltaXY > tolerance) { // use modifier to speed up long XY move plunge rates rate = Math.round(plungeRate + ((feedRate - plungeRate) * modifier)); } else { - rate = plungeRate; + rate = Math.min(feedRate, plungeRate); } }