limit donwload to printer type in use
This commit is contained in:
parent
4fe5b9aeec
commit
538b6401c6
5 changed files with 29 additions and 13 deletions
|
|
@ -287,6 +287,7 @@ let gs_kiri_conf = exports;
|
||||||
sla:{
|
sla:{
|
||||||
// device defaults SLA:Device
|
// device defaults SLA:Device
|
||||||
d:{
|
d:{
|
||||||
|
deviceName: "",
|
||||||
noclone: false,
|
noclone: false,
|
||||||
mode: "",
|
mode: "",
|
||||||
internal: 0,
|
internal: 0,
|
||||||
|
|
@ -312,6 +313,7 @@ let gs_kiri_conf = exports;
|
||||||
slaBaseOn: 90,
|
slaBaseOn: 90,
|
||||||
slaBasePeelDist: 6,
|
slaBasePeelDist: 6,
|
||||||
slaBasePeelLiftRate: 3,
|
slaBasePeelLiftRate: 3,
|
||||||
|
slaFirstOffset: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cam:{
|
cam:{
|
||||||
|
|
|
||||||
|
|
@ -246,22 +246,34 @@ let gs_kiri_sla = exports;
|
||||||
|
|
||||||
let printset = print.settings,
|
let printset = print.settings,
|
||||||
process = printset.process,
|
process = printset.process,
|
||||||
|
device = printset.device,
|
||||||
print_sec = (process.slaBaseLayers * process.slaBaseOn) +
|
print_sec = (process.slaBaseLayers * process.slaBaseOn) +
|
||||||
(lines.length - process.slaBaseLayers) * process.slaLayerOn,
|
(lines.length - process.slaBaseLayers) * process.slaLayerOn,
|
||||||
print_min = Math.floor(print_sec/60),
|
print_min = Math.floor(print_sec/60),
|
||||||
print_hrs = Math.floor(print_min/60);
|
print_hrs = Math.floor(print_min/60),
|
||||||
|
download = $('print-photon');
|
||||||
|
|
||||||
print_sec -= (print_min * 60).toString().padStart(2,0);
|
print_sec -= (print_min * 60);
|
||||||
print_min -= (print_hrs * 60).toString().padStart(2,0);
|
print_min -= (print_hrs * 60);
|
||||||
print_hrs = print_hrs.toString().padStart(2,0);
|
print_sec = print_sec.toString().padStart(2,'0');
|
||||||
|
print_min = print_min.toString().padStart(2,'0');
|
||||||
|
print_hrs = print_hrs.toString().padStart(2,'0');
|
||||||
|
|
||||||
$('print-filename').value = filename;
|
$('print-filename').value = filename;
|
||||||
$('print-layers').value = lines.length;
|
$('print-layers').value = lines.length;
|
||||||
$('print-time').value = `${print_hrs}:${print_min}:${print_sec}`;
|
$('print-time').value = `${print_hrs}:${print_min}:${print_sec}`;
|
||||||
$('print-close').onclick = API.modal.hide;
|
$('print-close').onclick = API.modal.hide;
|
||||||
$('print-photons').onclick = () => { download_photons(print) };
|
|
||||||
$('print-photon').onclick = () => { download_photon(print) };
|
switch (device.deviceName) {
|
||||||
// $('print-pws').onclick = () => { download_pws(print) };
|
case 'Anycubic.Photon':
|
||||||
|
download.innerText += " .photon";
|
||||||
|
download.onclick = () => { download_photon(print) };
|
||||||
|
break;
|
||||||
|
case 'Anycubic.Photon.S':
|
||||||
|
download.innerText += " .photons";
|
||||||
|
download.onclick = () => { download_photons(print) };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
let canvas = $('print-canvas');
|
let canvas = $('print-canvas');
|
||||||
let ctx = canvas.getContext('2d');
|
let ctx = canvas.getContext('2d');
|
||||||
|
|
|
||||||
|
|
@ -548,6 +548,9 @@ var gs_kiri_init = exports;
|
||||||
dev = current.device = CONF.device_from_code(code,mode),
|
dev = current.device = CONF.device_from_code(code,mode),
|
||||||
proc = current.process;
|
proc = current.process;
|
||||||
|
|
||||||
|
|
||||||
|
dev.deviceName = devicename;
|
||||||
|
|
||||||
proc.outputOriginCenter = dev.outputOriginCenter;
|
proc.outputOriginCenter = dev.outputOriginCenter;
|
||||||
UI.deviceName.value = devicename;
|
UI.deviceName.value = devicename;
|
||||||
UI.deviceOrigin.checked = proc.outputOriginCenter;
|
UI.deviceOrigin.checked = proc.outputOriginCenter;
|
||||||
|
|
@ -1459,6 +1462,9 @@ var gs_kiri_init = exports;
|
||||||
slaBaseOff: UC.newInput('light off time', {title:'base layer light on\ntime in seconds', convert:UC.toFloat, modes:SLA}),
|
slaBaseOff: UC.newInput('light off time', {title:'base layer light on\ntime in seconds', convert:UC.toFloat, modes:SLA}),
|
||||||
slaBasePeelDist: UC.newInput('peel distance', {title:'peel distance\nin millimeters', convert:UC.toFloat, modes:SLA}),
|
slaBasePeelDist: UC.newInput('peel distance', {title:'peel distance\nin millimeters', convert:UC.toFloat, modes:SLA}),
|
||||||
slaBasePeelLiftRate: UC.newInput('peel lift rate', {title:'peel lift speed\nin mm/sec', convert:UC.toFloat, modes:SLA}),
|
slaBasePeelLiftRate: UC.newInput('peel lift rate', {title:'peel lift speed\nin mm/sec', convert:UC.toFloat, modes:SLA}),
|
||||||
|
|
||||||
|
slaFirst: UC.newGroup('first layer', null, {modes:SLA, group:"sla-first", expert:true}),
|
||||||
|
slaFirstOffset: UC.newInput('offset', {title:'first layer offset\nalmost always 0.0\n0.0-1.0 in millimeters', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA, expert:true}),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!lang_set) {
|
if (!lang_set) {
|
||||||
|
|
|
||||||
|
|
@ -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.6"
|
VERSION:"1.8.7"
|
||||||
};
|
};
|
||||||
if (!module) var module = {};
|
if (!module) var module = {};
|
||||||
module.exports = exports;
|
module.exports = exports;
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,7 @@
|
||||||
|
|
||||||
<div class="print-sel">
|
<div class="print-sel">
|
||||||
<table>
|
<table>
|
||||||
<tr><th><button id="print-photons">download as .photons</button></th></tr>
|
<tr><th><button id="print-photon">download</button></th></tr>
|
||||||
<tr><th><button id="print-photon">download as .photon</button></th></tr>
|
|
||||||
<!--
|
|
||||||
<tr><th><button id="print-pws">download as .pws</button></th></tr>
|
|
||||||
-->
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue