fix corner case with mid-layer slice z check
This commit is contained in:
parent
e4b10623bb
commit
733d5b275f
1 changed files with 7 additions and 6 deletions
|
|
@ -289,17 +289,18 @@ FDM.slice = function(settings, widget, onupdate, ondone) {
|
|||
// console.log({zIndexes, zHeights});
|
||||
} else {
|
||||
// simple based + fixed increment
|
||||
while (z <= zMax) {
|
||||
while (true) {
|
||||
// reduce slice position by half layer height
|
||||
let realz = (z - (h / 2)).round(3);
|
||||
if (realz > zMax) {
|
||||
break;
|
||||
}
|
||||
zh.push(h);
|
||||
zi.push(z);
|
||||
zi.push(realz);
|
||||
h = h1;
|
||||
z += h;
|
||||
}
|
||||
}
|
||||
// reduce slice position by half layer height
|
||||
for (let i=0; i<zi.length; i++) {
|
||||
zi[i] = (zi[i] - zh[i] / 2).round(3);
|
||||
}
|
||||
return zi;
|
||||
},
|
||||
// slicer function (worker local or minion distributed)
|
||||
|
|
|
|||
Loading…
Reference in a new issue