fix support density in ranges

This commit is contained in:
Stewart Allen 2021-02-19 12:09:39 -05:00
commit acc773e9d7
2 changed files with 7 additions and 4 deletions

View file

@ -524,7 +524,7 @@
} }
// add brim, if specified // add brim, if specified
if (first && firstLayerBrim) { if (first && firstLayerBrim) {
let {emit, tool } = first; let { emit, tool } = first;
let y = maxy; let y = maxy;
let z = minz; let z = minz;
let b = Math.max(firstLayerBrim, 1); let b = Math.max(firstLayerBrim, 1);

View file

@ -398,18 +398,21 @@
}); });
lastType = newType; lastType = newType;
}, "infill"); }, "infill");
} else if (isSynth && supportDensity) { } else if (isSynth) {
forSlices(0.5, 0.7, slice => { forSlices(0.5, 0.7, slice => {
let params = getRangeParameters(settings, slice.index);
let density = params.sliceSupportDensity;
if (density)
for (let top of slice.tops) { for (let top of slice.tops) {
let offset = []; let offset = [];
POLY.expand(top.shells, -nozzleSize/4, slice.z, offset); POLY.expand(top.shells, -nozzleSize/4, slice.z, offset);
fillSupportPolys(offset, lineWidth, supportDensity, slice.z); fillSupportPolys(offset, lineWidth, density, slice.z);
top.fill_lines = offset.map(o => o.fill).flat().filter(v => v); top.fill_lines = offset.map(o => o.fill).flat().filter(v => v);
} }
}, "infill"); }, "infill");
} }
// belt supports are their own thing // auto support generation
if (!isBelt && !isSynth && supportDensity && spro.sliceSupportEnable) { if (!isBelt && !isSynth && supportDensity && spro.sliceSupportEnable) {
forSlices(0.7, 0.8, slice => { forSlices(0.7, 0.8, slice => {
doSupport(slice, spro, shadow); doSupport(slice, spro, shadow);