resolve gcode as array/text
This commit is contained in:
parent
c4e921ea1f
commit
91514aeb86
6 changed files with 44 additions and 19 deletions
|
|
@ -120,6 +120,8 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
};
|
||||
}) : zmax;
|
||||
|
||||
newOutput.push(layerOut);
|
||||
|
||||
function newLayer() {
|
||||
if (layerOut.length < 2) {
|
||||
return;
|
||||
|
|
@ -134,6 +136,9 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
if (!text || text.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (Array.isArray(text)) {
|
||||
text = text.join('\r\n');
|
||||
}
|
||||
newOutput.push(text);
|
||||
if (layerOut.length) {
|
||||
layerOut = [];
|
||||
|
|
@ -420,7 +425,8 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
|||
nextIsMove = true;
|
||||
lastMode = op.op.type;
|
||||
let weight = op.weight();
|
||||
layerOut.push({ op });
|
||||
newLayer();
|
||||
layerOut.push({ op: op.op });
|
||||
op.prepare(ops, (progress, message) => {
|
||||
update((opSum + (progress * weight)) / opTot, message || op.type(), message);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue