change support growth location so they can be properly clipped later

This commit is contained in:
Stewart Allen 2022-10-31 19:35:47 -04:00
commit 0976b3181f
2 changed files with 5 additions and 3 deletions

View file

@ -27,6 +27,11 @@ base.slicePost.FDM = function(data, options) {
const { shellOffset, fillOffset, clipOffset } = post_args;
data.tops = POLY.nest(groups);
if (isSynth) {
const process = post_args.process;
if (process.sliceSupportGrow > 0) {
// expand synth supports here so they can be clipped later
data.tops = POLY.expand(data.tops, process.sliceSupportGrow, data.z, []);
}
// do not shell synth widgets because
// they will be clipped against peers later
// which requires shelling post-clip

View file

@ -781,9 +781,6 @@ FDM.slice = function(settings, widget, onupdate, ondone) {
let params = slice.params || process;
let density = params.sliceSupportDensity;
let supports = slice.topShells();
if (params.sliceSupportGrow > 0) {
supports = POLY.expand(supports, params.sliceSupportGrow, slice.z, []);
}
slice.supports = supports;
slice.tops = undefined; // remove outline leave only supports
let polys = [];