fix output order for slices with shells touching the belt

This commit is contained in:
Stewart Allen 2021-02-16 22:01:10 -05:00
commit 8be93cb3c9
4 changed files with 21 additions and 17 deletions

View file

@ -314,10 +314,11 @@
}
}
}
// todo remove b/c this is now calculated at slice time
// flag slices as being on or off the bed / belt
for (let slice of widget.slices) {
slice.onbelt = Math.abs(minby - slice.minby) < 0.01;
}
// for (let slice of widget.slices) {
// slice.onbelt = Math.abs(minby - slice.minby) < 0.01;
// }
} else {
// when rafts used this is non-zero
offset.z = zoff;
@ -410,7 +411,7 @@
params, // range parameters
first: slice.index === 0,
support: slice.widget.support,
onBelt: slice.onbelt,
onBelt: slice.belt.touch,
pretract: (wipeDist) => {
if (lastLayer && lastLayer.length) {
let lastOut = lastLayer.last();

View file

@ -299,7 +299,7 @@
}, "offsets");
// add lead in when specified in belt mode
if (!isSynth && isBelt && spro.firstLayerBeltLead) {
if (!isSynth && isBelt) {
let wb = widget.bounds;
// find adjusted zero point from slices
let smin = Infinity;
@ -336,7 +336,7 @@
while (start.up && start.topShells().length === 0) {
start = start.up;
}
while (start && offset >= sliceHeight) {
while (offset && start && offset >= sliceHeight) {
let addto = start.down;
if (!addto) {
addto = newSlice(start.z - sliceHeight);