fix 0/1 bucket slicing in slicer2
This commit is contained in:
parent
4ce40c1675
commit
f41d166199
3 changed files with 6 additions and 2 deletions
|
|
@ -194,7 +194,7 @@
|
||||||
lines = [],
|
lines = [],
|
||||||
zScale = this.zScale,
|
zScale = this.zScale,
|
||||||
buckets = this.buckets,
|
buckets = this.buckets,
|
||||||
bucket = buckets.length ? buckets[Math.floor(z * zScale)] : points;
|
bucket = buckets.length ? buckets[Math.floor(z * zScale)] : this.points;
|
||||||
|
|
||||||
if (onflat) {
|
if (onflat) {
|
||||||
z += flatoff;
|
z += flatoff;
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!offset) return;
|
||||||
|
|
||||||
// add outside pass if not inside only
|
// add outside pass if not inside only
|
||||||
if (!insideOnly) {
|
if (!insideOnly) {
|
||||||
const outside = POLY.offset(shadow, roughToolDiam * proc.camRoughOver, {z: slice.z});
|
const outside = POLY.offset(shadow, roughToolDiam * proc.camRoughOver, {z: slice.z});
|
||||||
|
|
|
||||||
|
|
@ -293,10 +293,12 @@
|
||||||
stepsTotal += sindex.length * 2;
|
stepsTotal += sindex.length * 2;
|
||||||
if (proc.camContourXOn) stepsTotal += (maxX-minX) / toolStep;
|
if (proc.camContourXOn) stepsTotal += (maxX-minX) / toolStep;
|
||||||
if (proc.camContourYOn) stepsTotal += (maxY-minY) / toolStep;
|
if (proc.camContourYOn) stepsTotal += (maxY-minY) / toolStep;
|
||||||
|
|
||||||
let slices = slicer.slice(sindex, { each: (data, index, total) => {
|
let slices = slicer.slice(sindex, { each: (data, index, total) => {
|
||||||
onupdate(++stepsTaken, stepsTotal, "topo slice");
|
onupdate(++stepsTaken, stepsTotal, "topo slice");
|
||||||
}, genso: true });
|
}, genso: true });
|
||||||
processSlices(slices.map(data => data.slice));
|
|
||||||
|
processSlices(slices.filter(s => s.lines).map(data => data.slice));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue