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:
Stewart Allen 2023-01-19 12:42:46 -05:00
commit 5e6a33ef69
4 changed files with 5 additions and 10 deletions

View file

@ -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}),

View file

@ -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) {

View file

@ -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);

View file

@ -443,7 +443,7 @@ self.kiri.lang['en-us'] = {
cc_spnd_s: "spindle rpm",
cc_spnd_l: ["spindle speed in","revolutions / minute"],
cc_sovr_s: "step over",
cc_sovr_l: ["a fraction of tool diameter between 0 and 1. values greater than 0.49 may result in uncut areas from acute angle offsets or undesirable artifacts when contour is enabled."],
cc_sovr_l: ["a fraction of tool diameter between 0 and 1. values greater than 0.49 may result in uncut areas from acute angle offsets or undesirable artifacts when contouring."],
cc_sdwn_s: "step down",
cc_sdwn_l: ["step down depth","for each pass","in workspace units","0 to disable"],
cc_thru_s: "cut thru",
@ -509,7 +509,7 @@ self.kiri.lang['en-us'] = {
// CNC CONTOUR
cn_menu: "contour",
cf_angl_s: "max angle",
cf_angl_l: ["angles greater than this","are considered vertical"],
cf_angl_l: ["changes in z that result in angles greater than this are considered vertical and omitted from curves"],
cf_leav_s: "leave stock",
cf_leav_l: ["amount of stock to leave above part surface"],
cf_botm_s: "z bottom",