diff --git a/release.md b/release.md index eac680c7..b3644aed 100644 --- a/release.md +++ b/release.md @@ -21,6 +21,7 @@ Full docs @ https://docs.grid.space/projects/kiri-moto * add CAM Z bottom visualization, make it relative to stock instead of part * add CAM Z bottom inversion option to flip operator * add CAM custom gcode operator (can be used for pausing, too) +* add CAM z extend option on registration op independent of "Z Thru" global * add optional CAM operation notes (helps with many similar ops) * add option to limit CAM trace ops to Z bottom limit (when in use) * extend url loading of workspaces to all formats diff --git a/src/kiri-mode/cam/client.js b/src/kiri-mode/cam/client.js index 542205d9..47d03d4e 100644 --- a/src/kiri-mode/cam/client.js +++ b/src/kiri-mode/cam/client.js @@ -1153,6 +1153,7 @@ CAM.init = function(kiri, api) { dwell: 'camDrillDwell', lift: 'camDrillLift', feed: 'camRegisterSpeed', + thru: 'camRegisterThru' }).inputs = { tool: UC.newSelect(LANG.cc_tool, {}, "tools"), axis: UC.newSelect(LANG.cd_axis, {}, "regaxis"), @@ -1163,7 +1164,9 @@ CAM.init = function(kiri, api) { down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}), rate: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, units:true}), dwell: UC.newInput(LANG.cd_dwll_s, {title:LANG.cd_dwll_l, convert:UC.toFloat, show:() => poppedRec.axis !== '-'}), - lift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, units:true, show:() => poppedRec.axis !== '-'}) + lift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, units:true, show:() => poppedRec.axis !== '-'}), + sep: UC.newBlank({class:"pop-sep"}), + thru: UC.newInput(LANG.cd_thru_s, {title:LANG.cd_thru_l, convert:UC.toFloat, units:true}), }; createPopOp('flip', { diff --git a/src/kiri-mode/cam/ops.js b/src/kiri-mode/cam/ops.js index ce823143..55175011 100644 --- a/src/kiri-mode/cam/ops.js +++ b/src/kiri-mode/cam/ops.js @@ -1183,7 +1183,7 @@ class OpRegister extends CamOp { o3 = tool.fluteDiameter() * 2, mx = (lx + hx) / 2, my = (ly + hy) / 2, - mz = zThru || 0, + mz = op.thru || zThru || 0, dx = (stock.x - (hx - lx)) / 4, dy = (stock.y - (hy - ly)) / 4, dz = stock.z, diff --git a/src/kiri-mode/cam/slice.js b/src/kiri-mode/cam/slice.js index 67f498eb..f1c4185e 100644 --- a/src/kiri-mode/cam/slice.js +++ b/src/kiri-mode/cam/slice.js @@ -40,7 +40,7 @@ CAM.slice = function(settings, widget, onupdate, ondone) { zBottom = proc.camZBottom - zbOff, zMin = Math.max(bounds.min.z, zBottom), zMax = bounds.max.z, - zThru = zBottom === 0 ? (proc.camZThru || 0) : 0, + zThru = proc.camZBottom ? 0 : (proc.camZThru || 0), zTop = zMax + ztOff, minToolDiam = Infinity, maxToolDiam = -Infinity, diff --git a/src/kiri/conf.js b/src/kiri/conf.js index a29ad62f..9b388362 100644 --- a/src/kiri/conf.js +++ b/src/kiri/conf.js @@ -518,6 +518,7 @@ const conf = exports({ camDrillMark: false, camDrillingOn: false, camRegisterSpeed: 1000, + camRegisterThru: 5, camFlipAxis: "X", camFlipOther: "", // camDrillReg: "none", diff --git a/web/kiri/lang/en.js b/web/kiri/lang/en.js index 69d03d2a..84508a9a 100644 --- a/web/kiri/lang/en.js +++ b/web/kiri/lang/en.js @@ -527,6 +527,8 @@ self.kiri.lang['en-us'] = { cd_lift_l: ["lift between plunges","after dwell period","in workspace units","0 to disable"], cd_regi_s: "register", cd_regi_l: ["drill registration holes","for double-sided parts","independent of enable","drilling but uses same","tool and settings"], + cd_thru_s: "z extend", + cd_thru_l: ["extend downward cut through stock","in workspace units"], cd_mark_s: "marking", cd_mark_l: ["only mark holes, do not drill out","the step down setting is used","to determine how deep to mark"],