add experimental preference and put arc tolerance in that category

This commit is contained in:
Stewart Allen 2021-02-07 17:53:16 -05:00
commit 5b4d89171d
5 changed files with 22 additions and 11 deletions

View file

@ -53,6 +53,8 @@
* `B` multiple parts with one angled against origin "floats" in preview
* `B` re-add progress calls for all work units
* `B` disable support layer (top/bottom) offsets in belt mode
* `F` arrange should just align down Z. no side to side.
# CAM

View file

@ -139,6 +139,7 @@
let control = settings().controller;
let isDark = control.dark;
control.decals = UI.decals.checked;
control.danger = UI.danger.checked;
control.showOrigin = UI.showOrigin.checked;
control.showRulers = UI.showRulers.checked;
control.autoLayout = UI.autoLayout.checked;
@ -152,7 +153,7 @@
control.exportPreview = UI.exportPreview.checked;
control.decimate = UI.decimate.checked;
SPACE.view.setZoom(control.reverseZoom, control.zoomSpeed);
platform.layout();
// platform.layout();
API.conf.save();
API.platform.update_size();
API.catalog.setOptions({
@ -1372,6 +1373,10 @@
return !isBelt();
}
function isDanger() {
return UI.danger.checked;
}
// MAIN INITIALIZATION FUNCTION
function init_one() {
@ -1597,6 +1602,7 @@
reverseZoom: UC.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
dark: UC.newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}),
decals: UC.newBoolean(LANG.op_decl_s, booleanSave, {title:LANG.op_decl_s}),
danger: UC.newBoolean(LANG.op_dang_s, booleanSave, {title:LANG.op_dang_l}),
lprefs: UC.newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}),
showOrigin: UC.newBoolean(LANG.op_shor_s, booleanSave, {title:LANG.op_shor_l}),
@ -1783,7 +1789,7 @@
outputCoastDist: UC.newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
zHopDistance: UC.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:UC.bound(0,3.0), convert:UC.toFloat, modes:FDM}),
arcTolerance: UC.newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:UC.bound(0,1.0), convert:UC.toFloat, modes:FDM, show:isNotBelt}),
arcTolerance: UC.newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:UC.bound(0,1.0), convert:UC.toFloat, modes:FDM, show:() => { return isDanger() && isNotBelt() }}),
antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
gcodePauseLayers: UC.newInput(LANG.ag_paws_s, {title:LANG.ag_paws_l, modes:FDM, comma:true}),

View file

@ -172,17 +172,17 @@
}
// line angles
let a1 = Math.atan2(pos.Y - center.y, pos.X - center.x);
let a2 = Math.atan2(rec.Y - center.y, rec.X - center.x);
// let a1 = Math.atan2(center.y - pos.Y, center.x - pos.X);
// let a2 = Math.atan2(center.y - rec.Y, center.x - rec.X);
let ad = BASE.util.thetaDiff(a1, a2);
// let a1 = Math.PI - Math.atan2(pos.Y - center.y, pos.X - center.x);
// let a2 = Math.PI - Math.atan2(rec.Y - center.y, rec.X - center.x);
let a1 = Math.PI - Math.atan2(center.y - pos.Y, center.x - pos.X);
let a2 = Math.PI - Math.atan2(center.y - rec.Y, center.x - rec.X);
let ad = BASE.util.thetaDiff(a1, a2, true);
let steps = 20;
let step = (ad > 0.001 ? ad : Math.PI * 2) / steps;
let rot = a1;
let step = (Math.abs(ad) > 0.001 ? ad : Math.PI * 2) / steps;
let rot = a2;
LOG({first: pos, last: rec, center, a1, a2, ad, step, rot, line});
G0G1(false, [`X${center.x}`, `Y${center.y}`, `E1`]);
// G0G1(false, [`X${center.x}`, `Y${center.y}`, `E1`]);
let pc = { X: pos.X, Y: pos.Y };
for (let i=0; i<=steps; i++) {

View file

@ -22,6 +22,7 @@
gcodeLayer = device.gcodeLayer,
gcodeTrack = device.gcodeTrack,
tool = 0,
isDanger = settings.controller.danger,
isBelt = device.bedBelt,
bedType = isBelt ? "belt" : "fixed",
extruder = extruders[tool],
@ -50,7 +51,7 @@
retSpeed = process.outputRetractSpeed * 60,
retDwell = process.outputRetractDwell || 0,
timeDwell = retDwell / 1000,
arcDist = isBelt ? 0 : (process.arcTolerance || 0),
arcDist = isBelt || isDanger ? 0 : (process.arcTolerance || 0),
originCenter = process.outputOriginCenter,
offset = originCenter ? null : {
x: device.bedWidth/2,

View file

@ -124,6 +124,8 @@ kiri.lang['en-us'] = {
op_xprt_l: "show more settings options",
op_decl_s: "decals",
op_decl_l: "show device decals and logos",
op_dang_s: "experimental",
op_dang_l: "show experimental parameters",
op_hopo_s: "hover pop",
op_hopo_l: "enable menu hover\nto activate",
op_dark_s: "dark mode",