fix latent layer retract detection
This commit is contained in:
parent
2f184703e7
commit
dc55da0232
2 changed files with 18 additions and 5 deletions
|
|
@ -538,7 +538,15 @@
|
|||
}
|
||||
|
||||
function retract() {
|
||||
if (preout.length) preout.last().retract = true;
|
||||
if (preout.length) {
|
||||
preout.last().retract = true;
|
||||
} else if (output.length) {
|
||||
output.last().retract = true;
|
||||
} else if (opt.pretract) {
|
||||
opt.pretract();
|
||||
} else {
|
||||
console.log('unable to retract. no preout or output');
|
||||
}
|
||||
}
|
||||
|
||||
function intersectsTop(p1, p2) {
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
let lastLayer;
|
||||
let extruders = [];
|
||||
let extcount = 0;
|
||||
|
||||
|
|
@ -391,21 +392,24 @@
|
|||
if (!lastOut || lastOut.extruder !== slice.extruder) {
|
||||
printPoint = purge(slice.extruder, track, layerout, printPoint, slice.z);
|
||||
}
|
||||
let tmpout = [];
|
||||
let wtb = slice.widget.track.box;
|
||||
// output seek to start point between mesh slices if previous data
|
||||
printPoint = print.slicePrintPath(
|
||||
slice,
|
||||
isBelt ? newPoint(-wtb.w, wtb.d * 2, 0) : printPoint.sub(offset),
|
||||
offset,
|
||||
tmpout, //layerout,
|
||||
layerout,
|
||||
{
|
||||
first: slice.index === 0,
|
||||
support: slice.widget.support,
|
||||
onBelt: slice.onbelt
|
||||
onBelt: slice.onbelt,
|
||||
pretract: () => {
|
||||
if (lastLayer && lastLayer.length) {
|
||||
lastLayer.last().retract = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
layerout.appendAll(tmpout);
|
||||
lastOut = slice;
|
||||
lastExt = lastOut.ext
|
||||
if (layerRetract && layerout.length) {
|
||||
|
|
@ -435,6 +439,7 @@
|
|||
layerout.layer = layerno++;
|
||||
update((layerno / cake.length) * 0.5, "prepare");
|
||||
|
||||
lastLayer = layerout;
|
||||
slices = [];
|
||||
layerout = [];
|
||||
lastOut = undefined;
|
||||
|
|
|
|||
Loading…
Reference in a new issue