diff --git a/src/kiri/conf.js b/src/kiri/conf.js index cf0ffea1..c1f4ec07 100644 --- a/src/kiri/conf.js +++ b/src/kiri/conf.js @@ -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: [] } }, diff --git a/src/kiri/export.js b/src/kiri/export.js index 3d993562..6b0a00da 100644 --- a/src/kiri/export.js +++ b/src/kiri/export.js @@ -470,7 +470,7 @@ console.log/** Copyright Stewart Allen -- 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 -- 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 -- 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 -- 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)}, diff --git a/src/kiri/init.js b/src/kiri/init.js index e935d2bf..535da970 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -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"}), diff --git a/src/kiri/main.js b/src/kiri/main.js index 63ac73d5..19ea8011 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -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) { diff --git a/src/mode/fdm/export.js b/src/mode/fdm/export.js index cbda6e42..035aa2c3 100644 --- a/src/mode/fdm/export.js +++ b/src/mode/fdm/export.js @@ -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; diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index b90aaefc..b7f817d3 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -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; diff --git a/web/kiri/lang/en.js b/web/kiri/lang/en.js index ae23609d..5a4e469f 100644 --- a/web/kiri/lang/en.js +++ b/web/kiri/lang/en.js @@ -624,7 +624,7 @@ kiri.lang['en-us'] = { ad_pspd_s: "polish speed", ad_pspd_l: ["polishing speed","in millimeters / second"], 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 cx_fast_s: "skip shadow", @@ -638,8 +638,8 @@ kiri.lang['en-us'] = { ag_nozl_l: "select output nozzle or head", 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_paws_s: "pause layers", - ag_paws_l: ["comma-separated list of layers","to inject pause commands before"], + // ag_paws_s: "pause layers", + // ag_paws_l: ["comma-separated list of layers","to inject pause commands before"], // 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_s: "loop count",