fix support z (y) touching bed. fix slice support offset

This commit is contained in:
Stewart Allen 2021-01-24 10:45:40 -05:00
commit 5af2e5a509
2 changed files with 7 additions and 2 deletions

View file

@ -202,6 +202,8 @@
return;
}
if (!iw) return;
p1.y = Math.max(0, p1.y);
p2.y = Math.max(0, p2.y);
let hy = (p1.y + p2.y) / 2;
let dh = Math.abs(p1.y - p2.y);
let dw = api.conf.get().process.sliceSupportSize / 2;

View file

@ -200,8 +200,11 @@
if (Math.abs(pslice.z - slice.z) > gap) {
continue;
}
// TODO: offset pslice tops by spro.sliceSupportOffset
let ptops = pslice.topPolys();
// offset pslice tops by spro.sliceSupportOffset
if (!pslice.synth_off) {
pslice.synth_off = POLY.offset(pslice.topPolys(), nozzleSize/2 + spro.sliceSupportOffset);
}
let ptops = pslice.synth_off;
let ntops = [];
POLY.subtract(tops, ptops, ntops, null, slice.z, 0);
tops = ntops;