fix adaptive layering first layer

This commit is contained in:
Stewart Allen 2020-11-20 19:55:18 -05:00
commit 87de4ed055
3 changed files with 18 additions and 11 deletions

View file

@ -106,10 +106,13 @@
spro.firstSliceHeight = sliceHeight;
}
const sliceMinHeight = spro.sliceAdaptive && spro.sliceMinHeight > 0 ?
Math.min(spro.sliceMinHeight, sliceHeight) : 0;
if (spro.firstSliceHeight < sliceHeight) {
DBUG.log("invalid first layer height < slice height");
DBUG.log("reverting to slice height");
spro.firstSliceHeight = sliceHeight;
DBUG.log("reverting to min valid slice height");
spro.firstSliceHeight = sliceMinHeight || sliceHeight;
}
// const slicer = new KIRI.slicer2(widget.getPoints(), { });
@ -134,9 +137,6 @@
// } });
// onSliceDone(slices);
const sliceMinHeight = spro.sliceAdaptive && spro.sliceMinHeight > 0 ?
Math.min(spro.sliceMinHeight, sliceHeight) : 0;
SLICER.sliceWidget(widget, {
height: sliceHeight,
minHeight: sliceMinHeight,