checkpoint roughing refactor

This commit is contained in:
Stewart Allen 2020-11-03 21:43:06 -05:00
commit 53d75fd4ed
4 changed files with 119 additions and 107 deletions

View file

@ -180,12 +180,19 @@
return rarr;
}
let phash = {},
let znorm = z.toFixed(5),
flatoff = opt.flatoff || 0.007,
onflat = this.zFlat[znorm],
phash = {},
lines = [],
zScale = this.zScale,
buckets = this.buckets,
bucket = buckets.length ? buckets[Math.floor(z * zScale)] : points;
if (onflat) {
z += flatoff;
}
if (!bucket) {
console.log({no_bucket_for_z: z});
return;
@ -236,7 +243,7 @@
}
}
if (opt.each) {
if (opt.each && (lines.length || opt.emptyok)) {
opt.each(retn, index, total, UTIL.time() - mark);
}