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
|
||||
// in the fdm driver to turn gcode into base64
|
||||
gcodeProc: valueOf(code.proc, ''),
|
||||
gcodePause: valueOf(code.pause, []),
|
||||
gcodeDwell: valueOf(code.dwell, []),
|
||||
gcodeSpindle: valueOf(code.spindle || cmd.spindle, []),
|
||||
gcodeChange: valueOf(code['tool-change'], []),
|
||||
|
|
@ -290,7 +289,6 @@
|
|||
gcodePost: [],
|
||||
gcodeExt: [],
|
||||
gcodeInt: [],
|
||||
gcodePause: [],
|
||||
gcodeProc: "",
|
||||
gcodeFan: [],
|
||||
gcodeTrack: [],
|
||||
|
|
@ -372,7 +370,7 @@
|
|||
outputShortPoly: 100.0,
|
||||
outputMinSpeed: 10.0,
|
||||
outputCoastDist: 0,
|
||||
outputPurgeTower: true,
|
||||
outputPurgeTower: 0,
|
||||
outputBeltFirst: false,
|
||||
outputAvoidGaps: true,
|
||||
outputLayerRetract: false,
|
||||
|
|
@ -386,7 +384,6 @@
|
|||
zHopDistance: 0.2,
|
||||
arcTolerance: 0,
|
||||
antiBacklash: 1,
|
||||
gcodePauseLayers: "",
|
||||
ranges: []
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
segments.peek().emitted += 650;
|
||||
for (let seg of segments) {
|
||||
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;
|
||||
volume[seg.tool+1] = seginfo.volume;
|
||||
length[seg.tool+1] = seginfo.length;
|
||||
|
|
@ -500,13 +500,26 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
name: `Color${v}`,
|
||||
type: "Filament",
|
||||
color: `#${v}0${v}0${v}0`,
|
||||
materialId: 1,
|
||||
filamentId: parseInt(v)+1
|
||||
materialId: parseInt(v) + 1,
|
||||
filamentId: parseInt(v) + 1
|
||||
}}),
|
||||
};
|
||||
let lastDrive;
|
||||
let algokeys = {};
|
||||
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 = {
|
||||
version: "3.0",
|
||||
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] = {
|
||||
ingoingId: lastDrive + 1,
|
||||
outgoingId: r.tool + 1,
|
||||
compression: 0,
|
||||
cooling: 0,
|
||||
heat: 0
|
||||
...defaultSplice
|
||||
};
|
||||
algorithms.push(rec);
|
||||
}
|
||||
|
|
@ -538,6 +549,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
KIRI.work.png({}, data => {
|
||||
png = data.png;
|
||||
});
|
||||
console.log({meta,palette});
|
||||
downloadPalette.onclick = function() {
|
||||
KIRI.client.zip([
|
||||
{name:"meta.json", data:JSON.stringify(meta,undefined,4)},
|
||||
|
|
|
|||
|
|
@ -811,7 +811,6 @@
|
|||
UI.gcodePost,
|
||||
UI.gcodeExt,
|
||||
UI.gcodeInt,
|
||||
UI.gcodePause,
|
||||
UI.bedDepth,
|
||||
UI.bedWidth,
|
||||
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.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.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.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,
|
||||
|
|
@ -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() }}),
|
||||
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}),
|
||||
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}),
|
||||
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
|
||||
slaProc: UC.newGroup(LANG.sa_menu, null, {modes:SLA, group:"sla-slice"}),
|
||||
|
|
|
|||
|
|
@ -2165,7 +2165,7 @@
|
|||
}
|
||||
|
||||
function platformSelectAll() {
|
||||
forAllWidgets(function(w) { platform.select(w, true) })
|
||||
forAllWidgets(function(w) { platform.select(w, true, false) })
|
||||
}
|
||||
|
||||
function platformLayout(event, space = settings.controller.spaceLayout) {
|
||||
|
|
|
|||
|
|
@ -176,10 +176,10 @@
|
|||
}
|
||||
let loops = isBelt && rloops.length ? rloops : undefined;
|
||||
|
||||
(process.gcodePauseLayers || "").split(",").forEach(function(lv) {
|
||||
let v = parseInt(lv);
|
||||
if (v >= 0) pause.push(v);
|
||||
});
|
||||
// (process.gcodePauseLayers || "").split(",").forEach(function(lv) {
|
||||
// let v = parseInt(lv);
|
||||
// if (v >= 0) pause.push(v);
|
||||
// });
|
||||
|
||||
append = function(line) {
|
||||
if (line) {
|
||||
|
|
@ -826,7 +826,7 @@
|
|||
|
||||
// force emit of buffer
|
||||
append();
|
||||
|
||||
// console.log({segments, emitted, outputLength});
|
||||
print.segments = isPalette ? segments : undefined;
|
||||
print.distance = emitted;
|
||||
print.lines = lines;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
firstLayerSeek = process.outputSeekrate,
|
||||
firstLayerRate = process.firstLayerRate,
|
||||
firstLayerMult = process.firstLayerPrintMult,
|
||||
purgeTower = process.outputPurgeTower || false,
|
||||
purgeTower = process.outputPurgeTower || 0,
|
||||
layerRetract = process.outputLayerRetract,
|
||||
layerno = 0,
|
||||
zoff = 0,
|
||||
|
|
@ -243,7 +243,8 @@
|
|||
}
|
||||
|
||||
// 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 blokpos, walkpos, blok;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue