fix trace recontour by making it a negative down option

This commit is contained in:
Stewart Allen 2025-09-06 22:53:11 -04:00
commit 46724db7bf

View file

@ -38,7 +38,7 @@ class OpTrace extends CamOp {
let cutdir = ov_conv; let cutdir = ov_conv;
let polys = []; let polys = [];
let reContour = false; let reContour = false;
let canRecontour = offset !== 'none' && down === 0; let canRecontour = offset !== 'none' && down < 0;
let stockRect = stock.center && stock.x && stock.y ? let stockRect = stock.center && stock.x && stock.y ?
newPolygon().centerRectangle({x:0,y:0}, stock.x, stock.y) : undefined; newPolygon().centerRectangle({x:0,y:0}, stock.x, stock.y) : undefined;
updateToolDiams(toolDiam); updateToolDiams(toolDiam);
@ -57,6 +57,7 @@ class OpTrace extends CamOp {
let max = Math.max(...zs); let max = Math.max(...zs);
if (max - min > 0.0001 && canRecontour) { if (max - min > 0.0001 && canRecontour) {
reContour = true; reContour = true;
down = 0;
} }
} }
if (false) newSliceOut(0).output() if (false) newSliceOut(0).output()