allow drill to obey zBottom

This commit is contained in:
Stewart Allen 2026-01-20 09:49:34 -05:00
commit 1cc271ab25

View file

@ -13,8 +13,7 @@ class OpDrill extends CamOp {
async slice(progress) { async slice(progress) {
let { op, state } = this; let { op, state } = this;
let { settings, addSlices, widget, updateToolDiams } = state; let { color, settings, addSlices, widget, updateToolDiams, zBottom } = state;
let { color } = state;
let { drills } = op let { drills } = op
let drillTool = new Tool(settings, op.tool), let drillTool = new Tool(settings, op.tool),
@ -39,6 +38,10 @@ class OpDrill extends CamOp {
} }
drill.zBottom = drill.z - drill.depth; drill.zBottom = drill.z - drill.depth;
// honor zBottom when set
if (zBottom) drill.zBottom = Math.max(zBottom, drill.zBottom);
// for thru holes, follow z thru when set // for thru holes, follow z thru when set
if ((op.thru > 0)) { if ((op.thru > 0)) {
drill.zBottom -= op.thru; drill.zBottom -= op.thru;