update sla device with resolution. add halot sky device

This commit is contained in:
Stewart Allen 2021-07-24 18:02:09 -04:00
commit ed9ddfd83e
10 changed files with 48 additions and 14 deletions

View file

@ -1034,10 +1034,10 @@
* 'expand' is used for top offsets in SLA mode
*/
function doDiff(slice, minArea, options = {}) {
const { sla, fakedown } = options;
if (slice.index === 0 && !fakedown) {
return;
}
const { sla, fakedown } = options;
const top = slice,
down = slice.down || (fakedown ? newSlice(-1) : null),
topInner = sla ? top.topPolys() : top.topInners(),

View file

@ -22,8 +22,8 @@
process = settings.process,
output = print.output,
layermax = 0,
width = 2560,
height = 1440,
width = device.resolutionX,
height = device.resolutionY,
width2 = width/2,
height2 = height/2,
scaleX = width / device.bedWidth,
@ -75,6 +75,9 @@
case 'Anycubic.Photon.S':
exp_func = generatePhotons;
break;
case 'Creality.Halot.Sky':
exp_func = generateCXDLP;
break;
}
let file = exp_func(print, {
@ -96,6 +99,10 @@
console.log('print.export', Date.now() - mark);
};
function generateCXDLP(print, conf, progress) {
console.log({generateCXDLP: print, conf, progress});
}
function generatePhoton(print, conf, progress) {
let printset = print.settings,
process = printset.process,

View file

@ -50,7 +50,8 @@
});
}
let b64 = atob(self.worker.snap);
let sws = self.worker.snap.url;
let b64 = atob(sws.substring(sws.indexOf(',') + 1));
let bin = Uint8Array.from(b64, c => c.charCodeAt(0));
let img = new png.PNG();
img.parse(bin, (err, data) => {