From 6246f34e7a969d0a25dfa04787d462aa81c453c3 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sat, 4 May 2019 09:56:21 -0400 Subject: [PATCH] change from short factor to min speed --- js/kiri-print.js | 5 ++--- js/kiri.js | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/js/kiri-print.js b/js/kiri-print.js index 1904de07..bef3b4ec 100644 --- a/js/kiri-print.js +++ b/js/kiri-print.js @@ -426,11 +426,10 @@ var gs_kiri_print = exports; var options = options || {}, process = this.settings.process, shortDist = process.outputShortDistance, - shortFact = process.outputShortFactor, shellMult = options.extrude || process.outputShellMult, printSpeed = options.rate || process.outputFeedrate, - shortSpeed = printSpeed * shortFact, moveSpeed = process.outputSeekrate, + minSpeed = process.outputMinSpeed, closest = poly.findClosestPointTo(startPoint), perimeter = poly.perimeter(), first = true, @@ -440,7 +439,7 @@ var gs_kiri_print = exports; // if short, use calculated print speed based on sliding scale if (perimeter < process.outputShortPoly) { - printSpeed = shortSpeed + (printSpeed - shortSpeed) * (perimeter / process.outputShortPoly); + printSpeed = minSpeed + (printSpeed - minSpeed) * (perimeter / process.outputShortPoly); } poly.forEachPoint(function(point, pos, points, count) { diff --git a/js/kiri.js b/js/kiri.js index f971c621..32fca101 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -95,7 +95,7 @@ self.kiri.license = exports.LICENSE; outputBrimCount: 1, outputBrimOffset: 1, outputShortPoly: 1, - outputShortFactor: 1, + outputMinSpeed: 1, outputCoastDist: 1, outputWipeDistance: 1, sliceMinHeight: 1, @@ -317,8 +317,8 @@ self.kiri.license = exports.LICENSE; outputRetractDwell: 30, outputBrimCount: 2, outputBrimOffset: 2, - outputShortPoly: 30.0, - outputShortFactor: 0.2, + outputShortPoly: 50.0, + outputMinSpeed: 15.0, outputCoastDist: 0, outputWipeDistance: 0, sliceMinHeight: 0, @@ -2607,13 +2607,13 @@ self.kiri.license = exports.LICENSE; outputRetractDist: UC.newInput("retract dist", {title:"amount to retract filament\nfor long moves. in millimeters", convert:UC.toFloat, modes:FDM}), outputRetractSpeed: UC.newInput("retract rate", {title:"speed of filament\nretraction in mm/s", convert:UC.toInt, modes:FDM}), outputRetractDwell: UC.newInput("engage dwell", {title:"time between re-engaging\nfilament and movement\nin milliseconds", convert:UC.toInt, modes:FDM}), - outputShortPoly: UC.newInput("short outline", {title:"poly perimeter length\ntriggers short slowdown\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}), sliceShellSpacing: UC.newInput("shell spacing", {title:"as a percentage of nozzle width\n< 1.0 causes shell overlap\nrecommended 0.85 - 1.0", convert:UC.toFloat, bound:UC.bound(0.5,1.0), modes:FDM}), outputCoastDist: UC.newInput("shell coast", {title:"non-printing end\nof perimeter shells\nin millimeters", bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM}), // outputWipeDistance: UC.newInput("wipe", {title:"non-printing move at\close of polygon\nin millimeters", bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM}), sliceSolidMinArea: UC.newInput("min solid", {title:"minimum area (mm^2)\nrequired to keep solid\nmust be > 0.1", convert:UC.toFloat, modes:FDM}), sliceMinHeight: UC.newInput("min layer", {title: "enables adaptive slicing with\nthis as the min layer height\nin millimeters\n0 to disable", bound:UC.bound(0,3.0), convert:UC.toFloat, modes:FDM}), + outputMinSpeed: UC.newInput("min speed", {title:"minimum speed\nfor short segments", bound:UC.bound(5,200), convert:UC.toFloat, modes:FDM}), + outputShortPoly: UC.newInput("slow poly", {title:"polygons shorter than this\nwill have their print speed\nscaled down to min speed\nin millimeters", bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM}), zHopDistance: UC.newInput("z hop dist", {title: "amount to raise z\non retraction moves\nin millimeters\n0 to disable", bound:UC.bound(0,3.0), convert:UC.toFloat, 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})