add purge tower area control. remove pause layers (will return with scripting). fix palette splice material info
This commit is contained in:
parent
7306ef5c0c
commit
29432b6dfd
7 changed files with 32 additions and 25 deletions
|
|
@ -133,7 +133,6 @@
|
||||||
// for XYZ.daVinci.Mini.w triggered in kiri.export
|
// for XYZ.daVinci.Mini.w triggered in kiri.export
|
||||||
// in the fdm driver to turn gcode into base64
|
// in the fdm driver to turn gcode into base64
|
||||||
gcodeProc: valueOf(code.proc, ''),
|
gcodeProc: valueOf(code.proc, ''),
|
||||||
gcodePause: valueOf(code.pause, []),
|
|
||||||
gcodeDwell: valueOf(code.dwell, []),
|
gcodeDwell: valueOf(code.dwell, []),
|
||||||
gcodeSpindle: valueOf(code.spindle || cmd.spindle, []),
|
gcodeSpindle: valueOf(code.spindle || cmd.spindle, []),
|
||||||
gcodeChange: valueOf(code['tool-change'], []),
|
gcodeChange: valueOf(code['tool-change'], []),
|
||||||
|
|
@ -290,7 +289,6 @@
|
||||||
gcodePost: [],
|
gcodePost: [],
|
||||||
gcodeExt: [],
|
gcodeExt: [],
|
||||||
gcodeInt: [],
|
gcodeInt: [],
|
||||||
gcodePause: [],
|
|
||||||
gcodeProc: "",
|
gcodeProc: "",
|
||||||
gcodeFan: [],
|
gcodeFan: [],
|
||||||
gcodeTrack: [],
|
gcodeTrack: [],
|
||||||
|
|
@ -372,7 +370,7 @@
|
||||||
outputShortPoly: 100.0,
|
outputShortPoly: 100.0,
|
||||||
outputMinSpeed: 10.0,
|
outputMinSpeed: 10.0,
|
||||||
outputCoastDist: 0,
|
outputCoastDist: 0,
|
||||||
outputPurgeTower: true,
|
outputPurgeTower: 0,
|
||||||
outputBeltFirst: false,
|
outputBeltFirst: false,
|
||||||
outputAvoidGaps: true,
|
outputAvoidGaps: true,
|
||||||
outputLayerRetract: false,
|
outputLayerRetract: false,
|
||||||
|
|
@ -386,7 +384,6 @@
|
||||||
zHopDistance: 0.2,
|
zHopDistance: 0.2,
|
||||||
arcTolerance: 0,
|
arcTolerance: 0,
|
||||||
antiBacklash: 1,
|
antiBacklash: 1,
|
||||||
gcodePauseLayers: "",
|
|
||||||
ranges: []
|
ranges: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -470,7 +470,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
segments.peek().emitted += 650;
|
segments.peek().emitted += 650;
|
||||||
for (let seg of segments) {
|
for (let seg of segments) {
|
||||||
let seginfo = driveInfo[seg.tool] = driveInfo[seg.tool] || { length: 0, volume: 0 };
|
let seginfo = driveInfo[seg.tool] = driveInfo[seg.tool] || { length: 0, volume: 0 };
|
||||||
seginfo.length += seg.emitted + 5;
|
seginfo.length += seg.emitted;
|
||||||
seginfo.volume += seg.emitted * Math.PI;
|
seginfo.volume += seg.emitted * Math.PI;
|
||||||
volume[seg.tool+1] = seginfo.volume;
|
volume[seg.tool+1] = seginfo.volume;
|
||||||
length[seg.tool+1] = seginfo.length;
|
length[seg.tool+1] = seginfo.length;
|
||||||
|
|
@ -500,13 +500,26 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
name: `Color${v}`,
|
name: `Color${v}`,
|
||||||
type: "Filament",
|
type: "Filament",
|
||||||
color: `#${v}0${v}0${v}0`,
|
color: `#${v}0${v}0${v}0`,
|
||||||
materialId: 1,
|
materialId: parseInt(v) + 1,
|
||||||
filamentId: parseInt(v)+1
|
filamentId: parseInt(v) + 1
|
||||||
}}),
|
}}),
|
||||||
};
|
};
|
||||||
let lastDrive;
|
let lastDrive;
|
||||||
let algokeys = {};
|
let algokeys = {};
|
||||||
let algorithms = [];
|
let algorithms = [];
|
||||||
|
let defaultSplice = {
|
||||||
|
compression: 3,
|
||||||
|
cooling: 2,
|
||||||
|
heat: 4
|
||||||
|
};
|
||||||
|
for (let key of Object.keys(driveInfo)) {
|
||||||
|
key = parseInt(key) + 1;
|
||||||
|
algorithms.push({
|
||||||
|
ingoingId: key,
|
||||||
|
outgoingId: key,
|
||||||
|
...defaultSplice
|
||||||
|
});
|
||||||
|
}
|
||||||
let palette = {
|
let palette = {
|
||||||
version: "3.0",
|
version: "3.0",
|
||||||
drives: [0, 0, 0, 0, 0, 0, 0, 0].map((v,i) => {
|
drives: [0, 0, 0, 0, 0, 0, 0, 0].map((v,i) => {
|
||||||
|
|
@ -521,9 +534,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
let rec = algokeys[key] = {
|
let rec = algokeys[key] = {
|
||||||
ingoingId: lastDrive + 1,
|
ingoingId: lastDrive + 1,
|
||||||
outgoingId: r.tool + 1,
|
outgoingId: r.tool + 1,
|
||||||
compression: 0,
|
...defaultSplice
|
||||||
cooling: 0,
|
|
||||||
heat: 0
|
|
||||||
};
|
};
|
||||||
algorithms.push(rec);
|
algorithms.push(rec);
|
||||||
}
|
}
|
||||||
|
|
@ -538,6 +549,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
KIRI.work.png({}, data => {
|
KIRI.work.png({}, data => {
|
||||||
png = data.png;
|
png = data.png;
|
||||||
});
|
});
|
||||||
|
console.log({meta,palette});
|
||||||
downloadPalette.onclick = function() {
|
downloadPalette.onclick = function() {
|
||||||
KIRI.client.zip([
|
KIRI.client.zip([
|
||||||
{name:"meta.json", data:JSON.stringify(meta,undefined,4)},
|
{name:"meta.json", data:JSON.stringify(meta,undefined,4)},
|
||||||
|
|
|
||||||
|
|
@ -811,7 +811,6 @@
|
||||||
UI.gcodePost,
|
UI.gcodePost,
|
||||||
UI.gcodeExt,
|
UI.gcodeExt,
|
||||||
UI.gcodeInt,
|
UI.gcodeInt,
|
||||||
UI.gcodePause,
|
|
||||||
UI.bedDepth,
|
UI.bedDepth,
|
||||||
UI.bedWidth,
|
UI.bedWidth,
|
||||||
UI.maxHeight,
|
UI.maxHeight,
|
||||||
|
|
@ -1684,7 +1683,6 @@
|
||||||
(UI.gcodeFan = UC.newGCode(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, area:gcode})).button,
|
(UI.gcodeFan = UC.newGCode(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, area:gcode})).button,
|
||||||
(UI.gcodeTrack = UC.newGCode(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, area:gcode})).button,
|
(UI.gcodeTrack = UC.newGCode(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, area:gcode})).button,
|
||||||
(UI.gcodeLayer = UC.newGCode(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, area:gcode})).button,
|
(UI.gcodeLayer = UC.newGCode(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, area:gcode})).button,
|
||||||
(UI.gcodePause = UC.newGCode(LANG.dv_paus_s, {title:LANG.dv_paus_l, modes:FDM, area:gcode})).button,
|
|
||||||
(UI.gcodeExt = UC.newGCode(LANG.dv_pext_s, {title:LANG.dv_pext_l, modes:FDM, area:gcode, show:isDanger})).button,
|
(UI.gcodeExt = UC.newGCode(LANG.dv_pext_s, {title:LANG.dv_pext_l, modes:FDM, area:gcode, show:isDanger})).button,
|
||||||
(UI.gcodeInt = UC.newGCode(LANG.dv_pint_s, {title:LANG.dv_pint_l, modes:FDM, area:gcode, show:isDanger})).button,
|
(UI.gcodeInt = UC.newGCode(LANG.dv_pint_s, {title:LANG.dv_pint_l, modes:FDM, area:gcode, show:isDanger})).button,
|
||||||
(UI.gcodeLaserOn = UC.newGCode(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, area:gcode})).button,
|
(UI.gcodeLaserOn = UC.newGCode(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, area:gcode})).button,
|
||||||
|
|
@ -1913,9 +1911,8 @@
|
||||||
arcTolerance: UC.newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:UC.bound(0,1.0), convert:UC.toFloat, modes:FDM, show:() => { return isDanger() && isNotBelt() }}),
|
arcTolerance: UC.newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:UC.bound(0,1.0), convert:UC.toFloat, modes:FDM, show:() => { return isDanger() && isNotBelt() }}),
|
||||||
antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM}),
|
antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM}),
|
||||||
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||||
gcodePauseLayers: UC.newInput(LANG.ag_paws_s, {title:LANG.ag_paws_l, modes:FDM, comma:true, show:isNotBelt}),
|
|
||||||
outputLoops: UC.newInput(LANG.ag_loop_s, {title:LANG.ag_loop_l, convert:UC.toInt, bound:UC.bound(0,1000), modes:FDM, show:isBelt}),
|
outputLoops: UC.newInput(LANG.ag_loop_s, {title:LANG.ag_loop_l, convert:UC.toInt, bound:UC.bound(0,1000), modes:FDM, show:isBelt}),
|
||||||
outputPurgeTower: UC.newBoolean(LANG.ad_purg_s, onBooleanClick, {title:LANG.ad_purg_l, modes:FDM, show:isMultiHead}),
|
outputPurgeTower: UC.newInput(LANG.ad_purg_s, {title:LANG.ad_purg_l, convert:UC.toInt, bound:UC.bound(0,1000), modes:FDM}),
|
||||||
|
|
||||||
// SLA
|
// SLA
|
||||||
slaProc: UC.newGroup(LANG.sa_menu, null, {modes:SLA, group:"sla-slice"}),
|
slaProc: UC.newGroup(LANG.sa_menu, null, {modes:SLA, group:"sla-slice"}),
|
||||||
|
|
|
||||||
|
|
@ -2165,7 +2165,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function platformSelectAll() {
|
function platformSelectAll() {
|
||||||
forAllWidgets(function(w) { platform.select(w, true) })
|
forAllWidgets(function(w) { platform.select(w, true, false) })
|
||||||
}
|
}
|
||||||
|
|
||||||
function platformLayout(event, space = settings.controller.spaceLayout) {
|
function platformLayout(event, space = settings.controller.spaceLayout) {
|
||||||
|
|
|
||||||
|
|
@ -176,10 +176,10 @@
|
||||||
}
|
}
|
||||||
let loops = isBelt && rloops.length ? rloops : undefined;
|
let loops = isBelt && rloops.length ? rloops : undefined;
|
||||||
|
|
||||||
(process.gcodePauseLayers || "").split(",").forEach(function(lv) {
|
// (process.gcodePauseLayers || "").split(",").forEach(function(lv) {
|
||||||
let v = parseInt(lv);
|
// let v = parseInt(lv);
|
||||||
if (v >= 0) pause.push(v);
|
// if (v >= 0) pause.push(v);
|
||||||
});
|
// });
|
||||||
|
|
||||||
append = function(line) {
|
append = function(line) {
|
||||||
if (line) {
|
if (line) {
|
||||||
|
|
@ -826,7 +826,7 @@
|
||||||
|
|
||||||
// force emit of buffer
|
// force emit of buffer
|
||||||
append();
|
append();
|
||||||
|
// console.log({segments, emitted, outputLength});
|
||||||
print.segments = isPalette ? segments : undefined;
|
print.segments = isPalette ? segments : undefined;
|
||||||
print.distance = emitted;
|
print.distance = emitted;
|
||||||
print.lines = lines;
|
print.lines = lines;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
firstLayerSeek = process.outputSeekrate,
|
firstLayerSeek = process.outputSeekrate,
|
||||||
firstLayerRate = process.firstLayerRate,
|
firstLayerRate = process.firstLayerRate,
|
||||||
firstLayerMult = process.firstLayerPrintMult,
|
firstLayerMult = process.firstLayerPrintMult,
|
||||||
purgeTower = process.outputPurgeTower || false,
|
purgeTower = process.outputPurgeTower || 0,
|
||||||
layerRetract = process.outputLayerRetract,
|
layerRetract = process.outputLayerRetract,
|
||||||
layerno = 0,
|
layerno = 0,
|
||||||
zoff = 0,
|
zoff = 0,
|
||||||
|
|
@ -243,7 +243,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine size/location of purge blocks
|
// determine size/location of purge blocks
|
||||||
let blokw = isPalette ? 20 : 10, blokh = isPalette ? 20 : 10;
|
let blokw = Math.sqrt(purgeTower),
|
||||||
|
blokh = blokw;
|
||||||
let stepw = blokw + nozzle / 2;
|
let stepw = blokw + nozzle / 2;
|
||||||
let blokpos, walkpos, blok;
|
let blokpos, walkpos, blok;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -624,7 +624,7 @@ kiri.lang['en-us'] = {
|
||||||
ad_pspd_s: "polish speed",
|
ad_pspd_s: "polish speed",
|
||||||
ad_pspd_l: ["polishing speed","in millimeters / second"],
|
ad_pspd_l: ["polishing speed","in millimeters / second"],
|
||||||
ad_purg_s: "purge tower",
|
ad_purg_s: "purge tower",
|
||||||
ad_purg_l: ["enable purge tower","for multiple extruders"],
|
ad_purg_l: ["purge tower area in mm^2","for multi extruder setups","0 = disabled"],
|
||||||
|
|
||||||
// CAM EXPERT
|
// CAM EXPERT
|
||||||
cx_fast_s: "skip shadow",
|
cx_fast_s: "skip shadow",
|
||||||
|
|
@ -638,8 +638,8 @@ kiri.lang['en-us'] = {
|
||||||
ag_nozl_l: "select output nozzle or head",
|
ag_nozl_l: "select output nozzle or head",
|
||||||
ag_peel_s: "peel guard",
|
ag_peel_s: "peel guard",
|
||||||
ag_peel_l: ["starting at this belt z position","periodically roll the print off and","back on to the belt to unstick it","and prevent rolling deflection"],
|
ag_peel_l: ["starting at this belt z position","periodically roll the print off and","back on to the belt to unstick it","and prevent rolling deflection"],
|
||||||
ag_paws_s: "pause layers",
|
// ag_paws_s: "pause layers",
|
||||||
ag_paws_l: ["comma-separated list of layers","to inject pause commands before"],
|
// ag_paws_l: ["comma-separated list of layers","to inject pause commands before"],
|
||||||
// ag_loop_s: "loop layers",
|
// ag_loop_s: "loop layers",
|
||||||
// ag_loop_l: ["layer ranges to repeat in the format","first-last-count,first-last-count,...","omitted count = 1"],
|
// ag_loop_l: ["layer ranges to repeat in the format","first-last-count,first-last-count,...","omitted count = 1"],
|
||||||
ag_loop_s: "loop count",
|
ag_loop_s: "loop count",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue