fix slice first height with grouped parts

This commit is contained in:
Stewart Allen 2020-06-09 23:20:26 -04:00
commit fabfa872bc
2 changed files with 12 additions and 2 deletions

View file

@ -107,7 +107,17 @@ let gs_kiri_fdm = exports;
} }
function onSliceDone(slices) { function onSliceDone(slices) {
slices = slices.filter(slice => slice.tops.length); // slices = slices.filter(slice => slice.tops.length);
// remove all empty slices above part but leave below
// for multi-part (multi-extruder) setups where the void is ok
let found = false;
slices = slices.reverse().filter(slice => {
if (slice.tops.length) {
return found = true;
} else {
return found;
}
}).reverse();
widget.slices = slices; widget.slices = slices;

View file

@ -103,7 +103,7 @@ let gs_kiri_slicer = exports;
bounds = btmp; bounds = btmp;
} }
let zMin = options.zmin || Math.floor(bounds.min.z), let zMin = options.zmin || options.firstHeight || Math.floor(bounds.min.z),
zMax = options.zmax || Math.ceil(bounds.max.z), zMax = options.zmax || Math.ceil(bounds.max.z),
zInc = options.height, zInc = options.height,
zIncMin = options.minHeight, zIncMin = options.minHeight,