fix auto flats in CAM mode

This commit is contained in:
Stewart Allen 2020-04-18 15:34:59 -04:00
commit 1bac004f44
2 changed files with 65 additions and 55 deletions

View file

@ -297,7 +297,9 @@ var gs_kiri_cam = exports;
dec = inc - Math.floor(inc),
slop = step * 0.02; // allow 2% over/under on step alignment
// skip if delta close to step
if (Math.abs(delta - step) < slop) return;
if (Math.abs(delta - step) < slop) {
return;
}
// add another step if decimal too high
if (dec > slop) nstep = delta / Math.ceil(inc);
// find closest slices in-between