fix first poly out color. eliminate dup poly out
This commit is contained in:
parent
0c0046b1c5
commit
e6f4382b30
2 changed files with 5 additions and 2 deletions
|
|
@ -193,6 +193,9 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cur.paths.push({ index, faces, z: poly.getZ() });
|
cur.paths.push({ index, faces, z: poly.getZ() });
|
||||||
|
if (opts.color) {
|
||||||
|
cur.cpath = [ Object.assign({ start: 0, count: Infinity }, opts.color) ];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.stats.contour++;
|
this.stats.contour++;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -419,6 +419,7 @@
|
||||||
// in cam mode, these are drilling or dwell ops
|
// in cam mode, these are drilling or dwell ops
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// if (out.point && out.speed && out.emit) console.log((out.speed || -1).toFixed(2));
|
||||||
if (lastOut) {
|
if (lastOut) {
|
||||||
const op = out.point, lp = lastOut.point,
|
const op = out.point, lp = lastOut.point,
|
||||||
moved = (op.x !== lp.x) || (op.y !== lp.y) || (op.z !== lp.z);;
|
moved = (op.x !== lp.x) || (op.y !== lp.y) || (op.z !== lp.z);;
|
||||||
|
|
@ -453,11 +454,10 @@
|
||||||
lastOut = out;
|
lastOut = out;
|
||||||
});
|
});
|
||||||
if (lastOut.emit) {
|
if (lastOut.emit) {
|
||||||
pushPrint(lastOut.tool, current)
|
// pushPrint(lastOut.tool, current)
|
||||||
} else {
|
} else {
|
||||||
moves.push(current);
|
moves.push(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
output
|
output
|
||||||
.setLayer('move', moveColor, true)
|
.setLayer('move', moveColor, true)
|
||||||
.addPolys(moves, { thin: true, z: opts.z });
|
.addPolys(moves, { thin: true, z: opts.z });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue