From a221f8b8aee12c93ae9f97c8e98fe8c656b0ed79 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 21 Feb 2018 15:46:01 -0500 Subject: [PATCH] add kfactor gcode subsitution --- js/kiri-driver-fdm.js | 3 ++- js/kiri.js | 6 ++++++ js/license.js | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/kiri-driver-fdm.js b/js/kiri-driver-fdm.js index 823843ee..aff1edcb 100644 --- a/js/kiri-driver-fdm.js +++ b/js/kiri-driver-fdm.js @@ -406,7 +406,8 @@ var gs_kiri_fdm = exports; left: offset ? 0 : -device.bedWidth/2, right: offset ? device.bedWidth : device.bedWidth/2, bottom: offset ? 0 : -device.bedDepth/2, - z_max: device.maxHeight + z_max: device.maxHeight, + kfactor: process.gcodeKFactor || 0 }, seekMMM = process.outputSeekrate * 60, retDist = process.outputRetractDist, diff --git a/js/kiri.js b/js/kiri.js index 5d115381..164f292e 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -101,6 +101,7 @@ self.kiri.license = exports.LICENSE; outputCooling: 1, // detectThinWalls: 1, antiBacklash: 1, + gcodeKFactor: 1, outputClockwise: 1, outputOriginCenter: 1, outputInvertX: 1, @@ -309,6 +310,7 @@ self.kiri.license = exports.LICENSE; outputFinishFactor: 0, detectThinWalls: false, antiBacklash: 2, + gcodeKFactor: 0, outputCooling: true, // --- LASER --- @@ -2505,6 +2507,10 @@ self.kiri.license = exports.LICENSE; 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.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}) + + gcodeVars: UC.newGroup("gcode", null, {modes:FDM}), + gcodeKFactor: UC.newInput("k-factor", {title: "aka linear advance\nuse {kfactor} in gcode", convert:UC.toInt, modes:FDM}), + }); function toolUpdate(a,b,c) { diff --git a/js/license.js b/js/license.js index bb9ff828..27f5d0c4 100644 --- a/js/license.js +++ b/js/license.js @@ -1,7 +1,7 @@ var exports = { COPYRIGHT:"Copyright (C) 2014-2017 Stewart Allen - All Rights Reserved", LICENSE:"Unauthorized copying, modification and re-distribution are strictly prohibited without prior written consent.", - VERSION:"1.1.01" + VERSION:"1.1.2" }; if (!module) var module = {}; module.exports = exports;