remove minion-based cam slicing

This commit is contained in:
Stewart Allen 2023-01-08 14:26:23 -05:00
commit 883bf90091
5 changed files with 5 additions and 85 deletions

View file

@ -135,7 +135,7 @@ class Slicer {
let zSum = this.zSum;
let zMax = this.bounds.max.z;
let points = this.points;
let bucketCount = this.threaded ? 0 : Math.max(1, Math.ceil(zMax / (zSum / points.length)) - 1);
let bucketCount = Math.max(1, Math.ceil(zMax / (zSum / points.length)) - 1);
let zScale = this.zScale = 1 / (zMax / bucketCount);
let buckets = this.buckets = {};
@ -166,14 +166,6 @@ class Slicer {
return this;
}
async sliceAsync(zarr, options) {
if (!this.threaded) {
return this.slice(zarr, options);
}
return await kiri.minions.camSliceZ(zarr, this, options);
// return this.slice(zarr, options);
}
// slice through points at given Z and return polygons
slice(z, options, index, total, mark) {
const opt = this.setOptions(options);

View file

@ -446,7 +446,7 @@ class Topo {
if (contourX) stepsTotal += Math.round((maxY-minY) / toolStep);
if (contourY) stepsTotal += Math.round((maxX-minX) / toolStep);
let slices = topo.slices = topo.slices || await slicer.sliceAsync(sindex, { each: (data, index, total) => {
let slices = topo.slices = topo.slices || slicer.slice(sindex, { each: (data, index, total) => {
onupdate(++stepsTaken, stepsTotal, "topo slice");
}, genso: true });