diff --git a/src/kiri/core/conf.js b/src/kiri/core/conf.js index bdb2e8a9..df2e16bd 100644 --- a/src/kiri/core/conf.js +++ b/src/kiri/core/conf.js @@ -610,7 +610,7 @@ export const conf = { camZBottom: 0, camZClearance: 1, camZOffset: 0, - camZThru: 0, + // camZThru: 0, camZTop: 0, op2: [], // flip ops ops: [], // current ops diff --git a/src/kiri/mode/cam/init-menu.js b/src/kiri/mode/cam/init-menu.js index 114506b8..f179aa7b 100644 --- a/src/kiri/mode/cam/init-menu.js +++ b/src/kiri/mode/cam/init-menu.js @@ -120,7 +120,7 @@ export function menu() { camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units}), camZTop: newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:toFloat, units, trigger}), camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, units, trigger}), - camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units }), + // camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units }), camZClearance: newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:toFloat, bound:bound(0.01,100), units }), separator: newBlank({ class:"set-sep", driven }), camFastFeed: newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:toFloat, units}), diff --git a/src/kiri/mode/cam/op-area.js b/src/kiri/mode/cam/op-area.js index 309de7e9..a8de9e1c 100644 --- a/src/kiri/mode/cam/op-area.js +++ b/src/kiri/mode/cam/op-area.js @@ -36,7 +36,7 @@ class OpArea extends CamOp { let toolDiam = areaTool.fluteDiameter(); let toolOver = areaTool.getStepSize(over); let zTop = workarea.top_z; - let zBottom = Math.max(workarea.bottom_z, workarea.bottom_part); + let zBottom = workarea.bottom_z; let shadowBase = state.shadow.base; let thruHoles = state.shadow.holes; let roundSharps = settings.process.camRoundCorners; diff --git a/src/kiri/mode/cam/op-register.js b/src/kiri/mode/cam/op-register.js index 2742526b..d9c5d85c 100644 --- a/src/kiri/mode/cam/op-register.js +++ b/src/kiri/mode/cam/op-register.js @@ -14,7 +14,7 @@ class OpRegister extends CamOp { async slice(progress) { let { op, state } = this; - let { addSlices, bounds, color, settings, widget, zThru } = state; + let { addSlices, bounds, color, settings, widget } = state; let { updateToolDiams } = state; let tool = new Tool(settings, op.tool); @@ -33,7 +33,7 @@ class OpRegister extends CamOp { toolOffset = tool.fluteDiameter() * 2, centerX = (boundMinX + boundMaxX) / 2, centerY = (boundMinY + boundMaxY) / 2, - cutDepth = op.thru || zThru || 0, + cutDepth = op.thru || 0, pathPoints = [], stockToSurfaceOffset = stock.z - bounds.max.z, startZ = bounds.max.z + stockToSurfaceOffset + toolZ, diff --git a/src/kiri/mode/cam/slice.js b/src/kiri/mode/cam/slice.js index d1fd4dfd..cc75cc08 100644 --- a/src/kiri/mode/cam/slice.js +++ b/src/kiri/mode/cam/slice.js @@ -52,9 +52,9 @@ export async function cam_slice(settings, widget, onupdate, ondone) { let axisRotation, axisIndex, bounds, dark, color, stock, tabs, track, tool, unsafe, units, workarea, camZTop, camZBottom, camZThru, minToolDiam, maxToolDiam, - bottom_gap, bottom_part, bottom_stock, bottom_thru, bottom_z, + bottom_gap, bottom_part, bottom_stock, bottom_z, top_stock, top_part, top_gap, top_z, - zBottom, zMin, zMax, zThru, zTop, + zBottom, zMin, zMax, zTop, ztOff, zbOff, wztop; axisRotation = axisIndex = undefined; @@ -108,15 +108,13 @@ export async function cam_slice(settings, widget, onupdate, ondone) { zBottom = isIndexed ? camZBottom : camZBottom - zbOff; zMin = isIndexed ? bounds.min.z : Math.max(bounds.min.z, zBottom); zMax = bounds.max.z; - zThru = camZThru; zTop = zMax + ztOff; bottom_gap = zbOff; bottom_part = 0; bottom_stock = -bottom_gap; - bottom_thru = zThru; bottom_z = isIndexed ? zBottom : Math.max( - (camZBottom ? bottom_stock + camZBottom : bottom_part) - bottom_thru, - (camZBottom ? bottom_stock + camZBottom : bottom_stock - bottom_thru) + (camZBottom ? bottom_stock + camZBottom : bottom_part), + (camZBottom ? bottom_stock + camZBottom : bottom_stock) ); top_stock = zTop; top_part = zMax; @@ -124,7 +122,7 @@ export async function cam_slice(settings, widget, onupdate, ondone) { top_z = camZTop ? bottom_stock + camZTop : top_stock; workarea = util.round({ top_stock, top_part, top_gap, top_z, - bottom_stock, bottom_part, bottom_gap, bottom_z + bottom_stock, bottom_part, bottom_gap, bottom_z, }, 3); // console.log({ bounds, stock, track, workarea }); @@ -205,7 +203,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) { widget, zBottom, zMax, - zThru, ztOff, zTop }; @@ -354,9 +351,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) { if (ov_botz) { workover.bottom_z = isIndexed ? ov_botz : bottom_stock + ov_botz; } - if (-zThru > workover.bottom_z) { - alert("Z Thru should be below Z Bottom"); - } if (valz.tool) { tool = new Tool(settings, valz.tool); } @@ -368,7 +362,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) { stock, tool, zBottom, - zThru, ztOff, zMax, zTop, diff --git a/web/kiri/lang/en.js b/web/kiri/lang/en.js index 0bde72f2..df0ca88f 100644 --- a/web/kiri/lang/en.js +++ b/web/kiri/lang/en.js @@ -808,8 +808,8 @@ self.lang['en-us'] = { ou_zbot_l: ["offset from stock bottom","to limit cutting depth","in workspace units"], ou_zclr_s: "z clearance", ou_zclr_l: ["safe travel offset","from top of part","in workspace units"], - ou_ztru_s: "z thru", - ou_ztru_l: ["extend cutout pass down","in workspace units"], + // ou_ztru_s: "z thru", + // ou_ztru_l: ["extend cutout pass down","in workspace units"], ou_depf_s: "depth first", ou_depf_l: ["optimize pocket cuts","with depth priority"], ou_inrf_s: "inner first",