From 405136df79238fb7e83c315b0c30fe4313ce20fd Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 10 Oct 2017 15:38:47 -0400 Subject: [PATCH] add absolute extrusion for flashforge finder. increase max zoom out --- js/kiri-driver-fdm.js | 9 ++++++--- js/kiri.js | 6 ++++++ js/license.js | 2 +- js/moto-space.js | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/js/kiri-driver-fdm.js b/js/kiri-driver-fdm.js index 72117aca..2e3a6c97 100644 --- a/js/kiri-driver-fdm.js +++ b/js/kiri-driver-fdm.js @@ -353,9 +353,12 @@ var gs_kiri_fdm = exports; } if (typeof newpos.e === 'number') { outputLength += newpos.e; - o.append(" E").append(UTIL.round(newpos.e,decimals)); - // for flashforge finder that uses cumulative extruder position - // o.append(" E").append(UTIL.round(outputLength, decimals)); + if (device.extrudeAbs) { + // for flashforge finder that uses cumulative extruder position + o.append(" E").append(UTIL.round(outputLength, decimals)); + } else { + o.append(" E").append(UTIL.round(newpos.e,decimals)); + } } if (rate && rate != pos.f) { o.append(" F").append(Math.round(rate)); diff --git a/js/kiri.js b/js/kiri.js index 28cab6c9..945858a4 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -30,6 +30,7 @@ self.kiri.license = exports.LICENSE; bedDepth: 1, bedHeight: 1, maxHeight: 1, + extrudeAbs: 1, filamentSize: 1, nozzleSize: 1, gcodePre: 1, @@ -2050,6 +2051,7 @@ self.kiri.license = exports.LICENSE; setDeviceDepth: UC.newInput("bed depth", {title:"millimeters", convert:UC.toInt}), setDeviceHeight: UC.newInput("max height", {title:"max build height\nin millimeters", convert:UC.toInt, modes:FDM}), setDeviceMaxSpindle: UC.newInput("max spindle rpm", {title:"max spindle speed\n0 to disable", convert:UC.toInt, modes:CAM}), + setDeviceExtrusion: UC.newBoolean("extrusion absolute", onBooleanClick, {title:"extrusion moves absolute"}), setDeviceOrigin: UC.newBoolean("origin center", onBooleanClick, {title:"bed origin center"}), setDeviceOriginTop: UC.newBoolean("origin top", onBooleanClick, {title:"part z origin top", modes:CAM}), @@ -2697,6 +2699,7 @@ self.kiri.license = exports.LICENSE; filament_diameter: parseFloat(UI.setDeviceFilament.value) || 1.75, origin_center: UI.setDeviceOrigin.checked, origin_top: UI.setDeviceOriginTop.checked, + extrude_abs: UI.setDeviceExtrusion.checked, spindle_max: parseInt(UI.setDeviceMaxSpindle.value) || 0 }, cmd: { @@ -2733,6 +2736,7 @@ self.kiri.license = exports.LICENSE; maxHeight: valueOf(set.build_height, 150), nozzleSize: valueOf(set.nozzle_size, 0.4), filamentSize: valueOf(set.filament_diameter, 1.75), + extrudeAbs: valueOf(set.extrude_abs, false), spindleMax: valueOf(set.spindle_max, 0), gcodeFan: valueOf(cmd.fan_power, ''), gcodeTrack: valueOf(cmd.progress, ''), @@ -2758,6 +2762,7 @@ self.kiri.license = exports.LICENSE; UI.setDeviceWidth.value = dev.bedWidth; UI.setDeviceDepth.value = dev.bedDepth; UI.setDeviceHeight.value = dev.maxHeight; + UI.setDeviceExtrusion.checked = dev.extrudeAbs; UI.setDeviceOrigin.checked = proc.outputOriginCenter; // FDM UI.setDeviceFan.value = dev.gcodeFan; @@ -2780,6 +2785,7 @@ self.kiri.license = exports.LICENSE; UI.setDeviceDepth, UI.setDeviceWidth, UI.setDeviceHeight, + UI.setDeviceExtrusion, UI.setDeviceOrigin, UI.setDeviceOriginTop, UI.setDeviceFan, diff --git a/js/license.js b/js/license.js index 3d67e0b6..0f48fbed 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.0.62" + VERSION:"1.0.63" }; if (!module) var module = {}; module.exports = exports; diff --git a/js/moto-space.js b/js/moto-space.js index 21231650..f9c250e1 100644 --- a/js/moto-space.js +++ b/js/moto-space.js @@ -158,7 +158,7 @@ var gs_moto_space = exports; function setPlatformSize(width, depth, height) { platform.scale.set(width || 300, depth || 175, height || 5); - viewControl.maxDistance = Math.max(width,depth) * 2; + viewControl.maxDistance = Math.max(width,depth) * 4; updatePlatformPosition(); var y = Math.max(width, height) * 1; light1.position.set( width, y, depth);