diff --git a/src/kiri/render.js b/src/kiri/render.js index 74cd9e1a..e09d5298 100644 --- a/src/kiri/render.js +++ b/src/kiri/render.js @@ -193,6 +193,9 @@ } } else { cur.paths.push({ index, faces, z: poly.getZ() }); + if (opts.color) { + cur.cpath = [ Object.assign({ start: 0, count: Infinity }, opts.color) ]; + } } this.stats.contour++; }); diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index 8f0dc52c..1f7bc46c 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -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 });