diff --git a/js/kiri-print.js b/js/kiri-print.js index bd286906..8b0cc355 100644 --- a/js/kiri-print.js +++ b/js/kiri-print.js @@ -645,7 +645,7 @@ var gs_kiri_print = exports; // anti-backlash on longer move if (antiBacklash && dist > retractDist) { - addOutput(preout, p1.add({x:2,y:-2,z:0}), 0, moveSpeed); + addOutput(preout, p1.add({x:antiBacklash,y:-antiBacklash,z:0}), 0, moveSpeed); } // bridge ends of fill when they're close together diff --git a/js/kiri.js b/js/kiri.js index 6e4f1568..80a737bc 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -308,7 +308,7 @@ self.kiri.license = exports.LICENSE; outputShortFactor: 0.2, outputFinishFactor: 0, detectThinWalls: false, - antiBacklash: false, + antiBacklash: 2, outputCooling: true, // --- LASER --- @@ -2496,7 +2496,7 @@ self.kiri.license = exports.LICENSE; outputShortDistance: UC.newInput("short segment", {title:"segment length cutoff\nfor short segments\nin millimeters", bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM}), outputShortFactor: UC.newInput("short factor", {title:"max speed reduction factor\nfor short segments\nas % of print speed", bound:UC.bound(0.05,1), convert:UC.toFloat, modes:FDM}), outputFinishFactor: UC.newInput("finish factor", {title:"% of nozzle diameter to\nshorten finish path by\nvalues of 0-1", bound:UC.bound(0.0,1), convert:UC.toFloat, modes:FDM}), - antiBacklash: UC.newBoolean("anti-backlash", onBooleanClick, {title: "use micro-movements to cancel\nbacklash during fills", modes:FDM}), + antiBacklash: UC.newInput("anti-backlash", {title: "use micro-movements to cancel\nbacklash during fills\nin millimeters", bound:UC.bound(0,3), convert:UC.toInt, modes:FDM}), //detectThinWalls: UC.newBoolean("thin wall fill", onBooleanClick, {title: "detect and fill thin openings\nbetween shells walls", modes:FDM}) }); diff --git a/js/moto-ui.js b/js/moto-ui.js index b689e494..2e4451ef 100644 --- a/js/moto-ui.js +++ b/js/moto-ui.js @@ -87,6 +87,7 @@ var gs_moto_ui = exports; function toInt() { var nv = this.value !== '' ? parseInt(this.value) : null; + if (isNaN(nv)) nv = 0; if (nv !== null && this.bound) nv = this.bound(nv); this.value = nv; return nv; @@ -101,6 +102,7 @@ var gs_moto_ui = exports; function bound(low,high) { return function(v) { + if (isNaN(v)) return low; return v < low ? low : v > high ? high : v; }; }