disable arc conversion by default, add explicit checkbox to enable, add additional arc checks in preview code path
This commit is contained in:
parent
a8f15e174a
commit
4d0fe0d71c
4 changed files with 10 additions and 5 deletions
|
|
@ -570,7 +570,8 @@ export const conf = {
|
|||
outputInvertY: false,
|
||||
camExpertFast: false,
|
||||
camTrueShadow: false,
|
||||
camArcTolerance: 0.006,
|
||||
camArcEnabled: false,
|
||||
camArcTolerance: 0.15,
|
||||
camArcResolution: 5,
|
||||
camForceZMax: false,
|
||||
camFirstZMax: false,
|
||||
|
|
|
|||
|
|
@ -120,8 +120,9 @@ export function menu() {
|
|||
camExpertFast: newBoolean(LANG.cx_fast_s, onBooleanClick, {title:LANG.cx_fast_l, show: () => !ui.camTrueShadow.checked }),
|
||||
camTrueShadow: newBoolean(LANG.cx_true_s, onBooleanClick, {title:LANG.cx_true_l, show: () => !ui.camExpertFast.checked }),
|
||||
separator: newBlank({ class:"set-sep", driven }),
|
||||
camArcTolerance: newInput(LANG.cx_arct_s, {title:LANG.cx_arct_l, convert:toFloat, units, bound:bound(0,100)}),
|
||||
camArcResolution: newInput(LANG.cx_arcr_s, {title:LANG.cx_arcr_l, convert:toFloat, bound:bound(0,180), show:() => ui.camArcTolerance.value > 0}),
|
||||
camArcEnabled: newBoolean(LANG.cx_arce_s, onBooleanClick, {title:LANG.cx_arce_l}),
|
||||
camArcTolerance: newInput(LANG.cx_arct_s, {title:LANG.cx_arct_l, convert:toFloat, bound:bound(0,100), units, trigger, show:() => ui.camArcEnabled.checked}),
|
||||
camArcResolution: newInput(LANG.cx_arcr_s, {title:LANG.cx_arcr_l, convert:toFloat, bound:bound(0,180), trigger, show:() => ui.camArcEnabled.checked}),
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ export function prepEach(widget, settings, print, firstPoint, update) {
|
|||
engageFactor = process.camFullEngage,
|
||||
arcTolerance = process.camArcTolerance,
|
||||
arcRes = toRadians(process.camArcResolution),
|
||||
arcEnabled = process.camArcEnabled && arcTolerance > 0 && arcRes > 0,
|
||||
tolerance = 0,
|
||||
drillDown = 0,
|
||||
drillLift = 0,
|
||||
|
|
@ -776,7 +777,7 @@ export function prepEach(widget, settings, print, firstPoint, update) {
|
|||
if (indexA == startIndex) {
|
||||
camOut(pointA.clone(), 0, { factor: engageFactor });
|
||||
// if first point, move to and call export function
|
||||
arcQ.push(pointA);
|
||||
if (arcEnabled) arcQ.push(pointA);
|
||||
}
|
||||
lastPoint = arcExport(pointB, pointA);
|
||||
}, !poly.isClosed(), startIndex);
|
||||
|
|
@ -793,7 +794,7 @@ export function prepEach(widget, settings, print, firstPoint, update) {
|
|||
function arcExport(point, lastp) {
|
||||
let dist = lastp ? point.distTo2D(lastp) : 0;
|
||||
if (lastp) {
|
||||
if (dist > lineTolerance && lastp) {
|
||||
if (arcEnabled && dist > lineTolerance && lastp) {
|
||||
let rec = Object.assign(point, { dist });
|
||||
arcQ.push(rec);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue