checkpoint sla work

This commit is contained in:
Stewart Allen 2020-04-13 17:42:40 -04:00
commit 1e98f81cc6
14 changed files with 643 additions and 486 deletions

View file

@ -124,4 +124,16 @@
return this.split('').reverse().join(''); return this.split('').reverse().join('');
}; };
/** ******************************************************************
* Object static helpers
******************************************************************* */
Object.clone = function(o) {
return o ? JSON.parse(JSON.stringify(o)) : o;
};
Math.bound = function(val,min,max) {
return Math.max(min,Math.min(max,val));
};
})(); })();

View file

@ -6,11 +6,12 @@ let gs_kiri_conf = exports;
(function() { (function() {
if (!self.kiri) self.kiri = { }; if (!self.kiri) self.kiri = {};
if (self.kiri.conf) return; if (self.kiri.conf) return;
let KIRI = self.kiri, let KIRI = self.kiri,
CVER = 185; CVER = 185,
clone = Object.clone;
function genID() { function genID() {
while (true) { while (true) {
@ -19,37 +20,47 @@ let gs_kiri_conf = exports;
} }
} }
// add fields to o(bject) from t(arget) that are missing // add fields to o(bject) from d(efault) that are missing
// remove fields from o(bject) that don't exist in f(ilter) // remove fields from o(bject) that don't exist in d(efault)
function fill_cull(o, t, f) { function fill_cull_once(obj, def) {
if (!o) return; if (!obj) return;
// add missing // add missing
for (let k in t) { for (let k in def) {
if (!t.hasOwnProperty(k)) { if (def.hasOwnProperty(k)) {
continue; let okv = obj[k];
} if ((okv === undefined || okv === null)) {
let okv = o[k];
if (f[k] !== undefined && (okv === undefined || okv === null)) {
// console.log({fill: k}); // console.log({fill: k});
o[k] = t[k]; obj[k] = def[k];
}
} }
} }
// remove invalid // remove invalid
for (let k in o) { for (let k in obj) {
if (!o.hasOwnProperty(k)) { if (!def.hasOwnProperty(k)) {
continue;
}
if (!f.hasOwnProperty(k)) {
// console.log({cull: k}); // console.log({cull: k});
delete o[k]; delete obj[k];
} }
} }
} }
function fill_cull_many(map, def) {
forValues(map, (obj) => { fill_cull_once(obj, def) });
}
function objectMap(o, fn) {
for (let [key, val] of Object.entries(o)) {
o[key] = fn(val) || val;
}
}
function valueOf(val, dv) { function valueOf(val, dv) {
return typeof(val) !== 'undefined' ? val : dv; return typeof(val) !== 'undefined' ? val : dv;
} }
function forValues(o, fn) {
Object.values(o).forEach(v => fn(v));
}
function device_v1_to_v2(device) { function device_v1_to_v2(device) {
if (device && device.filamentSize) { if (device && device.filamentSize) {
device.extruders = [{ device.extruders = [{
@ -74,6 +85,8 @@ let gs_kiri_conf = exports;
set = code.settings || {}, set = code.settings || {},
ext = code.extruders; ext = code.extruders;
// currently causes unecessary fills and culls because
// it's not mode and device type sensitive
let device = { let device = {
mode: mode || code.mode || '', mode: mode || code.mode || '',
internal: 0, internal: 0,
@ -106,7 +119,7 @@ let gs_kiri_conf = exports;
if (ext) { if (ext) {
// synthesize extruders from new style settings // synthesize extruders from new style settings
ext.forEach(rec => { ext.forEach(rec => {
let e = API.clone(CONF.template.device.extruders[0]); let e = API.clone(CONF.defaults.fdm.d.extruders[0]);
if (rec.nozzle) e.extNozzle = rec.nozzle; if (rec.nozzle) e.extNozzle = rec.nozzle;
if (rec.filament) e.extFilament = rec.filament; if (rec.filament) e.extFilament = rec.filament;
if (rec.offset_x) e.extOffsetX = rec.offset_x; if (rec.offset_x) e.extOffsetX = rec.offset_x;
@ -116,7 +129,7 @@ let gs_kiri_conf = exports;
}); });
} else { } else {
// synthesize extruders from old style settings // synthesize extruders from old style settings
device.extruders = [API.clone(CONF.template.device.extruders[0])]; device.extruders = [API.clone(CONF.defaults.fdm.d.extruders[0])];
device.extruders[0].extNozzle = valueOf(set.nozzle_size, 0.4); device.extruders[0].extNozzle = valueOf(set.nozzle_size, 0.4);
device.extruders[0].extFilament = valueOf(set.filament_diameter, 1.75); device.extruders[0].extFilament = valueOf(set.filament_diameter, 1.75);
} }
@ -124,36 +137,14 @@ let gs_kiri_conf = exports;
return device; return device;
} }
function objectMap(o, fn) {
for (let [key, val] of Object.entries(o)) {
o[key] = fn(val) || val;
}
}
function forValues(o, fn) {
Object.values(o).forEach(v => fn(v));
}
// ensure settings structure is up-to-date // ensure settings structure is up-to-date
function normalize(settings) { function normalize(settings) {
let API = KIRI.api, let API = KIRI.api,
filter = CONF.filter, defaults = CONF.defaults,
defaults = CONF.template, template = CONF.template,
filter_dev = filter.fdm.d, mode = settings.mode.toLowerCase(),
filter_pro = filter.fdm.p; default_dev = defaults[mode].d,
default_pro = defaults[mode].p;
switch (settings.mode) {
case 'FDM':
break;
case 'CAM':
filter_dev = filter.cam.d;
filter_pro = filter.cam.p;
break;
case 'LASER':
filter_dev = filter.laser.d;
filter_pro = filter.laser.p;
break;
}
// v1 to v2 changed FDM extruder / nozzle / filament structure // v1 to v2 changed FDM extruder / nozzle / filament structure
if (settings.ver != CVER) { if (settings.ver != CVER) {
@ -167,22 +158,22 @@ let gs_kiri_conf = exports;
settings.ver = CVER; settings.ver = CVER;
} }
fill_cull(settings, defaults, defaults); fill_cull_once(settings, template);
fill_cull(settings.device, defaults.device, filter_dev); fill_cull_once(settings.device, default_dev);
fill_cull(settings.process, defaults.process, filter_pro); fill_cull_once(settings.process, default_pro);
fill_cull(settings.cdev.FDM, defaults.device, filter.fdm.d); fill_cull_once(settings.cdev, template.cdev);
forValues(settings.sproc.FDM, proc => { fill_cull_once(settings.cproc, template.cproc);
fill_cull(proc, defaults.process, filter.fdm.p); fill_cull_once(settings.sproc, template.sproc);
}); fill_cull_once(settings.defaults, template.defaults);
fill_cull(settings.cdev.CAM, defaults.device, filter.cam.d); fill_cull_once(settings.cdev.FDM, defaults.fdm.d);
forValues(settings.sproc.CAM, proc => { fill_cull_once(settings.cdev.SLA, defaults.sla.d);
fill_cull(proc, defaults.process, filter.cam.p); fill_cull_once(settings.cdev.CAM, defaults.cam.d);
}); fill_cull_once(settings.cdev.LASER, defaults.laser.d);
fill_cull(settings.cdev.LASER, defaults.device, filter.laser.d); fill_cull_many(settings.sproc.FDM, defaults.fdm.p);
forValues(settings.sproc.LASER, proc => { fill_cull_many(settings.sproc.SLA, defaults.sla.p);
fill_cull(proc, defaults.process, filter.laser.p); fill_cull_many(settings.sproc.CAM, defaults.cam.p);
}); fill_cull_many(settings.sproc.LASER, defaults.laser.p);
fill_cull(settings.controller, defaults.controller, defaults.controller); fill_cull_once(settings.controller, template.controller);
return settings; return settings;
} }
@ -194,283 +185,37 @@ let gs_kiri_conf = exports;
// --------------- // ---------------
MODES: { MODES: {
FDM: 1, // fused deposition modeling (also FFF) FDM: 1, // fused deposition modeling (also FFF)
LASER: 2, // laser cutting LASER: 2, // laser cutters
CAM: 3 // 3 axis milling/machining CAM: 3, // 3 axis milling/machining
SLA: 4 // cured resin printers
}, },
VIEWS: { VIEWS: {
ARRANGE: 1, ARRANGE: 1,
SLICE: 2, SLICE: 2,
PREVIEW: 3 PREVIEW: 3
}, },
// --------------- settings field filters // --------------- device and process defaults
filter: { defaults: {
fdm:{ fdm:{
// fields permitted in FDM:Device // device defaults FDM:Device
d:{ d:{
mode: 1, mode: "",
internal: 1, internal: 0,
bedWidth: 1, bedWidth: 300,
bedDepth: 1, bedDepth: 175,
bedHeight: 1, bedHeight: 2.5,
bedRound: 1, bedRound: false,
maxHeight: 1, originCenter: false,
extrudeAbs: 1, maxHeight: 150,
originCenter: 1, gcodePre: [],
gcodePre: 1, gcodePost: [],
gcodePost: 1, gcodePause: [],
gcodeProc: 1, gcodeProc: "",
gcodePause: 1, gcodeFan: "",
gcodeFExt: 1, gcodeTrack: "",
gcodeFan: 1, gcodeLayer: [],
gcodeTrack: 1, gcodeFExt: "",
gcodeLayer: 1, extruders:[{
extruders: 1
},
// fields permitted in FDM:Process
p:{
processName: 1,
sliceHeight: 1,
sliceShells: 1,
sliceFillAngle: 1,
sliceFillOverlap: 1,
sliceFillSparse: 1,
sliceFillType: 1,
sliceSupportEnable: 1,
sliceSupportDensity: 1,
sliceSupportOffset: 1,
sliceSupportGap: 1,
sliceSupportSize: 1,
sliceSupportArea: 1,
sliceSupportExtra: 1,
sliceSupportSpan: 1,
sliceSupportNozzle: 1,
sliceSolidMinArea: 1,
sliceSolidLayers: 1,
sliceBottomLayers: 1,
sliceTopLayers: 1,
firstSliceHeight: 1,
firstLayerRate: 1,
firstLayerFillRate: 1,
firstLayerPrintMult: 1,
firstLayerNozzleTemp: 1,
firstLayerBedTemp: 1,
outputRaft: 1,
outputRaftSpacing: 1,
outputTemp: 1,
outputFanMax: 1,
outputBedTemp: 1,
outputFeedrate: 1,
outputFinishrate: 1,
outputSeekrate: 1,
outputShellMult: 1,
outputFillMult: 1,
outputSparseMult: 1,
outputFanLayer: 1,
outputRetractDist: 1,
outputRetractSpeed: 1,
outputRetractDwell: 1,
outputBrimCount: 1,
outputBrimOffset: 1,
outputShortPoly: 1,
outputMinSpeed: 1,
outputCoastDist: 1,
outputWipeDistance: 1,
sliceMinHeight: 1,
// detectThinWalls: 1,
antiBacklash: 1,
zHopDistance: 1,
// polishLayers: 1,
// polishSpeed: 1,
outputLayerRetract: 1,
gcodePauseLayers: 1,
outputClockwise: 1,
outputOriginCenter: 1,
outputInvertX: 1,
outputInvertY: 1
}
},
cam:{
// fields permitted in CAM:Device
d:{
mode: 1,
internal: 1,
bedWidth: 1,
bedDepth: 1,
bedHeight: 1,
originCenter: 1,
spindleMax: 1,
gcodePre: 1,
gcodePost: 1,
gcodeDwell: 1,
gcodeChange: 1,
gcodeSpindle: 1,
gcodeFExt: 1,
gcodeSpace: 1,
gcodeStrip: 1
},
// fields permitted in CAM:Process
p:{
processName: 1,
camFastFeed: 1,
roughingTool: 1,
roughingSpindle: 1,
roughingDown: 1,
roughingOver: 1,
roughingSpeed: 1,
roughingPlunge: 1,
roughingStock: 1,
camPocketOnlyRough: 1,
roughingOn: 1,
finishingTool: 1,
finishingSpindle: 1,
finishingDown: 1,
finishingOver: 1,
finishingAngle: 1,
finishingSpeed: 1,
finishingPlunge: 1,
finishingOn: 1,
finishingXOn: 1,
finishingYOn: 1,
finishCurvesOnly: 1,
camPocketOnlyFinish: 1,
drillTool: 1,
drillSpindle: 1,
drillDownSpeed: 1,
drillDown: 1,
drillDwell: 1,
drillLift: 1,
drillingOn: 1,
camTabsAngle: 1,
camTabsCount: 1,
camTabsWidth: 1,
camTabsHeight: 1,
camTabsOn: 1,
camPocketOnly: 1,
camDepthFirst: 0,
camEaseDown: 1,
camOriginTop: 1,
camTolerance: 1,
camZTopOffset: 1,
camZBottom: 1,
camZClearance: 1,
camStockX: 1,
camStockY: 1,
camStockZ: 1,
camStockOffset: 1,
outputClockwise: 1,
outputOriginCenter: 1,
outputInvertX: 1,
outputInvertY: 1
}
},
laser: {
// fields permitted in Laser:Device
d:{
mode: 1,
internal: 1,
bedWidth: 1,
bedDepth: 1,
bedHeight: 1,
gcodePre: 1,
gcodePost: 1,
gcodeFExt: 1,
gcodeSpace: 1,
gcodeLaserOn: 1,
gcodeLaserOff: 1
},
// fields permitted in Laser:Process
p:{
processName: 1,
laserOffset: 1,
laserSliceHeight: 1,
laserSliceSingle: 1,
outputTileSpacing: 1,
outputTileScaling: 1,
outputLaserPower: 1,
outputLaserSpeed: 1,
outputLaserGroup: 1,
outputLaserMerged: 1,
outputOriginBounds: 1,
outputOriginCenter: 1,
outputInvertX: 1,
outputInvertY: 1
}
}
},
// --------------- default settings
template: {
// CAM only
bounds: {},
origin: {},
stock: {},
tools:[
{
id: 1000,
number: 1,
type: "endmill",
name: "end 1/4",
metric: false,
shaft_diam: 0.25,
shaft_len: 1,
flute_diam: 0.25,
flute_len: 2,
// taper_angle: 70,
taper_tip: 0,
},
{
id: 1001,
number: 2,
type: "endmill",
name: "end 1/8",
metric: false,
shaft_diam: 0.125,
shaft_len: 1,
flute_diam: 0.125,
flute_len: 1.5,
// taper_angle: 70,
taper_tip: 0,
},
{
id: 1002,
number: 3,
type: "endmill",
name: "end 1/16",
metric: false,
shaft_diam: 0.0625,
shaft_len: 1,
flute_diam: 0.0625,
flute_len: 1.5,
// taper_angle: 70,
taper_tip: 0,
}
],
// FDM/CAM/Laser merged
device:{
mode: "", // device local
internal: 0, // device edit state
bedWidth: 300, // FDM/CAM/Laser
bedDepth: 175, // FDM/CAM/Laser
bedHeight: 2.5, // display only (deprecate)
bedRound: false, // FDM
originCenter: false,// FDM/CAM
maxHeight: 150, // FDM
spindleMax: 0, // CAM
gcodePre: [], // FDM/CAM header script
gcodePost: [], // FDM/CAM footer script
gcodePause: [], // FDM pause script
gcodeProc: "", // FDM post processor script (encoding, etc)
gcodeFan: "", // FDM fan command
gcodeTrack: "", // FDM progress command
gcodeLayer: [], // FDM layer output
gcodeFExt: "", // CAM file extension
gcodeSpace: true, // CAM token spacing
gcodeStrip: true, // CAM strip comments
gcodeDwell: ["G4 P{time}"], // CAM dwell script
gcodeChange: ["M6 T{tool}"], // CAM tool change script
gcodeSpindle: ["M3 S{speed}"], // CAM spindle speed
gcodeLaserOn: ["M106 S{power}"],// LASER turn on
gcodeLaserOff: ["M107"], // LASER turn off
extruders:[{ // FDM extruders structure
extFilament: 1.75, extFilament: 1.75,
extNozzle: 0.4, extNozzle: 0.4,
extSelect: ["T0"], extSelect: ["T0"],
@ -478,16 +223,9 @@ let gs_kiri_conf = exports;
extOffsetY: 0 extOffsetY: 0
}] }]
}, },
// FDM/CAM/Laser merged // process defaults FDM:Process
process:{ p:{
// --- shared ---
processName: "default", processName: "default",
outputOriginBounds: true,
outputOriginCenter: true,
outputInvertX: false,
outputInvertY: false,
// --- FDM ---
sliceHeight: 0.25, sliceHeight: 0.25,
sliceShells: 3, sliceShells: 3,
sliceFillAngle: 45, sliceFillAngle: 45,
@ -538,23 +276,60 @@ let gs_kiri_conf = exports;
detectThinWalls: false, detectThinWalls: false,
antiBacklash: 1, antiBacklash: 1,
zHopDistance: 0.2, zHopDistance: 0.2,
// polishLayers: 0,
// polishSpeed: 40,
outputLayerRetract: false, outputLayerRetract: false,
gcodePauseLayers: "", gcodePause: "",
outputOriginCenter: true,
// --- LASER --- outputInvertX: false,
laserOffset: 0.25, outputInvertY: false,
laserSliceHeight: 1, }
laserSliceSingle: false, },
outputTileSpacing: 1, sla:{
outputTileScaling: 1, // device defaults SLA:Device
outputLaserPower: 100, d:{
outputLaserSpeed: 1000, mode: "",
outputLaserGroup: true, internal: 0,
outputLaserMerged: false, bedWidth: 150,
bedDepth: 150,
// --- CAM --- bedHeight: 2.5,
maxHeight: 150,
originCenter: false
},
// process defaults SLA:Process
p:{
processName: "default",
slaSlice: 0.05,
slaSupportEnable: false,
slaSupportDensity: 0.5,
slaSupportSize: 2,
slaSupportArea: 1,
slaSupportSpan: 2,
slaSolidLayers: 5,
slaBottomLayers: 5,
slaTopLayers: 5
}
},
cam:{
// device defaults CAM:Device
d:{
mode: "",
internal: 0,
bedWidth: 300,
bedDepth: 175,
bedHeight: 2.5,
originCenter: false,
spindleMax: 0,
gcodePre: [],
gcodePost: [],
gcodeFExt: "",
gcodeSpace: true,
gcodeStrip: true,
gcodeDwell: ["G4 P{time}"],
gcodeChange: ["M6 T{tool}"],
gcodeSpindle: ["M3 S{speed}"]
},
// process defaults CAM:Process
p:{
processName: "default",
camFastFeed: 6000, camFastFeed: 6000,
roughingTool: 1000, roughingTool: 1000,
roughingSpindle: 1000, roughingSpindle: 1000,
@ -602,40 +377,129 @@ let gs_kiri_conf = exports;
camStockZ: 0, camStockZ: 0,
camStockOffset: true, camStockOffset: true,
outputClockwise: false, outputClockwise: false,
outputOriginCenter: true,
outputInvertX: false,
outputInvertY: false
}
}, },
// current process name laser: {
// device defaults Laser:Device
d:{
mode: "",
internal: 0,
bedWidth: 300,
bedDepth: 175,
bedHeight: 2.5,
gcodePre: [],
gcodePost: [],
gcodeFExt: "",
gcodeSpace: true,
gcodeLaserOn: ["M106 S{power}"],
gcodeLaserOff: ["M107"]
},
// process defaults Laser:Process
p:{
processName: "default",
laserOffset: 0.25,
laserSliceHeight: 1,
laserSliceSingle: false,
outputTileSpacing: 1,
outputTileScaling: 1,
outputLaserPower: 100,
outputLaserSpeed: 1000,
outputLaserGroup: true,
outputLaserMerged: false,
outputOriginCenter: true,
outputInvertX: false,
outputInvertY: false
}
}
},
// --------------- settings template
template: {
// CAM only
bounds: {},
origin: {},
stock: {},
tools:[
{
id: 1000,
number: 1,
type: "endmill",
name: "end 1/4",
metric: false,
shaft_diam: 0.25,
shaft_len: 1,
flute_diam: 0.25,
flute_len: 2,
// taper_angle: 70,
taper_tip: 0,
},
{
id: 1001,
number: 2,
type: "endmill",
name: "end 1/8",
metric: false,
shaft_diam: 0.125,
shaft_len: 1,
flute_diam: 0.125,
flute_len: 1.5,
// taper_angle: 70,
taper_tip: 0,
},
{
id: 1002,
number: 3,
type: "endmill",
name: "end 1/16",
metric: false,
shaft_diam: 0.0625,
shaft_len: 1,
flute_diam: 0.0625,
flute_len: 1.5,
// taper_angle: 70,
taper_tip: 0,
}
],
// currently selected device
device:{},
// currently selected process
process:{},
// current process name by mode
cproc:{ cproc:{
FDM: "default", FDM: "default",
SLA: "default",
CAM: "default", CAM: "default",
LASER: "default" LASER: "default"
}, },
// saved processes by name // stored processes by mode
sproc:{ sproc:{
FDM: {}, FDM: {},
SLA: {},
CAM: {}, CAM: {},
LASER: {} LASER: {}
}, },
// cached device settings by mode // current device name by mode
cdev: {
FDM: null,
CAM: null,
LASER: null
},
// now they're called devices instead of gcode filters
filter:{ filter:{
FDM: "Any.Generic.Marlin", FDM: "Any.Generic.Marlin",
SLA: "Any.Generic.SLA",
CAM: "Any.Generic.Grbl", CAM: "Any.Generic.Grbl",
LASER: "Any.Generic.Laser" LASER: "Any.Generic.Laser"
}, },
// custom devices by name // stored device by mode
devices:{ cdev: {
}, FDM: null,
// favorite devices SLA: null,
favorites:{ CAM: null,
LASER: null
}, },
// custom devices by name (all modes)
devices:{},
// favorited devices (all modes)
favorites:{},
// map of device to last process setting (name) // map of device to last process setting (name)
devproc: { devproc: {},
},
layers:{ layers:{
layerOutline: true, layerOutline: true,
layerTrace: true, layerTrace: true,
@ -652,9 +516,6 @@ let gs_kiri_conf = exports;
layerPrint: false, layerPrint: false,
layerMoves: false layerMoves: false
}, },
// for passing temporary slice hints (topo currently)
synth: {
},
controller:{ controller:{
view: null, view: null,
dark: false, dark: false,
@ -668,13 +529,26 @@ let gs_kiri_conf = exports;
alignTop: true, alignTop: true,
units: "mm" units: "mm"
}, },
// widget extra info for slicing (like extruder mapping) // for passing temporary slice hints (topo currently)
widget: { synth: {},
}, // widget extra info for slicing (extruder mapping)
widget: {},
mode: 'FDM', mode: 'FDM',
id: genID(), id: genID(),
ver: CVER ver: CVER
} }
}; };
let settings = CONF.template;
// seed defaults. will get culled on save
settings.sproc.FDM.default = clone(settings.process);
settings.sproc.SLA.default = clone(settings.process);
settings.sproc.CAM.default = clone(settings.process);
settings.sproc.LASER.default = clone(settings.process);
settings.cdev.FDM = clone(settings.device);
settings.cdev.SLA = clone(settings.device);
settings.cdev.CAM = clone(settings.device);
settings.cdev.LASER = clone(settings.device);
})(); })();

226
js/kiri-driver-sla.js Normal file
View file

@ -0,0 +1,226 @@
/** Copyright 2014-2019 Stewart Allen -- All Rights Reserved */
"use strict";
let gs_kiri_sla = exports;
(function() {
if (!self.kiri) self.kiri = { };
if (!self.kiri.driver) self.kiri.driver = { };
if (self.kiri.driver.SLA) return;
let KIRI = self.kiri,
BASE = self.base,
DBUG = BASE.debug,
UTIL = BASE.util,
CONF = BASE.config,
POLY = BASE.polygons,
SLA = KIRI.driver.SLA = {
slice,
printSetup,
printExport
},
SLICER = KIRI.slicer,
newPoint = BASE.newPoint;
/**
* DRIVER SLICE CONTRACT
*
* @param {Object} settings
* @param {Widget} Widget
* @param {Function} onupdate (called with % complete and optional message)
* @param {Function} ondone (called when complete with an array of Slice objects)
*/
function slice(settings, widget, onupdate, ondone) {
let process = settings.process,
device = settings.device;
SLICER.sliceWidget(widget, { height: sliceHeight }, onSliceDone, onSliceUpdate);
function onSliceUpdate(update) {
return onupdate(0.0 + update * 0.5);
}
function onSliceDone(slices) {
widget.slices = slices;
if (!slices) return;
// calculate % complete and call onupdate()
function doupdate(index, from, to, msg) {
onupdate(0.5 + (from + ((index/slices.length) * (to-from))) * 0.5, msg);
}
// for each slice, performe a function and call doupdate()
function forSlices(from, to, fn, msg) {
slices.forEach(function(slice) {
fn(slice);
doupdate(slice.index, from, to, msg)
});
}
// report slicing complete
ondone();
}
};
/**
* DRIVER PRINT CONTRACT
*
* @param {Object} print state object
* @param {Function} update incremental callback
*/
function printSetup(print, update) {
let widgets = print.widgets,
settings = print.settings,
device = settings.device,
process = settings.process,
output = print.output,
bounds = settings.bounds,
printPoint = newPoint(0,0,0);
// increment layer count until no widget has remaining slices
for (;;) {
// create list of mesh slice arrays with their platform offsets
for (meshIndex = 0; meshIndex < widgets.length; meshIndex++) {
let mesh = widgets[meshIndex].mesh;
if (!mesh.widget) {
continue;
}
let mslices = mesh.widget.slices;
if (mslices && mslices[layer]) {
slices.push({slice:mslices[layer], offset:mesh.position});
}
}
// exit if no slices
if (slices.length === 0) {
break;
}
// track purge blocks generated for each layer
let track = extruders.slice();
let lastOut;
let lastExt;
// iterate over layer slices, find closest widget, print, eliminate
for (;;) {
closest = null;
mindist = Infinity;
let order = [];
// select slices of the same extruder type first then distance
for (meshIndex = 0; meshIndex < slices.length; meshIndex++) {
sliceEntry = slices[meshIndex];
if (sliceEntry) {
find = sliceEntry.slice.findClosestPointTo(printPoint.sub(sliceEntry.offset));
if (find) {
let ext = sliceEntry.slice.extruder;
let lex = lastOut ? lastOut.extruder : ext;
let dst = Math.abs(find.distance);
if (ext !== lex) dst *= 10000;
order.push({dst,sliceEntry,meshIndex});
}
}
}
order.sort((a,b) => {
return a.dst - b.dst;
});
if (order.length) {
let find = order.shift();
closest = find.sliceEntry;
minidx = find.meshIndex;
}
if (!closest) {
if (sliceEntry) lastOut = sliceEntry.slice;
break;
}
// retract between widgets
if (layerout.length && minidx !== lastIndex) {
layerout.last().retract = true;
}
layerout.height = layerout.height || closest.slice.height;
slices[minidx] = null;
closest.offset.z = zoff;
// detect extruder change and print purge block
if (!lastOut || lastOut.extruder !== closest.slice.extruder) {
printPoint = purge(closest.slice.extruder, track, layerout, printPoint, closest.slice.z);
}
// output seek to start point between mesh slices if previous data
printPoint = print.slicePrintPath(
closest.slice,
printPoint.sub(closest.offset),
closest.offset,
layerout,
{ first: closest.slice.index === 0 }
);
lastOut = closest.slice;
lastExt = lastOut.ext
lastIndex = minidx;
}
// if a declared extruder isn't used in a layer, use selected
// extruder to fill the relevant purge blocks for later support
track.forEach(ext => {
if (ext) {
printPoint = purge(ext.extruder, track, layerout, printPoint, lastOut.z, lastExt);
}
});
// if layer produced output, append to output array
if (layerout.length) output.append(layerout);
// notify progress
layerout.layer = layer++;
update(layer / maxLayers);
// retract after last layer
if (layer === maxLayers && layerout.length) {
layerout.last().retract = true;
}
slices = [];
layerout = [];
lastOut = undefined;
}
};
/**
* DRIVER PRINT CONTRACT
*
* @returns {Array} gcode lines
*/
function printExport(print, online) {
let layers = print.output,
settings = print.settings,
device = settings.device,
process = settings.process,
append,
output = [];
if (online) {
append = function(line) {
if (line) {
output.append(line);
}
if (!line || output.length > 1000) {
online(output.join("\n"));
output = [];
}
};
} else {
append = function(line) {
if (!line) return;
output.append(line);
}
}
// print.distance = emitted;
// print.lines = lines;
// print.bytes = bytes + lines - 1;
// print.time = time;
return online ? null : output.join("\n");
};
})();

View file

@ -30,13 +30,14 @@ var gs_kiri_init = exports;
SPACE = KIRI.space, SPACE = KIRI.space,
STATS = API.stats, STATS = API.stats,
DEG = Math.PI/180, DEG = Math.PI/180,
ALL = [MODES.FDM, MODES.LASER, MODES.CAM], ALL = [MODES.FDM, MODES.LASER, MODES.CAM, MODES.SLA],
CAM = [MODES.CAM], CAM = [MODES.CAM],
FDM = [MODES.FDM], FDM = [MODES.FDM],
FDM_CAM = [MODES.CAM,MODES.FDM], FDM_CAM = [MODES.CAM,MODES.FDM],
FDM_LASER = [MODES.LASER,MODES.FDM], FDM_LASER = [MODES.LASER,MODES.FDM],
CAM_LASER = [MODES.LASER,MODES.CAM], CAM_LASER = [MODES.LASER,MODES.CAM],
LASER = [MODES.LASER], LASER = [MODES.LASER],
GCODE = [MODES.FDM, MODES.LASER, MODES.CAM],
CATALOG = API.catalog, CATALOG = API.catalog,
platform = API.platform, platform = API.platform,
selection = API.selection, selection = API.selection,
@ -637,6 +638,7 @@ var gs_kiri_init = exports;
console.log({error:e, device:code, devicename}); console.log({error:e, device:code, devicename});
API.show.alert(`invalid or deprecated device: "${devicename}"`, 10); API.show.alert(`invalid or deprecated device: "${devicename}"`, 10);
API.show.alert(`please select a new device`, 10); API.show.alert(`please select a new device`, 10);
throw e;
showDevices(); showDevices();
} }
API.function.clear(); API.function.clear();
@ -1157,7 +1159,7 @@ var gs_kiri_init = exports;
UI.extNext = UC.newButton(">") UI.extNext = UC.newButton(">")
]], {modes:FDM, expert:true}), ]], {modes:FDM, expert:true}),
gcode: UC.newGroup(LANG.dv_gr_gco, $('device'), {group:"dgco", nocompact:true}), gcode: UC.newGroup(LANG.dv_gr_gco, $('device'), {group:"dgco", nocompact:true, modes:GCODE}),
gcodeFan: UC.newInput(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, size:"40%", text:true}), gcodeFan: UC.newInput(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, size:"40%", text:true}),
gcodeTrack: UC.newInput(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, size:"40%", text:true}), gcodeTrack: UC.newInput(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, size:"40%", text:true}),
gcodeLayer: UC.newText(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, size:14, height: 2}), gcodeLayer: UC.newText(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, size:14, height: 2}),
@ -1170,14 +1172,17 @@ var gs_kiri_init = exports;
gcodePause: UC.newText(LANG.dv_paus_s, {title:LANG.dv_paus_l, modes:FDM, size:14, height:3}), gcodePause: UC.newText(LANG.dv_paus_s, {title:LANG.dv_paus_l, modes:FDM, size:14, height:3}),
gcodeLaserOn: UC.newText(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, size:14, height:3}), gcodeLaserOn: UC.newText(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, size:14, height:3}),
gcodeLaserOff: UC.newText(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, size:14, height:3}), gcodeLaserOff: UC.newText(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, size:14, height:3}),
gcodePre: UC.newText(LANG.dv_head_s, {title:LANG.dv_head_l, modes:ALL, size:14, height:3}), gcodePre: UC.newText(LANG.dv_head_s, {title:LANG.dv_head_l, modes:GCODE, size:14, height:3}),
gcodePost: UC.newText(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:ALL, size:14, height:3}), gcodePost: UC.newText(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:GCODE, size:14, height:3}),
mode: UC.newGroup(LANG.mo_menu, assets, {region:"left"}), mode: UC.newGroup(LANG.mo_menu, assets, {region:"left"}),
modeTable: UC.newTableRow([ modeTable: UC.newTableRow([
[ [
UI.modeFDM = UI.modeFDM =
UC.newButton(LANG.mo_fdmp, function() { API.mode.set('FDM',null,platform.update_size) }), UC.newButton(LANG.mo_fdmp, function() { API.mode.set('FDM',null,platform.update_size) }),
],[
UI.modeSLA =
UC.newButton(LANG.mo_slap, function() { API.mode.set('SLA',null,platform.update_size) }),
],[ ],[
UI.modeLASER = UI.modeLASER =
UC.newButton(LANG.mo_lazr, function() { API.mode.set('LASER',null,platform.update_size) }), UC.newButton(LANG.mo_lazr, function() { API.mode.set('LASER',null,platform.update_size) }),
@ -1423,12 +1428,14 @@ var gs_kiri_init = exports;
zHopDistance: UC.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:UC.bound(0,3.0), convert:UC.toFloat, modes:FDM, expert:true}), zHopDistance: UC.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:UC.bound(0,3.0), convert:UC.toFloat, modes:FDM, expert:true}),
antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM, expert:true}), antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM, expert:true}),
// detectThinWalls: UC.newBoolean("thin wall fill", onBooleanClick, {title: "detect and fill thin openings\nbetween shells walls", modes:FDM, expert:true}) // detectThinWalls: UC.newBoolean("thin wall fill", onBooleanClick, {title: "detect and fill thin openings\nbetween shells walls", modes:FDM, expert:true})
// polishLayers: LOCAL ? UC.newInput(LANG.ad_play_s, {title:LANG.ad_play_l, bound:UC.bound(0,10), convert:UC.toFloat, modes:FDM, expert:true}) : null,
// polishSpeed: LOCAL ? UC.newInput(LANG.ad_pspd_s, {title:LANG.ad_pspd_l, bound:UC.bound(10,2000), convert:UC.toInt, modes:FDM, expert:true}) : null,
gcodePauseLayers: UC.newInput(LANG.ag_paws_s, {title:LANG.ag_paws_l, modes:FDM, expert:true}), gcodePauseLayers: UC.newInput(LANG.ag_paws_s, {title:LANG.ag_paws_l, modes:FDM, expert:true}),
outputLayerRetract: UC.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l, modes:FDM, expert:true}) outputLayerRetract: UC.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l, modes:FDM, expert:true})
}); });
if (!LOCAL) {
UI.modeSLA.style.display = 'none';
}
if (!lang_set) { if (!lang_set) {
// for english only, add underlined labels for hotkeys // for english only, add underlined labels for hotkeys
UI.setupDevices.innerHTML = "D<u>e</u>vices"; UI.setupDevices.innerHTML = "D<u>e</u>vices";

View file

@ -323,15 +323,42 @@ let gs_kiri_print = exports;
return a !== undefined ? a : b; return a !== undefined ? a : b;
} }
function rgb2hsv(ir, ig, ib) {
let H = 0,
S = 0,
V = 0,
r = ir / 255,
g = ig / 255,
b = ib / 255;
let minRGB = Math.min(r, Math.min(g, b)),
maxRGB = Math.max(r, Math.max(g, b));
// Black-gray-white
if (minRGB == maxRGB) {
V = minRGB;
return [0, 0, V];
}
// Colors other than black-gray-white:
let d = (r == minRGB) ? g - b : ((b == minRGB) ? r - g : b - r),
h = (r == minRGB) ? 3 : ((b == minRGB) ? 1 : 5);
H = 60 * (h - d / (maxRGB - minRGB));
S = (maxRGB - minRGB) / maxRGB;
V = maxRGB;
return [H, S, V];
}
// hsv values all = 0 to 1 // hsv values all = 0 to 1
function hsv2rgb(hsv) { function hsv2rgb(hsv) {
let seg = Math.floor(hsv.h * 6); let seg = Math.floor(hsv.h * 6),
let rem = hsv.h - (seg * (1/6)); rem = hsv.h - (seg * (1/6)),
let out = {}; p = hsv.v * (1.0 - (hsv.s)),
q = hsv.v * (1.0 - (hsv.s * rem)),
let p = hsv.v * (1.0 - (hsv.s) ); t = hsv.v * (1.0 - (hsv.s * (1.0 - rem))),
let q = hsv.v * (1.0 - (hsv.s * rem) ); out = {};
let t = hsv.v * (1.0 - (hsv.s * (1.0 - rem)));
switch (seg) { switch (seg) {
case 0: case 0:

View file

@ -11,31 +11,15 @@ let gs_kiri_widget = exports;
let KIRI = self.kiri, let KIRI = self.kiri,
DRIVERS = KIRI.driver, DRIVERS = KIRI.driver,
CAM = DRIVERS.CAM,
FDM = DRIVERS.FDM,
LASER = DRIVERS.LASER,
CPRO = CAM.process,
BASE = self.base, BASE = self.base,
CONF = BASE.config, CONF = BASE.config,
DBUG = BASE.debug, DBUG = BASE.debug,
UTIL = BASE.util, UTIL = BASE.util,
POLY = BASE.polygons, POLY = BASE.polygons,
MATH = Math, MATH = Math,
ABS = MATH.abs,
MIN = MATH.min,
MAX = MATH.max,
SQRT = MATH.sqrt, SQRT = MATH.sqrt,
CEIL = MATH.ceil,
FLOOR = MATH.floor,
ROUND = MATH.round,
SLICER = KIRI.slicer,
newLine = BASE.newLine,
newPoint = BASE.newPoint,
newSlice = KIRI.newSlice,
newPolygon = BASE.newPolygon,
newOrderedLine = BASE.newOrderedLine,
time = UTIL.time,
PRO = Widget.prototype, PRO = Widget.prototype,
time = UTIL.time,
solid_opacity = 1.0, solid_opacity = 1.0,
nextId = 0, nextId = 0,
groups = []; groups = [];
@ -226,7 +210,7 @@ let gs_kiri_widget = exports;
newpoints; newpoints;
// replace point objects with their equivalents // replace point objects with their equivalents
while (i < array.length) { while (i < array.length) {
let p = newPoint(array[i++], array[i++], array[i++]), let p = BASE.newPoint(array[i++], array[i++], array[i++]),
k = p.key, k = p.key,
m = hash[k]; m = hash[k];
if (!m) { if (!m) {
@ -707,13 +691,7 @@ let gs_kiri_widget = exports;
onupdate(progress, message); onupdate(progress, message);
}; };
let driver = null; let driver = DRIVERS[settings.mode.toUpperCase()];
switch (settings.mode) {
case 'LASER': driver = LASER; break;
case 'FDM': driver = FDM; break;
case 'CAM': driver = CAM; break;
}
if (driver) { if (driver) {
driver.slice(settings, widget, catchupdate, catchdone); driver.slice(settings, widget, catchupdate, catchdone);

View file

@ -35,6 +35,7 @@ self.kiri.copyright = exports.COPYRIGHT;
CONF = KIRI.conf, CONF = KIRI.conf,
MODES = CONF.MODES, MODES = CONF.MODES,
VIEWS = CONF.VIEWS, VIEWS = CONF.VIEWS,
clone = Object.clone,
settings = clone(CONF.template), settings = clone(CONF.template),
settingsDefault = clone(settings), settingsDefault = clone(settings),
// --------------- // ---------------
@ -61,13 +62,6 @@ self.kiri.copyright = exports.COPYRIGHT;
alerts = [], alerts = [],
grouping = false; grouping = false;
// seed defaults. will get culled on save
settings.sproc.FDM.default = clone(settings.process);
settings.sproc.CAM.default = clone(settings.process);
settings.sproc.LASER.default = clone(settings.process);
settings.cdev.FDM = clone(settings.device);
settings.cdev.CAM = clone(settings.device);
if (SETUP.rm) renderMode = parseInt(SETUP.rm[0]); if (SETUP.rm) renderMode = parseInt(SETUP.rm[0]);
DBUG.enable(); DBUG.enable();
@ -322,10 +316,6 @@ self.kiri.copyright = exports.COPYRIGHT;
* Utility Functions * Utility Functions
******************************************************************* */ ******************************************************************* */
function clone(o) {
return o ? JSON.parse(JSON.stringify(o)) : o;
}
function unitScale() { function unitScale() {
return settings.controller.units === 'in' ? 25.4 : 1; return settings.controller.units === 'in' ? 25.4 : 1;
} }
@ -1396,9 +1386,10 @@ self.kiri.copyright = exports.COPYRIGHT;
} }
function saveSettings() { function saveSettings() {
// store camera view
let view = SPACE.view.save(); let view = SPACE.view.save();
if (view.left || view.up) settings.controller.view = view; if (view.left || view.up) {
settings.controller.view = view;
}
SDB.setItem('ws-settings', JSON.stringify(settings)); SDB.setItem('ws-settings', JSON.stringify(settings));
} }
@ -1498,16 +1489,13 @@ self.kiri.copyright = exports.COPYRIGHT;
} }
function restoreSettings(save) { function restoreSettings(save) {
let newset = ls2o('ws-settings'), let newset = ls2o('ws-settings');
camera = ls2o('ws-camera');
if (newset) { if (newset) {
settings = CONF.normalize(newset); settings = CONF.normalize(newset);
// override camera from settings // override camera from settings
if (settings.controller.view) { if (settings.controller.view) {
camera = settings.controller.view;
SDB.removeItem('ws-camera'); SDB.removeItem('ws-camera');
// UI.reverseZoom.checked = settings.controller.reverseZoom;
} }
// merge custom filters from localstorage into settings // merge custom filters from localstorage into settings
localFilters.forEach(function(fname) { localFilters.forEach(function(fname) {
@ -1519,15 +1507,14 @@ self.kiri.copyright = exports.COPYRIGHT;
// save updated settings // save updated settings
if (save) API.conf.save(); if (save) API.conf.save();
} }
return newset;
return {newset, camera};
} }
function restoreWorkspace(ondone, skip_widget_load) { function restoreWorkspace(ondone, skip_widget_load) {
let {newset, camera} = restoreSettings(true); let newset = restoreSettings(true),
camera = newset.controller.view,
let loaded = 0,
toload = ls2o('ws-widgets',[]), toload = ls2o('ws-widgets',[]),
loaded = 0,
position = true; position = true;
updateFields(); updateFields();
@ -1535,7 +1522,6 @@ self.kiri.copyright = exports.COPYRIGHT;
platform.update_stock(); platform.update_stock();
SPACE.view.reset(); SPACE.view.reset();
if (camera) SPACE.view.load(camera); if (camera) SPACE.view.load(camera);
else setTimeout(SPACE.view.home, 100); else setTimeout(SPACE.view.home, 100);
@ -1872,6 +1858,7 @@ self.kiri.copyright = exports.COPYRIGHT;
clearWidgetCache(); clearWidgetCache();
SPACE.update(); SPACE.update();
UI.modeFDM.setAttribute('class', MODE === MODES.FDM ? 'buton' : ''); UI.modeFDM.setAttribute('class', MODE === MODES.FDM ? 'buton' : '');
UI.modeSLA.setAttribute('class', MODE === MODES.SLA ? 'buton' : '');
UI.modeCAM.setAttribute('class', MODE === MODES.CAM ? 'buton' : ''); UI.modeCAM.setAttribute('class', MODE === MODES.CAM ? 'buton' : '');
UI.modeLASER.setAttribute('class', MODE === MODES.LASER ? 'buton' : ''); UI.modeLASER.setAttribute('class', MODE === MODES.LASER ? 'buton' : '');
UI.mode.style.display = lock ? 'none' : ''; UI.mode.style.display = lock ? 'none' : '';

View file

@ -1,7 +1,7 @@
var exports = { var exports = {
COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved", COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
LICENSE:"See the license.md file included with the source distribution", LICENSE:"See the license.md file included with the source distribution",
VERSION:"1.8.3" VERSION:"1.8.4"
}; };
if (!module) var module = {}; if (!module) var module = {};
module.exports = exports; module.exports = exports;

View file

@ -147,6 +147,9 @@ function prepareScripts() {
fs.readdir("./web/kiri/filter/FDM", function(err, files) { fs.readdir("./web/kiri/filter/FDM", function(err, files) {
filters_fdm = files || filters_fdm; filters_fdm = files || filters_fdm;
}); });
fs.readdir("./web/kiri/filter/SLA", function(err, files) {
filters_sla = files || filters_sla;
});
fs.readdir("./web/kiri/filter/CAM", function(err, files) { fs.readdir("./web/kiri/filter/CAM", function(err, files) {
filters_cam = files || filters_cam; filters_cam = files || filters_cam;
}); });
@ -787,6 +790,7 @@ let ver = require('../js/license.js'),
fileCache = {}, fileCache = {},
fileMap = {}, fileMap = {},
filters_fdm = [], filters_fdm = [],
filters_sla = [],
filters_cam = [], filters_cam = [],
filters_laser = [], filters_laser = [],
modPaths = [], modPaths = [],
@ -826,6 +830,7 @@ let ver = require('../js/license.js'),
"kiri-slice", "kiri-slice",
"kiri-slicer", "kiri-slicer",
"kiri-driver-fdm", "kiri-driver-fdm",
"kiri-driver-sla",
"kiri-driver-cam", "kiri-driver-cam",
"kiri-driver-laser", "kiri-driver-laser",
"kiri-pack", "kiri-pack",
@ -887,6 +892,7 @@ let ver = require('../js/license.js'),
"kiri-slice", "kiri-slice",
"kiri-slicer", "kiri-slicer",
"kiri-driver-fdm", "kiri-driver-fdm",
"kiri-driver-sla",
"kiri-driver-cam", "kiri-driver-cam",
"kiri-driver-laser", "kiri-driver-laser",
"kiri-pack", "kiri-pack",
@ -968,6 +974,11 @@ const api = {
res.end(obj2string(filters_fdm)); res.end(obj2string(filters_fdm));
}, },
"filters-sla": (req, res, next) => {
res.setHeader("Content-Type", "application/javascript");
res.end(obj2string(filters_sla));
},
"filters-cam": (req, res, next) => { "filters-cam": (req, res, next) => {
res.setHeader("Content-Type", "application/javascript"); res.setHeader("Content-Type", "application/javascript");
res.end(obj2string(filters_cam)); res.end(obj2string(filters_cam));

View file

@ -0,0 +1,11 @@
{
"pre":[],
"post":[],
"cmd":{},
"settings":{
"bed_width": 115,
"bed_depth": 65,
"max_height": 155,
"origin_center": true
}
}

View file

@ -0,0 +1,11 @@
{
"pre":[],
"post":[],
"cmd":{},
"settings":{
"bed_width": 115,
"bed_depth": 65,
"max_height": 155,
"origin_center": true
}
}

View file

@ -0,0 +1,11 @@
{
"pre":[],
"post":[],
"cmd":{},
"settings":{
"bed_width": 115,
"bed_depth": 65,
"max_height": 165,
"origin_center": true
}
}

View file

@ -62,6 +62,7 @@ kiri.lang['da-dk'] = {
// MODE // MODE
mo_menu: "Teknologi", mo_menu: "Teknologi",
mo_fdmp: "FDM Print", mo_fdmp: "FDM Print",
mo_slap: "SLA Print",
mo_lazr: "Laser skær", mo_lazr: "Laser skær",
mo_cncm: "CNC fræs", mo_cncm: "CNC fræs",

View file

@ -17,14 +17,14 @@ kiri.lang['en-us'] = {
dv_fila_l: "diameter in millimeters", dv_fila_l: "diameter in millimeters",
dv_nozl_s: "nozzle", dv_nozl_s: "nozzle",
dv_nozl_l: "diameter in millimeters", dv_nozl_l: "diameter in millimeters",
dv_bedw_s: "bed width", dv_bedw_s: "width",
dv_bedw_l: "millimeters", dv_bedw_l: "millimeters",
dv_bedd_s: "bed depth", dv_bedd_s: "depth",
dv_bedd_l: "millimeters", dv_bedd_l: "millimeters",
dv_bedh_s: "max height", dv_bedh_s: "height",
dv_bedh_l: "max build height\nin millimeters", dv_bedh_l: "max build height\nin millimeters",
dv_spmx_s: "max spindle rpm", dv_spmx_s: "max spindle",
dv_spmx_l: "max spindle speed\n0 to disable", dv_spmx_l: "max spindle rpm speed\n0 to disable",
dv_xtab_s: "absolute positioning", dv_xtab_s: "absolute positioning",
dv_xtab_l: "extrusion moves absolute", dv_xtab_l: "extrusion moves absolute",
dv_orgc_s: "origin center", dv_orgc_s: "origin center",
@ -72,9 +72,10 @@ kiri.lang['en-us'] = {
// MODE // MODE
mo_menu: "mode", mo_menu: "mode",
mo_fdmp: "FDM Printing", mo_fdmp: "FDM Print",
mo_lazr: "Laser Cutting", mo_slap: "SLA Print",
mo_cncm: "CNC Milling", mo_lazr: "Laser Cut",
mo_cncm: "CNC Mill",
// SETUP // SETUP
su_menu: "setup", su_menu: "setup",