fix first poly out color. eliminate dup poly out

This commit is contained in:
Stewart Allen 2020-11-09 10:51:32 -05:00
commit e6f4382b30
2 changed files with 5 additions and 2 deletions

View file

@ -419,6 +419,7 @@
// in cam mode, these are drilling or dwell ops
return;
}
// if (out.point && out.speed && out.emit) console.log((out.speed || -1).toFixed(2));
if (lastOut) {
const op = out.point, lp = lastOut.point,
moved = (op.x !== lp.x) || (op.y !== lp.y) || (op.z !== lp.z);;
@ -453,11 +454,10 @@
lastOut = out;
});
if (lastOut.emit) {
pushPrint(lastOut.tool, current)
// pushPrint(lastOut.tool, current)
} else {
moves.push(current);
}
output
.setLayer('move', moveColor, true)
.addPolys(moves, { thin: true, z: opts.z });