Merge pull request #376 from GridSpace/clipToBug

make bounding recs 0-based
This commit is contained in:
Josiah Hamm 2025-05-24 13:56:47 -06:00 • committed by GitHub
commit 3a637343fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -657,7 +657,7 @@ class OpOutline extends CamOp {
} }
if (process.camStockClipTo && stock.x && stock.y && stock.center) { if (process.camStockClipTo && stock.x && stock.y && stock.center) {
let rect = newPolygon().centerRectangle(stock.center, stock.x, stock.y); let rect = newPolygon().centerRectangle({x:0,y:0}, stock.x, stock.y);
offset = cutPolys([rect], offset, slice.z, true); offset = cutPolys([rect], offset, slice.z, true);
} }
@ -1000,7 +1000,7 @@ class OpTrace extends CamOp {
let cutdir = ov_conv; let cutdir = ov_conv;
let polys = []; let polys = [];
let stockRect = stock.center && stock.x && stock.y ? let stockRect = stock.center && stock.x && stock.y ?
newPolygon().centerRectangle(stock.center, stock.x, stock.y) : undefined; newPolygon().centerRectangle({x:0,y:0}, stock.x, stock.y) : undefined;
updateToolDiams(toolDiam); updateToolDiams(toolDiam);
if (tabs) { if (tabs) {