refactor / rename laser fields to ct for 'cut tool' as a generic class for waterjet/wireedm/dragknite/laser

This commit is contained in:
Stewart Allen 2024-06-09 15:33:30 -07:00
commit dfe42c0e4e
26 changed files with 261 additions and 171 deletions

View file

@ -78,7 +78,7 @@
"camStockClipTo": false,
"camStockOn": true,
"camConventional": false,
"outputOriginCenter": false,
"ctOriginCenter": false,
"outputInvertX": false,
"outputInvertY": false,
"camExpertFast": false,

View file

@ -45,7 +45,7 @@
"outputCoastDist": 0.1,
"outputLayerRetract": true,
"detectThinWalls": true,
"outputOriginCenter": false,
"ctOriginCenter": false,
"sliceFillRate": 0,
"sliceSupportEnable": false,
"firstSliceHeight": 0.25,

View file

@ -119,7 +119,7 @@
"camStockClipTo": false,
"camStockOn": true,
"camConventional": false,
"outputOriginCenter": false,
"camOriginCenter": false,
"outputInvertX": false,
"outputInvertY": false,
"camExpertFast": false,

View file

@ -173,7 +173,6 @@
"outputAvoidGaps": true,
"outputAlternating": false,
"outputLayerRetract": false,
"outputOriginCenter": false,
"outputLoops": 0,
"outputInvertX": false,
"outputInvertY": false,

View file

@ -121,7 +121,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.1,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,

View file

@ -149,7 +149,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.2,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -236,7 +235,6 @@
"outputLayerRetract": true,
"zHopDistance": 1,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 15,
@ -323,7 +321,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.2,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 0,

View file

@ -149,7 +149,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.2,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -236,7 +235,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.2,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -323,7 +321,6 @@
"outputLayerRetract": true,
"zHopDistance": 1,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 15,

View file

@ -150,7 +150,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.2,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -237,7 +236,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.2,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -324,7 +322,6 @@
"outputLayerRetract": true,
"zHopDistance": 1,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.45,
"sliceFillRepeat": 1,
"sliceFillRate": 15,

View file

@ -150,7 +150,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.3,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.4,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -237,7 +236,6 @@
"outputLayerRetract": true,
"zHopDistance": 0.3,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.4,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -324,7 +322,6 @@
"outputLayerRetract": true,
"zHopDistance": 1,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.4,
"sliceFillRepeat": 1,
"sliceFillRate": 15,

View file

@ -155,7 +155,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.3,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.6,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -242,7 +241,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.3,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.6,
"sliceFillRepeat": 1,
"sliceFillRate": 0,
@ -329,7 +327,6 @@
"outputLayerRetract": false,
"zHopDistance": 1,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceLineWidth": 0.6,
"sliceFillRepeat": 1,
"sliceFillRate": 0,

View file

@ -122,7 +122,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.12,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,
@ -204,7 +203,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.12,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,
@ -286,7 +284,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.12,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,

View file

@ -130,7 +130,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.12,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,
@ -212,7 +211,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.12,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,
@ -294,7 +292,6 @@
"outputLayerRetract": false,
"zHopDistance": 0.12,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,

View file

@ -152,7 +152,6 @@
"outputBeltFirst": false,
"outputAvoidGaps": true,
"outputLayerRetract": false,
"outputOriginCenter": false,
"outputLoops": 0,
"outputInvertX": false,
"outputInvertY": false,

View file

@ -101,7 +101,6 @@
"outputLayerRetract": false,
"zHopDistance": 0,
"antiBacklash": 0,
"outputOriginCenter": false,
"sliceFillWidth": 1,
"sliceFillRate": 0,
"sliceSupportEnable": false,

View file

@ -30,6 +30,6 @@
},
"profiles":[{
"processName": "Snapmaker Laser",
"outputOriginCenter": false
"ctOriginCenter": false
}]
}

View file

@ -1,21 +1,53 @@
{
"file-ext": "gcode",
"token-space": " ",
"pre":[
"mode": "WEDM",
"internal": 0,
"imageURL": "",
"bedHeight": 2.5,
"bedWidth": 250,
"bedDepth": 150,
"maxHeight": 50,
"gcodePre": [
"G21 ; set units to MM (required)",
"G90 ; absolute position mode (required)"
],
"post":[
"gcodePost": [
"M30 ; program end"
],
"laser-on":[
"gcodeFExt": "gcode",
"gcodeSpace": true,
"gcodeLaserOn": [
"M106 S{power}"
],
"laser-off":[
"gcodeLaserOff": [
"M107"
],
"settings": {
"bed_width": 300,
"bed_depth": 300
}
}
"new": false,
"deviceName": "Generic Wire EDM",
"bedBelt": false,
"bedRound": false,
"originCenter": false,
"fwRetract": false,
"profiles": [
{
"processName": "wire-edm",
"ctSliceKerf": 0.1,
"ctSliceHeight": 10,
"ctSliceHeightMin": 0,
"ctSliceSingle": false,
"ctOutTileSpacing": 1,
"ctOutPower": 100,
"ctOutSpeed": 1000,
"ctOutGroup": true,
"ctOutZColor": false,
"ctOutLayer": false,
"ctOutStack": false,
"ctOutMerged": false,
"ctOriginCenter": true,
"outputInvertX": false,
"outputInvertY": false,
"ctOutKnifeDepth": 1,
"ctOutKnifePasses": 1,
"ctOutKnifeTip": 2
}
]
}

View file

@ -0,0 +1,53 @@
{
"mode": "WEDM",
"internal": 0,
"imageURL": "",
"bedHeight": 2.5,
"bedWidth": 200,
"bedDepth": 100,
"maxHeight": 50,
"gcodePre": [
"G21 ; set units to MM (required)",
"G90 ; absolute position mode (required)"
],
"gcodePost": [
"M30 ; program end"
],
"gcodeFExt": "gcode",
"gcodeSpace": true,
"gcodeLaserOn": [
"M106 S{power}"
],
"gcodeLaserOff": [
"M107"
],
"new": false,
"deviceName": "Rack Robotics Betta Wire V1",
"bedBelt": false,
"bedRound": false,
"originCenter": false,
"fwRetract": false,
"profiles": [
{
"processName": "wire-edm",
"ctSliceKerf": 0.1,
"ctSliceHeight": 10,
"ctSliceHeightMin": 0,
"ctSliceSingle": false,
"ctOutTileSpacing": 1,
"ctOutPower": 100,
"ctOutSpeed": 1000,
"ctOutGroup": true,
"ctOutZColor": false,
"ctOutLayer": false,
"ctOutStack": false,
"ctOutMerged": false,
"ctOriginCenter": true,
"outputInvertX": false,
"outputInvertY": false,
"ctOutKnifeDepth": 1,
"ctOutKnifePasses": 1,
"ctOutKnifeTip": 2
}
]
}

View file

@ -1,21 +1,53 @@
{
"file-ext": "gcode",
"token-space": " ",
"pre":[
"mode": "WJET",
"internal": 0,
"imageURL": "",
"bedHeight": 2.5,
"bedWidth": 300,
"bedDepth": 300,
"maxHeight": 150,
"gcodePre": [
"G21 ; set units to MM (required)",
"G90 ; absolute position mode (required)"
],
"post":[
"gcodePost": [
"M30 ; program end"
],
"laser-on":[
"gcodeFExt": "gcode",
"gcodeSpace": true,
"gcodeLaserOn": [
"M106 S{power}"
],
"laser-off":[
"gcodeLaserOff": [
"M107"
],
"settings": {
"bed_width": 300,
"bed_depth": 300
}
}
"new": false,
"deviceName": "HydroBLADE",
"bedBelt": false,
"bedRound": false,
"originCenter": false,
"fwRetract": false,
"profiles": [
{
"processName": "waterjet",
"ctSliceKerf": 0.1,
"ctSliceHeight": 10,
"ctSliceHeightMin": 0,
"ctSliceSingle": false,
"ctOutTileSpacing": 1,
"ctOutPower": 100,
"ctOutSpeed": 1000,
"ctOutGroup": true,
"ctOutZColor": false,
"ctOutLayer": false,
"ctOutStack": false,
"ctOutMerged": false,
"ctOriginCenter": true,
"outputInvertX": false,
"outputInvertY": false,
"ctOutKnifeDepth": 1,
"ctOutKnifePasses": 1,
"ctOutKnifeTip": 2
}
]
}

View file

@ -288,8 +288,8 @@ kiri.load(() => {
const stepsY = Math.floor(stock.y / step);
const { pos, ind, sab } = createGrid(stepsX, stepsY, stock, step);
const offset = {
x: process.outputOriginCenter ? 0 : stock.x / 2,
y: process.outputOriginCenter ? 0 : stock.y / 2,
x: process.camOriginCenter ? 0 : stock.x / 2,
y: process.camOriginCenter ? 0 : stock.y / 2,
z: process.camOriginTop ? -stock.z : 0
}

View file

@ -188,7 +188,6 @@ FDM.init = function(kiri, api) {
api.event.on("range.updates", updateRanges);
api.event.on("settings.load", (settings) => {
if (settings.mode !== 'FDM') return;
settings.process.outputOriginCenter = (settings.device.originCenter || false);
restoreSupports(api.widgets.all());
updateRanges(settings.process.ranges);
});

View file

@ -62,7 +62,7 @@ FDM.export = function(print, online, ondone, ondebug) {
arcRes = 20,
arcDev = 0.5,
arcMax = 40,
originCenter = process.outputOriginCenter || bedRound,
originCenter = device.originCenter || bedRound,
offset = originCenter ? {
x: 0,
y: 0,

View file

@ -785,14 +785,14 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
let preout = [],
process = opt.params || settings.process,
originCenter = process.outputOriginCenter || bedRound,
originCenter = device.originCenter || bedRound,
extruder = slice.extruder || 0,
nozzleSize = process.sliceLineWidth || device.extruders[extruder].extNozzle,
firstLayer = (opt.first || false) && !opt.support,
thinWall = nozzleSize * (opt.thinWall || 1.75),
retractDist = opt.retractOver || 2,
fillMult = opt.mult || process.outputFillMult,
shellMult = opt.mult || process.outputShellMult || (process.laserSliceHeight >= 0 ? 1 : 0),
shellMult = opt.mult || process.outputShellMult || (process.ctSliceHeight >= 0 ? 1 : 0),
shellOrder = {"out-in":-1,"in-out":1}[process.sliceShellOrder] || -1,
sparseMult = process.outputSparseMult,
coastDist = process.outputCoastDist || 0,

View file

@ -40,14 +40,14 @@ function init(kiri, api) {
*/
function slice(settings, widget, onupdate, ondone) {
let proc = settings.process;
let offset = proc.laserOffset || 0;
let offset = proc.ctSliceKerf || 0;
let color = settings.controller.dark ? 0xbbbbbb : 0;
if (proc.laserSliceHeight < 0) {
if (proc.ctSliceHeight < 0) {
return ondone("invalid slice height");
}
let { laserSliceSingle, laserSliceHeight, laserSliceHeightMin } = proc;
let { ctSliceSingle, ctSliceHeight, ctSliceHeightMin } = proc;
let bounds = widget.getBoundingBox();
let points = widget.getPoints();
let indices = [];
@ -57,10 +57,10 @@ function slice(settings, widget, onupdate, ondone) {
zMax: bounds.max.z,
zGen(zopt) {
let { zMin, zMax, zIndexes } = zopt;
if (laserSliceSingle) {
indices = [ laserSliceHeight ];
} else if (laserSliceHeight) {
for (let z = zMin + laserSliceHeight / 2; z < zMax; z += laserSliceHeight) {
if (ctSliceSingle) {
indices = [ ctSliceHeight ];
} else if (ctSliceHeight) {
for (let z = zMin + ctSliceHeight / 2; z < zMax; z += ctSliceHeight) {
indices.push(z);
}
indices;
@ -69,11 +69,11 @@ function slice(settings, widget, onupdate, ondone) {
indices.push((zIndexes[i-1] + zIndexes[i]) / 2);
}
// discard layers too
if (laserSliceHeightMin) {
if (ctSliceHeightMin) {
let last;
indices = indices.filter(v => {
let ok = true;
if (last !== undefined && Math.abs(v - last) < laserSliceHeightMin) {
if (last !== undefined && Math.abs(v - last) < ctSliceHeightMin) {
ok = false;
} else {
last = v;
@ -110,13 +110,13 @@ function polyLabel(poly, label) {
function sliceEmitObjects(print, slice, groups, opt = { }) {
let start = newPoint(0,0,0);
let process = print.settings.process;
let stacked = process.outputLaserStack;
let grouped = stacked || process.outputLaserGroup;
let stacked = process.ctOutStack;
let grouped = stacked || process.ctOutGroup;
let label = false && process.outputLaserLabel;
let simple = opt.simple || false;
let emit = { in: [], out: [], mark: [] };
let lastEmit = opt.lastEmit;
let zcolor = print.settings.process.outputLaserZColor;
let zcolor = print.settings.process.ctOutZColor;
function laserOut(poly, group, type, indexed) {
if (!poly) {
@ -182,7 +182,7 @@ async function prepare(widgets, settings, update) {
process = settings.process,
print = self.worker.print = kiri.newPrint(settings, widgets),
knifeOn = self.worker.mode === 'DRAG',
knifeTipOff = process.outputKnifeTip,
knifeTipOff = process.ctOutKnifeTip,
output = print.output = [],
totalSlices = 0,
slices = 0;
@ -262,7 +262,7 @@ async function prepare(widgets, settings, update) {
// emit objects from each slice into output array
widgets.forEach(widget => {
// slice stack merging
if (process.outputLaserMerged) {
if (process.ctOutMerged) {
let merged = [];
widget.slices.forEach(slice => {
let polys = [];
@ -343,16 +343,16 @@ async function prepare(widgets, settings, update) {
let i, m, e,
dw = device.bedWidth / 2,
dh = device.bedDepth / 2,
sort = !process.outputLaserLayer,
sort = !process.ctOutLayer,
// sort objects by size when not using laser layer ordering
c = sort ? output.sort(kiri.Sort) : output,
p = new kiri.Pack(dw, dh, process.outputTileSpacing).fit(c, !sort);
p = new kiri.Pack(dw, dh, process.ctOutTileSpacing).fit(c, !sort);
// test different ratios until packed
while (!p.packed) {
dw *= 1.1;
dh *= 1.1;
p = new kiri.Pack(dw, dh, process.outputTileSpacing).fit(c ,!sort);
p = new kiri.Pack(dw, dh, process.ctOutTileSpacing).fit(c ,!sort);
}
if (pack)
@ -383,7 +383,7 @@ function exportLaser(print, online, ondone) {
*/
function exportElements(settings, output, onpre, onpoly, onpost, onpoint, onlayer) {
let process = settings.process,
zcolor = process.outputLaserZColor,
zcolor = process.ctOutZColor,
last,
point,
poly = [],
@ -402,7 +402,7 @@ function exportElements(settings, output, onpre, onpoly, onpost, onpoint, onlaye
});
});
if (!process.outputOriginCenter) {
if (!process.ctOriginCenter) {
// normalize against origin lower left
output.forEach(function(layer) {
layer.forEach(function(out) {
@ -432,7 +432,7 @@ function exportElements(settings, output, onpre, onpoly, onpost, onpoint, onlaye
min.y = 0;
}
onpre(min, max, process.outputLaserPower, process.outputLaserSpeed);
onpre(min, max, process.ctOutPower, process.ctOutSpeed);
output.forEach(function(layer, index) {
let thick = 0;
@ -476,8 +476,8 @@ function exportGCode(settings, data) {
let laser_on = dev.gcodeLaserOn || [];
let laser_off = dev.gcodeLaserOff || [];
let knifeOn = proc.knifeOn;
let knifeDepth = proc.outputKnifeDepth;
let passes = knifeOn ? proc.outputKnifePasses : 1;
let knifeDepth = proc.ctOutKnifeDepth;
let passes = knifeOn ? proc.ctOutKnifePasses : 1;
exportElements(
settings,
@ -554,8 +554,8 @@ function exportGCode(settings, data) {
*/
function exportSVG(settings, data, cut_color) {
let { process } = settings;
let zcolor = process.outputLaserZColor ? 1 : 0;
let zstack = process.outputLaserStack;
let zcolor = process.ctOutZColor ? 1 : 0;
let zstack = process.ctOutStack;
let lines = [], dx = 0, dy = 0, my, z = 0;
let colors = [
"black",

View file

@ -373,7 +373,6 @@ const conf = exports({
outputAvoidGaps: true,
outputAlternating: false,
outputLayerRetract: false,
outputOriginCenter: true,
outputNozzle: 0,
outputLoops: 0,
outputInvertX: false,
@ -627,24 +626,24 @@ const conf = exports({
// process defaults Laser:Process
p:{
processName: "default",
laserOffset: 0.1,
laserSliceHeight: 1,
laserSliceHeightMin: 0,
laserSliceSingle: true,
outputTileSpacing: 1,
outputLaserPower: 100,
outputLaserSpeed: 1000,
outputLaserGroup: true,
outputLaserZColor: false,
outputLaserLayer: false,
outputLaserStack: false,
outputLaserMerged: false,
outputOriginCenter: true,
ctSliceKerf: 0.1,
ctSliceHeight: 1,
ctSliceHeightMin: 0,
ctSliceSingle: true,
ctOutTileSpacing: 1,
ctOutPower: 100,
ctOutSpeed: 1000,
ctOutGroup: true,
ctOutZColor: false,
ctOutLayer: false,
ctOutStack: false,
ctOutMerged: false,
ctOriginCenter: true,
outputInvertX: false,
outputInvertY: false,
outputKnifeDepth: 1,
outputKnifePasses: 1,
outputKnifeTip: 2
ctOutKnifeDepth: 1,
ctOutKnifePasses: 1,
ctOutKnifeTip: 2
}
},
drag: {
@ -667,24 +666,24 @@ const conf = exports({
// process defaults Drag:Process
p:{
processName: "default",
laserOffset: 0.1,
laserSliceHeight: 1,
laserSliceHeightMin: 0,
laserSliceSingle: true,
outputTileSpacing: 1,
outputLaserPower: 100,
outputLaserSpeed: 1000,
outputLaserGroup: true,
outputLaserZColor: false,
outputLaserLayer: false,
outputLaserStack: false,
outputLaserMerged: false,
outputOriginCenter: true,
ctSliceKerf: 0.1,
ctSliceHeight: 1,
ctSliceHeightMin: 0,
ctSliceSingle: true,
ctOutTileSpacing: 1,
ctOutPower: 100,
ctOutSpeed: 1000,
ctOutGroup: true,
ctOutZColor: false,
ctOutLayer: false,
ctOutStack: false,
ctOutMerged: false,
ctOriginCenter: true,
outputInvertX: false,
outputInvertY: false,
outputKnifeDepth: 1,
outputKnifePasses: 1,
outputKnifeTip: 2
ctOutKnifeDepth: 1,
ctOutKnifePasses: 1,
ctOutKnifeTip: 2
},
},
wjet: {
@ -709,24 +708,24 @@ const conf = exports({
// process defaults WaterJet:Process
p:{
processName: "default",
laserOffset: 0.1,
laserSliceHeight: 1,
laserSliceHeightMin: 0,
laserSliceSingle: true,
outputTileSpacing: 1,
outputLaserPower: 100,
outputLaserSpeed: 1000,
outputLaserGroup: true,
outputLaserZColor: false,
outputLaserLayer: false,
outputLaserStack: false,
outputLaserMerged: false,
outputOriginCenter: true,
ctSliceKerf: 0.1,
ctSliceHeight: 1,
ctSliceHeightMin: 0,
ctSliceSingle: true,
ctOutTileSpacing: 1,
ctOutPower: 100,
ctOutSpeed: 1000,
ctOutGroup: true,
ctOutZColor: false,
ctOutLayer: false,
ctOutStack: false,
ctOutMerged: false,
ctOriginCenter: true,
outputInvertX: false,
outputInvertY: false,
outputKnifeDepth: 1,
outputKnifePasses: 1,
outputKnifeTip: 2
ctOutKnifeDepth: 1,
ctOutKnifePasses: 1,
ctOutKnifeTip: 2
},
},
wedm: {
@ -751,24 +750,24 @@ const conf = exports({
// process defaults WireEDM:Process
p:{
processName: "default",
laserOffset: 0.1,
laserSliceHeight: 1,
laserSliceHeightMin: 0,
laserSliceSingle: true,
outputTileSpacing: 1,
outputLaserPower: 100,
outputLaserSpeed: 1000,
outputLaserGroup: true,
outputLaserZColor: false,
outputLaserLayer: false,
outputLaserStack: false,
outputLaserMerged: false,
outputOriginCenter: true,
ctSliceKerf: 0.1,
ctSliceHeight: 1,
ctSliceHeightMin: 0,
ctSliceSingle: true,
ctOutTileSpacing: 1,
ctOutPower: 100,
ctOutSpeed: 1000,
ctOutGroup: true,
ctOutZColor: false,
ctOutLayer: false,
ctOutStack: false,
ctOutMerged: false,
ctOriginCenter: true,
outputInvertX: false,
outputInvertY: false,
outputKnifeDepth: 1,
outputKnifePasses: 1,
outputKnifeTip: 2
ctOutKnifeDepth: 1,
ctOutKnifePasses: 1,
ctOutKnifeTip: 2
}
}
},
@ -876,7 +875,7 @@ const conf = exports({
CAM: "Any.Generic.Grbl",
DRAG: "Any.Generic.DragKnife",
WJET: "HydroBLADE",
WEDM: "Any.Generic.WireEDM",
WEDM: "RackRobo.Betta.Wire.V1",
LASER: "Any.Generic.Laser",
},
// stored device by mode

View file

@ -550,7 +550,7 @@ gapp.register("kiri.init", [], (root, exports) => {
}
let current = settings(),
{ device, process} = current,
center = process.outputOriginCenter || process.camOriginCenter || device.bedRound,
center = process.ctOriginCenter || process.camOriginCenter || device.bedRound || device.originCenter,
bounds = boundsSelection(),
coord = prompt("Enter X,Y coordinates for selection").split(','),
x = parseFloat(coord[0] || 0.0),
@ -756,7 +756,7 @@ gapp.register("kiri.init", [], (root, exports) => {
// ui.deviceName.value = devicename;
ui.deviceBelt.checked = dev.bedBelt;
ui.deviceRound.checked = dev.bedRound;
ui.deviceOrigin.checked = dev.outputOriginCenter || dev.originCenter || dev.bedRound;
ui.deviceOrigin.checked = dev.ctOriginCenter || dev.originCenter || dev.bedRound;
ui.fwRetract.checked = dev.fwRetract;
if (!dev.filamentSource) ui.filamentSource.selectedIndex = 0;
@ -1937,32 +1937,32 @@ gapp.register("kiri.init", [], (root, exports) => {
camExpertFast: newBoolean(LANG.cx_fast_s, onBooleanClick, {title:LANG.cx_fast_l, show: () => !ui.camTrueShadow.checked }),
camTrueShadow: newBoolean(LANG.cx_true_s, onBooleanClick, {title:LANG.cx_true_l, show: () => !ui.camExpertFast.checked }),
/** LASER Settings */
/** LASER/DRAG/WJET/WEDM cut tool Settings */
laserMode: newGroup(LANG.sl_menu, $('lzr-slice'), { modes:TWOD, driven, separator }),
laserOffset: newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:toFloat}),
laserSliceHeight: newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:toFloat, trigger: true}),
laserSliceHeightMin: newInput(LANG.ls_lahm_s, {title:LANG.ls_lahm_l, convert:toFloat, show:() => ui.laserSliceHeight.value == 0 && !ui.laserSliceSingle.checked }),
_____: newGroup(LANG.sl_menu, $('lzr-slice'), { modes:TWOD, driven, separator }),
ctSliceKerf: newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:toFloat}),
ctSliceHeight: newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:toFloat, trigger: true}),
ctSliceHeightMin: newInput(LANG.ls_lahm_s, {title:LANG.ls_lahm_l, convert:toFloat, show:() => ui.ctSliceHeight.value == 0 && !ui.ctSliceSingle.checked }),
separator: newBlank({ class:"set-sep", driven }),
laserSliceSingle: newBoolean(LANG.ls_sngl_s, onBooleanClick, {title:LANG.ls_sngl_l}),
ctSliceSingle: newBoolean(LANG.ls_sngl_s, onBooleanClick, {title:LANG.ls_sngl_l}),
knife: newGroup(LANG.dk_menu, $('lzr-knife'), { modes:DRAG, marker:true, driven, separator }),
outputKnifeDepth: newInput(LANG.dk_dpth_s, {title:LANG.dk_dpth_l, convert:toFloat, bound:bound(0.0,5.0) }),
outputKnifePasses: newInput(LANG.dk_pass_s, {title:LANG.dk_pass_l, convert:toInt, bound:bound(0,5) }),
outputKnifeTip: newInput(LANG.dk_offs_s, {title:LANG.dk_offs_l, convert:toFloat, bound:bound(0.0,10.0) }),
ctOutKnifeDepth: newInput(LANG.dk_dpth_s, {title:LANG.dk_dpth_l, convert:toFloat, bound:bound(0.0,5.0) }),
ctOutKnifePasses: newInput(LANG.dk_pass_s, {title:LANG.dk_pass_l, convert:toInt, bound:bound(0,5) }),
ctOutKnifeTip: newInput(LANG.dk_offs_s, {title:LANG.dk_offs_l, convert:toFloat, bound:bound(0.0,10.0) }),
laserLayout: newGroup(LANG.lo_menu, $('lzr-layout'), { modes:TWOD, driven, separator }),
outputTileSpacing: newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:toInt}),
outputLaserMerged: newBoolean(LANG.ou_mrgd_s, onBooleanClick, {title:LANG.ou_mrgd_l}),
outputLaserGroup: newBoolean(LANG.ou_grpd_s, onBooleanClick, {title:LANG.ou_grpd_l, show:() => !ui.outputLaserStack.checked}),
ctOutTileSpacing: newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:toInt}),
ctOutMerged: newBoolean(LANG.ou_mrgd_s, onBooleanClick, {title:LANG.ou_mrgd_l}),
ctOutGroup: newBoolean(LANG.ou_grpd_s, onBooleanClick, {title:LANG.ou_grpd_l, show:() => !ui.ctOutStack.checked}),
laserOutput: newGroup(LANG.ou_menu, $('lzr-output'), { modes:TWOD, driven, separator }),
outputLaserPower: newInput(LANG.ou_powr_s, {title:LANG.ou_powr_l, convert:toInt, bound:bound(1,100)}),
outputLaserSpeed: newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:toInt}),
ctOutPower: newInput(LANG.ou_powr_s, {title:LANG.ou_powr_l, convert:toInt, bound:bound(1,100)}),
ctOutSpeed: newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:toInt}),
separator: newBlank({ class:"set-sep", driven }),
outputOriginBounds: newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l}),
outputOriginCenter: newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}),
ctOriginBounds: newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l}),
ctOriginCenter: newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}),
separator: newBlank({ class:"set-sep", driven }),
outputLaserZColor: newBoolean(LANG.ou_layo_s, onBooleanClick, {title:LANG.ou_layo_l, show:() => { return ui.outputLaserMerged.checked === false }}),
outputLaserLayer: newBoolean(LANG.ou_layr_s, onBooleanClick, {title:LANG.ou_layr_l}),
outputLaserStack: newBoolean(LANG.ou_lays_s, onBooleanClick, {title:LANG.ou_lays_l}),
ctOutZColor: newBoolean(LANG.ou_layo_s, onBooleanClick, {title:LANG.ou_layo_l, show:() => { return ui.ctOutMerged.checked === false }}),
ctOutLayer: newBoolean(LANG.ou_layr_s, onBooleanClick, {title:LANG.ou_layr_l}),
ctOutStack: newBoolean(LANG.ou_lays_s, onBooleanClick, {title:LANG.ou_lays_l}),
/** SLA SETTINGS */

View file

@ -51,7 +51,7 @@ function platformUpdateOrigin(update_bounds = true) {
let center = MODE === MODES.FDM ? device.originCenter || device.bedRound :
MODE === MODES.SLA ? false :
MODE === MODES.CAM ? process.camOriginCenter :
device.originCenter || process.outputOriginCenter;
device.originCenter || process.ctOriginCenter;
if (MODE === MODES.CAM && process.camOriginTop) {
origin.z = stock.z + 0.01;
@ -62,7 +62,7 @@ function platformUpdateOrigin(update_bounds = true) {
origin.x = (-stock.x / 2) + stockCenter.x;
origin.y = (stock.y / 2) - stockCenter.y;
} else {
if (MODE === MODES.LASER && process.outputOriginBounds) {
if (MODE === MODES.LASER && process.ctOriginBounds) {
let b = bounds;
origin.x = b.min.x,
origin.y = -b.min.y
@ -631,7 +631,7 @@ function platformLayout(event, gap) {
break;
case MODES.CAM:
case MODES.LASER:
gap = gap || process.outputTileSpacing || 1;
gap = gap || process.ctOutTileSpacing || 1;
break;
case MODES.FDM:
gap = gap || ((process.sliceSupportExtra || 0) * 2) + 1;