restrict trace output merge when down enabled
This commit is contained in:
parent
bfbcf8fabd
commit
8a3be70bbb
2 changed files with 9 additions and 9 deletions
|
|
@ -1517,7 +1517,7 @@ CAM.init = function(kiri, api) {
|
||||||
thru: UC.newInput(LANG.cc_thru_s, {title:LANG.cc_thru_l, convert:UC.toFloat, units:true}),
|
thru: UC.newInput(LANG.cc_thru_s, {title:LANG.cc_thru_l, convert:UC.toFloat, units:true}),
|
||||||
offover: UC.newInput(LANG.cc_offd_s, {title:LANG.cc_offd_l, convert:UC.toFloat, units:true, show:() => poppedRec.offset !== "none"}),
|
offover: UC.newInput(LANG.cc_offd_s, {title:LANG.cc_offd_l, convert:UC.toFloat, units:true, show:() => poppedRec.offset !== "none"}),
|
||||||
sep: UC.newBlank({class:"pop-sep", modes:MCAM, xshow:zDogSep}),
|
sep: UC.newBlank({class:"pop-sep", modes:MCAM, xshow:zDogSep}),
|
||||||
merge: UC.newBoolean(LANG.co_merg_s, undefined, {title:LANG.co_merg_l}),
|
merge: UC.newBoolean(LANG.co_merg_s, undefined, {title:LANG.co_merg_l, show:() => !popOp.trace.rec.down}),
|
||||||
dogbone: UC.newBoolean(LANG.co_dogb_s, undefined, {title:LANG.co_dogb_l, show:canDogBones}),
|
dogbone: UC.newBoolean(LANG.co_dogb_s, undefined, {title:LANG.co_dogb_l, show:canDogBones}),
|
||||||
revbone: UC.newBoolean(LANG.co_dogr_s, undefined, {title:LANG.co_dogr_l, show:canDogBonesRev}),
|
revbone: UC.newBoolean(LANG.co_dogr_s, undefined, {title:LANG.co_dogr_l, show:canDogBonesRev}),
|
||||||
exp: UC.newExpand("overrides"),
|
exp: UC.newExpand("overrides"),
|
||||||
|
|
|
||||||
|
|
@ -954,7 +954,7 @@ class OpTrace extends CamOp {
|
||||||
async slice(progress) {
|
async slice(progress) {
|
||||||
let { op, state } = this;
|
let { op, state } = this;
|
||||||
let { tool, rate, down, plunge, offset, offover, thru } = op;
|
let { tool, rate, down, plunge, offset, offover, thru } = op;
|
||||||
let { ov_topz, ov_botz, ov_conv } = op;
|
let { ov_conv } = op;
|
||||||
let { settings, widget, addSlices, zThru, tabs, workarea } = state;
|
let { settings, widget, addSlices, zThru, tabs, workarea } = state;
|
||||||
let { updateToolDiams, cutTabs, cutPolys, healPolys, color } = state;
|
let { updateToolDiams, cutTabs, cutPolys, healPolys, color } = state;
|
||||||
let { process, stock } = settings;
|
let { process, stock } = settings;
|
||||||
|
|
@ -976,6 +976,7 @@ class OpTrace extends CamOp {
|
||||||
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(stock.center, stock.x, stock.y) : undefined;
|
||||||
updateToolDiams(toolDiam);
|
updateToolDiams(toolDiam);
|
||||||
|
|
||||||
if (tabs) {
|
if (tabs) {
|
||||||
tabs.forEach(tab => {
|
tabs.forEach(tab => {
|
||||||
tab.off = POLY.expand([tab.poly], toolDiam / 2).flat();
|
tab.off = POLY.expand([tab.poly], toolDiam / 2).flat();
|
||||||
|
|
@ -1137,12 +1138,11 @@ class OpTrace extends CamOp {
|
||||||
}
|
}
|
||||||
output.push(pi);
|
output.push(pi);
|
||||||
}
|
}
|
||||||
}
|
if (!down && op.merge) {
|
||||||
// merge overlapping output to prevent overcuts
|
let nest = POLY.nest(output);
|
||||||
if (op.merge) {
|
let union = POLY.union(nest, 0, true);
|
||||||
let nest = POLY.nest(output);
|
output = POLY.flatten(union, [], true);
|
||||||
let union = POLY.union(nest, 0, true);
|
}
|
||||||
output = POLY.flatten(union, [], true);
|
|
||||||
}
|
}
|
||||||
for (let poly of output) {
|
for (let poly of output) {
|
||||||
followZ(poly);
|
followZ(poly);
|
||||||
|
|
@ -1194,7 +1194,7 @@ class OpPocket extends CamOp {
|
||||||
const debug = false;
|
const debug = false;
|
||||||
let { op, state } = this;
|
let { op, state } = this;
|
||||||
let { tool, rate, down, plunge, expand, contour, smooth, tolerance } = op;
|
let { tool, rate, down, plunge, expand, contour, smooth, tolerance } = op;
|
||||||
let { ov_topz, ov_botz, ov_conv } = op;
|
let { ov_botz, ov_conv } = op;
|
||||||
let { settings, widget, addSlices, zBottom, zThru, tabs, color } = state;
|
let { settings, widget, addSlices, zBottom, zThru, tabs, color } = state;
|
||||||
let { updateToolDiams, cutTabs, healPolys, shadowAt, workarea } = state;
|
let { updateToolDiams, cutTabs, healPolys, shadowAt, workarea } = state;
|
||||||
let { process } = settings;
|
let { process } = settings;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue