fix bottom/last pass for rough and outline ops (zBottom, slicer up errors)

This commit is contained in:
Stewart Allen 2023-10-13 22:31:25 -04:00
commit 5193e22379
2 changed files with 4 additions and 4 deletions

View file

@ -227,7 +227,7 @@ class OpRough extends CamOp {
let shadow = [];
let slices = [];
let indices = slicer.interval(roughDown, {
down: true, min: zBottom, fit: true, off: 0.01
down: true, min: 0, fit: true, off: 0.01
});
// shift out first (top-most) slice
indices.shift();
@ -510,7 +510,7 @@ class OpOutline extends CamOp {
let shadow = [];
let slices = [];
let intopt = {
down: true, min: zBottom, fit: true, off: 0.01,
down: true, min: 0, fit: true, off: 0.01,
max: op.top ? zMax + ztOff : undefined
};
let indices = slicer.interval(op.down, intopt);

View file

@ -216,7 +216,7 @@ class Slicer {
const promises = []
for (let bucket of buckets) {
promises.push(sliceFn(bucket, opt, slice => {
promises.push(sliceFn(bucket, { ...opt, minZ: this.bounds.min.z }, slice => {
track.count++;
if (opt.progress) {
opt.progress(track.count, track.total);
@ -281,7 +281,7 @@ class Slicer {
let links = opt.links !== false,
dedup = opt.dedup !== false,
edges = opt.edges || false,
over = opt.over || false,
over = opt.over || z <= opt.minZ,
debug = opt.debug,
phash = {},
lines = [];