allow drill to obey zBottom
This commit is contained in:
parent
fb150f64e7
commit
1cc271ab25
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue