progressive transfer of prepare data. zerocodec helps in this scenario
This commit is contained in:
parent
4da43685f4
commit
45b8ac8c2d
7 changed files with 33 additions and 22 deletions
|
|
@ -33,8 +33,8 @@
|
|||
});
|
||||
});
|
||||
|
||||
print.render = KIRI.driver.FDM.prepareRender(print.output, progress => {
|
||||
update(0.5 + progress * 0.5, "render");
|
||||
print.render = KIRI.driver.FDM.prepareRender(print.output, (progress, layer) => {
|
||||
update(0.5 + progress * 0.5, "render", layer);
|
||||
}, {
|
||||
thin: true,
|
||||
print: 0,
|
||||
|
|
|
|||
|
|
@ -365,23 +365,23 @@
|
|||
// if layer produced output, append to output array
|
||||
if (layerout.length) output.append(layerout);
|
||||
|
||||
// notify progress
|
||||
layerout.layer = layer++;
|
||||
update((layer / maxLayers) * 0.5, "prepare");
|
||||
|
||||
// retract after last layer
|
||||
if (layer === maxLayers && layerout.length) {
|
||||
layerout.last().retract = true;
|
||||
}
|
||||
|
||||
// notify progress
|
||||
layerout.layer = layer++;
|
||||
update((layer / maxLayers) * 0.5, "prepare");
|
||||
|
||||
slices = [];
|
||||
layerout = [];
|
||||
lastOut = undefined;
|
||||
}
|
||||
|
||||
print.output = output;
|
||||
print.render = FDM.prepareRender(output, progress => {
|
||||
update(0.5 + progress * 0.5, "render");
|
||||
print.render = FDM.prepareRender(output, (progress, layer) => {
|
||||
update(0.5 + progress * 0.5, "render", layer);
|
||||
}, { tools: device.extruders, thin: isThin, flat: isFlat, fdm: true });
|
||||
return print.render;
|
||||
};
|
||||
|
|
@ -578,7 +578,7 @@
|
|||
});
|
||||
});
|
||||
|
||||
update(index / levels.length);
|
||||
update(index / levels.length, output);
|
||||
});
|
||||
|
||||
return layers;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@
|
|||
merged.push(p);
|
||||
}
|
||||
});
|
||||
update(slices++ / totalSlices);
|
||||
update((slices++ / totalSlices) * 0.5, "prepare");
|
||||
});
|
||||
let start = newPoint(0,0,0);
|
||||
let gather = [];
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
} else {
|
||||
widget.slices.forEach(function(slice) {
|
||||
sliceEmitObjects(print, slice, output);
|
||||
update(slices++ / totalSlices);
|
||||
update((slices++ / totalSlices) * 0.5, "prepare");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -209,7 +209,9 @@
|
|||
// console.log({laser_it: output});
|
||||
// }
|
||||
|
||||
return print.render = FDM.prepareRender(output, update, { thin: true, z: 0, action: "cut" });
|
||||
return print.render = FDM.prepareRender(output, (progress, layer) => {
|
||||
update(0.5 + progress * 0.5, "render", layer);
|
||||
}, { thin: true, z: 0, action: "cut" });
|
||||
};
|
||||
|
||||
function exportLaser(print, online, ondone) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue