setPrintPoint updates ops object. laser flat uses proper max offset. non laser move after laser op ends

This commit is contained in:
Stewart Allen 2022-10-19 14:46:28 -04:00
commit 4f46869ddc
2 changed files with 4 additions and 2 deletions

View file

@ -66,9 +66,11 @@ class OpLaserOff extends CamOp {
}
prepare(ops, progress) {
const { printPoint, zmax, camOut } = ops;
this.op.silent = true;
ops.addGCode(this.op.disable);
ops.setLasering(false);
camOut(printPoint.clone().setZ(zmax), 0);
}
}

View file

@ -150,7 +150,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
}
function setPrintPoint(point) {
printPoint = point;
ops.printPoint = printPoint = point;
}
function setSpindle(speed) {
@ -272,7 +272,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
}
}
if (lasering.flat) {
point.z = lasering.flatz;
point.z = (stock && stock.z ? stock.z : wztop) + lasering.flatz;
}
print.addOutput(layerOut, point, power, speed, tool, 'laser');
} else {