fix colors and layer first shadow

This commit is contained in:
Stewart Allen 2025-12-06 00:26:57 -05:00
commit a4ab9288ac
2 changed files with 4 additions and 4 deletions

View file

@ -190,7 +190,7 @@ class OpArea extends CamOp {
.setLayer("tool shadow", { line: 0x44ff88 }, false) .setLayer("tool shadow", { line: 0x44ff88 }, false)
.addPolys(tool_shadow); .addPolys(tool_shadow);
layers layers
.setLayer(rename ?? "clear", { line: 0x88ff00 }, false) .setLayer(rename ?? "clear", { line: color }, false)
.addPolys(outs); .addPolys(outs);
// of the last output still cuts, we need an escape // of the last output still cuts, we need an escape
if (z === zs.peek()) { if (z === zs.peek()) {
@ -232,7 +232,7 @@ class OpArea extends CamOp {
zroc += zinc; zroc += zinc;
progress(proc + (pinc * zroc), 'trace'); progress(proc + (pinc * zroc), 'trace');
layers layers
.setLayer(rename ?? "trace", { line: 0x88ff00 }, false) .setLayer(rename ?? "trace", { line: color }, false)
.addPolys(outs); .addPolys(outs);
} }
proc += pinc; proc += pinc;
@ -314,7 +314,7 @@ class OpArea extends CamOp {
if (op.refine) path.refine(op.refine); if (op.refine) path.refine(op.refine);
surface.push(path); surface.push(path);
newLayer().output() newLayer().output()
.setLayer(rename ?? "linear", { line: 0x00ff00 }, false) .setLayer(rename ?? "linear", { line: color }, false)
.addPolys([ path ]); .addPolys([ path ]);
} }

View file

@ -579,7 +579,7 @@ export function prepare_one(widget, settings, print, firstPoint, update) {
depthData.push(polys); depthData.push(polys);
} else { } else {
// if not depth first, output the polys in slice order // if not depth first, output the polys in slice order
setTravelBoundary(shadow); setTravelBoundary(slice.tool_shadow.clone(true));
poly2polyEmit(polys, printPoint, polyEmit, { swapdir: false }); poly2polyEmit(polys, printPoint, polyEmit, { swapdir: false });
newLayer(); newLayer();
} }