add offset to wipe follow path

This commit is contained in:
Stewart Allen 2021-02-09 18:29:43 -05:00
commit f71dedb5d5
2 changed files with 6 additions and 4 deletions

View file

@ -218,6 +218,7 @@
}
}
let lastPoly;
let lastLayer;
let extruders = [];
let extcount = 0;
@ -407,8 +408,8 @@
if (lastLayer && lastLayer.length) {
let lastOut = lastLayer.last();
lastOut.retract = true;
if (wipeDist && lastLayer.lastPoly && lastOut.point) {
print.addOutput(lastLayer, lastOut.point.followTo(lastLayer.lastPoly.center(true), wipeDist));
if (wipeDist && lastPoly && lastOut.point) {
print.addOutput(lastLayer, lastOut.point.followTo(lastPoly.center(true).add(offset), wipeDist));
}
}
}
@ -416,6 +417,8 @@
);
lastOut = slice;
lastExt = lastOut.ext
lastPoly = slice.lastPoly;
lastLayer = layerout;
if (layerRetract && layerout.length) {
layerout.last().retract = true;
}
@ -443,7 +446,6 @@
layerout.layer = layerno++;
update((layerno / cake.length) * 0.5, "prepare");
lastLayer = layerout;
slices = [];
layerout = [];
lastOut = undefined;