fix missing some flats due to slicer z order refactor

This commit is contained in:
Stewart Allen 2023-01-23 18:49:47 -05:00
commit 1f249fb179

View file

@ -141,11 +141,10 @@ class Slicer {
// sort Z and offset when on a flat
const flatoff = util.numOrDefault(opt.flatoff, 0.01);
zs.sort().map(z => {
if (!opt.flatoff) {
zs = zs.sort((a,b) => a-b).map(z => {
if (!flatoff) {
return z;
}
// console.log({ bump_z: z, znomr, flatoff });
const znorm = z.toFixed(5);
return this.zFlat[znorm] ? z + flatoff : z;
});