refactor gcode parser
This commit is contained in:
parent
38d4473553
commit
3aa07314c2
3 changed files with 61 additions and 62 deletions
|
|
@ -164,7 +164,8 @@ KIRI.worker = {
|
|||
};
|
||||
const print = KIRI.newPrint(settings, Object.values(cache));
|
||||
const tools = settings.device.extruders;
|
||||
const thin = settings.controller.thinRender || settings.mode !== 'FDM';
|
||||
const mode = settings.mode;
|
||||
const thin = settings.controller.thinRender || mode !== 'FDM';
|
||||
|
||||
const parsed = print.parseGCode(code, offset, progress => {
|
||||
send.data({ progress: progress * 0.5 });
|
||||
|
|
@ -173,7 +174,7 @@ KIRI.worker = {
|
|||
send.data({ progress: 0.5 + progress * 0.5 });
|
||||
}, { thin, tools });
|
||||
send.done({parsed: KIRI.codec.encode(layers)});
|
||||
});
|
||||
}, { fdm : mode === 'FDM' });
|
||||
},
|
||||
|
||||
clear: function(data, send) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue