disable contour bridging (faulty). only show max angle option when curves only selected as it is only operative in this mode
This commit is contained in:
parent
5a2f64cd38
commit
5e6a33ef69
4 changed files with 5 additions and 10 deletions
|
|
@ -1312,12 +1312,12 @@ CAM.init = function(kiri, api) {
|
|||
rate: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
step: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,10.0)}),
|
||||
angle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90)}),
|
||||
leave: UC.newInput(LANG.cf_leav_s, {title:LANG.cf_leav_l, convert:UC.toFloat, bound:UC.bound(0,100)}),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
angle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90), show:(op) => op.inputs.curves.checked}),
|
||||
flatness: UC.newInput(LANG.ou_flat_s, {title:LANG.ou_flat_l, convert:UC.toFloat, bound:UC.bound(0,1.0), units:true, round:4}),
|
||||
tolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0,10.0), units:true, round:4}),
|
||||
bridging: UC.newInput(LANG.ou_brdg_s, {title:LANG.ou_brdg_l, convert:UC.toFloat, bound:UC.bound(0,1000.0), units:true, round:4, show:(op) => op.inputs.curves.checked}),
|
||||
// bridging: UC.newInput(LANG.ou_brdg_s, {title:LANG.ou_brdg_l, convert:UC.toFloat, bound:UC.bound(0,1000.0), units:true, round:4, show:(op) => op.inputs.curves.checked}),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
curves: UC.newBoolean(LANG.cf_curv_s, undefined, {title:LANG.cf_curv_l}),
|
||||
inside: UC.newBoolean(LANG.cf_olin_s, undefined, {title:LANG.cf_olin_l}),
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,6 @@ class OpTrace extends CamOp {
|
|||
case "outside": offdist = traceOffset; break;
|
||||
case "inside": offdist = -traceOffset; break;
|
||||
}
|
||||
console.log({ offdist });
|
||||
if (offdist) {
|
||||
let pnew = POLY.offset([poly], offdist, { minArea: 0 });
|
||||
if (pnew) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ class Topo {
|
|||
toolOffset = tool.generateProfile(resolution).profile,
|
||||
toolDiameter = tool.fluteDiameter(),
|
||||
toolStep = toolDiameter * contour.step,
|
||||
traceJoin = toolDiameter / 2,
|
||||
leave = contour.leave || 0,
|
||||
maxangle = contour.angle,
|
||||
curvesOnly = contour.curves,
|
||||
|
|
@ -525,7 +524,7 @@ class Trace {
|
|||
latent = newP;
|
||||
} else {
|
||||
if (Math.abs(dz) < flatness) {
|
||||
if (curvesOnly && (trace.last() || lastP).distTo2D(newP) >= bridge) {
|
||||
if (curvesOnly) {
|
||||
end_poly();
|
||||
} else {
|
||||
latent = newP;
|
||||
|
|
@ -539,11 +538,8 @@ class Trace {
|
|||
// maxangle
|
||||
const dv = contourX ? Math.abs(lastP.x - x) : Math.abs(lastP.y - y);
|
||||
const angle = Math.atan2( Math.abs(dz), dv) * RAD2DEG;
|
||||
// if (lastP.z < 0.1) console.log('pp', {dz, dxy, angle});
|
||||
// console.log({ angle, maxangle, dz });
|
||||
if (angle > maxangle) {
|
||||
end_poly();
|
||||
return;
|
||||
}
|
||||
}
|
||||
trace.push(newP);
|
||||
|
|
|
|||
Loading…
Reference in a new issue