move to safe Z between ops
This commit is contained in:
parent
cb2fb18dd0
commit
ed1f1ca45a
2 changed files with 8 additions and 2 deletions
|
|
@ -138,13 +138,13 @@ class OpLevel extends CamOp {
|
|||
|
||||
prepare(ops, progress) {
|
||||
let { op, state, lines, stepOver } = this;
|
||||
let { setTool, setSpindle, printPoint } = ops;
|
||||
let { setTool, setSpindle, printPoint, setPrintPoint } = ops;
|
||||
let { polyEmit, newLayer, tip2tipEmit, camOut } = ops;
|
||||
|
||||
setTool(op.tool, op.rate);
|
||||
setSpindle(op.spindle);
|
||||
lines = lines.map(p => { return { first: p.first(), last: p.last(), poly: p } });
|
||||
tip2tipEmit(lines, printPoint, (el, point, count) => {
|
||||
printPoint = tip2tipEmit(lines, printPoint, (el, point, count) => {
|
||||
let poly = el.poly;
|
||||
if (poly.last() === point) {
|
||||
poly.reverse();
|
||||
|
|
@ -153,6 +153,7 @@ class OpLevel extends CamOp {
|
|||
camOut(point.clone(), pidx > 0, stepOver);
|
||||
}, false);
|
||||
});
|
||||
setPrintPoint(printPoint);
|
||||
|
||||
newLayer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -458,6 +458,11 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
update((opSum + (progress * weight)) / opTot, message || op.type(), message);
|
||||
});
|
||||
opSum += weight;
|
||||
if (tool) {
|
||||
newLayer();
|
||||
camOut(printPoint = printPoint.clone().setZ(zmax + zadd + ztOff));
|
||||
newLayer();
|
||||
}
|
||||
}
|
||||
|
||||
function emitTrace(slice) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue