From acc773e9d78d963b49023f54a6a231511f05a3bb Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 19 Feb 2021 12:09:39 -0500 Subject: [PATCH] fix support density in ranges --- src/mode/fdm/prepare.js | 2 +- src/mode/fdm/slice.js | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index e6f5ee92..be1c7c07 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -524,7 +524,7 @@ } // add brim, if specified if (first && firstLayerBrim) { - let {emit, tool } = first; + let { emit, tool } = first; let y = maxy; let z = minz; let b = Math.max(firstLayerBrim, 1); diff --git a/src/mode/fdm/slice.js b/src/mode/fdm/slice.js index c38e9e73..f090632e 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -398,18 +398,21 @@ }); lastType = newType; }, "infill"); - } else if (isSynth && supportDensity) { + } else if (isSynth) { forSlices(0.5, 0.7, slice => { + let params = getRangeParameters(settings, slice.index); + let density = params.sliceSupportDensity; + if (density) for (let top of slice.tops) { let 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); } }, "infill"); } - // belt supports are their own thing + // auto support generation if (!isBelt && !isSynth && supportDensity && spro.sliceSupportEnable) { forSlices(0.7, 0.8, slice => { doSupport(slice, spro, shadow);