fix retraction between widgets. put retraction in prepare instead of export. inline comments

This commit is contained in:
Stewart Allen 2021-02-07 20:52:11 -05:00
commit 461e71ca64
2 changed files with 18 additions and 22 deletions

View file

@ -212,9 +212,6 @@
let angle = -Math.PI / 4;
function moveTo(newpos, rate, comment) {
if (comment) {
append(";; " + comment);
}
let o = [!rate && !newpos.e ? 'G0' : 'G1'];
let emit = { x: false, y: false, z: false };
if (typeof newpos.x === 'number' && newpos.x !== pos.x) {
@ -254,6 +251,9 @@
o.append(" F").append(Math.round(rate));
pos.f = rate
}
if (comment) {
o.append(` ; ${comment}`);
}
let line = o.join('');
if (last == line) {
// console.log({dup:line});
@ -325,10 +325,6 @@
append(`;; --- layer ${layer} (${subst.height} @ ${subst.z.round(3)}) ---`);
}
if (layer > 0 && process.outputLayerRetract) {
retract();
}
// enable fan at fan layer
if (gcodeFan && layer === process.outputFanLayer) {
appendAllSub(gcodeFan);