more optimal adaptive in corner case. add heights to fixed slicing
This commit is contained in:
parent
fb950ec894
commit
17f87d58c4
2 changed files with 6 additions and 3 deletions
|
|
@ -232,7 +232,8 @@ var gs_kiri_slicer = exports;
|
|||
zDivMax = Math.floor(zDelta / zInc);
|
||||
|
||||
if (zDivMax && zDivMax < zDivMin) {
|
||||
zStep = zDelta / (zDivMax + 1);
|
||||
if (zDelta % zInc > 0.01) zDivMax++;
|
||||
zStep = zDelta / zDivMax;
|
||||
} else {
|
||||
zStep = zDelta;
|
||||
}
|
||||
|
|
@ -247,10 +248,12 @@ var gs_kiri_slicer = exports;
|
|||
// FDM fixed slicing
|
||||
if (options.firstHeight) {
|
||||
zIndexes.push(options.firstHeight / 2);
|
||||
zHeights.push(options.firstHeight);
|
||||
zMin = options.firstHeight;
|
||||
}
|
||||
for (i = zMin + zOff; i < zMax; i += zInc) {
|
||||
zIndexes.push(i);
|
||||
zHeights.push(zInc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -419,7 +422,7 @@ var gs_kiri_slicer = exports;
|
|||
// allow empty slices in CAM swap mode (for topos w/ gaps)
|
||||
if (lines.length == 0 && !(options.swapX || options.swapY)) return;
|
||||
|
||||
slice.height = height || z;
|
||||
slice.height = height;
|
||||
slice.index = slices.length;
|
||||
slice.lines = removeDuplicateLines(lines);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2017 Stewart Allen <stewart@neuron.com> - All Rights Reserved",
|
||||
LICENSE:"Unauthorized copying, modification and re-distribution are strictly prohibited without prior written consent.",
|
||||
VERSION:"1.1.8b"
|
||||
VERSION:"1.1.8c"
|
||||
};
|
||||
if (!module) var module = {};
|
||||
module.exports = exports;
|
||||
|
|
|
|||
Loading…
Reference in a new issue