extend zthru to drilling registration holes
This commit is contained in:
parent
b9597cc096
commit
0086ae1713
1 changed files with 6 additions and 4 deletions
|
|
@ -1011,7 +1011,7 @@
|
||||||
const camShellPolys = shellRough = shellOutline = facePolys = camShell.gatherTopPolys([]);
|
const camShellPolys = shellRough = shellOutline = facePolys = camShell.gatherTopPolys([]);
|
||||||
|
|
||||||
if (procDrillReg) {
|
if (procDrillReg) {
|
||||||
sliceDrillReg(settings, widget, sliceAll);
|
sliceDrillReg(settings, widget, sliceAll, zThru);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (procDrill) {
|
if (procDrill) {
|
||||||
|
|
@ -1183,12 +1183,14 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function sliceDrillReg(settings, widget, output) {
|
// drill registration holes
|
||||||
|
function sliceDrillReg(settings, widget, output, zThru) {
|
||||||
let proc = settings.process,
|
let proc = settings.process,
|
||||||
bounds = settings.bounds,
|
|
||||||
stock = settings.stock,
|
stock = settings.stock,
|
||||||
|
bounds = settings.bounds,
|
||||||
mx = (bounds.max.x + bounds.min.x) / 2,
|
mx = (bounds.max.x + bounds.min.x) / 2,
|
||||||
my = (bounds.max.y + bounds.min.y) / 2,
|
my = (bounds.max.y + bounds.min.y) / 2,
|
||||||
|
mz = zThru || 0,
|
||||||
dx = (stock.x - (bounds.max.x - bounds.min.x)) / 4,
|
dx = (stock.x - (bounds.max.x - bounds.min.x)) / 4,
|
||||||
dy = (stock.y - (bounds.max.y - bounds.min.y)) / 4,
|
dy = (stock.y - (bounds.max.y - bounds.min.y)) / 4,
|
||||||
dz = stock.z,
|
dz = stock.z,
|
||||||
|
|
@ -1210,7 +1212,7 @@
|
||||||
points.forEach(point => {
|
points.forEach(point => {
|
||||||
polys.push(newPolygon()
|
polys.push(newPolygon()
|
||||||
.append(point.clone().setZ(bounds.max.z))
|
.append(point.clone().setZ(bounds.max.z))
|
||||||
.append(point.clone().setZ(bounds.max.z - stock.z)));
|
.append(point.clone().setZ(bounds.max.z - stock.z - mz)));
|
||||||
});
|
});
|
||||||
slice.camMode = CPRO.DRILL;
|
slice.camMode = CPRO.DRILL;
|
||||||
slice.addTop(null).traces = polys;
|
slice.addTop(null).traces = polys;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue