move thin wall code into functions

This commit is contained in:
Stewart Allen 2025-02-23 09:55:20 -05:00
commit bf5f783c7a
4 changed files with 118 additions and 87 deletions

View file

@ -1000,6 +1000,7 @@ function doRender(slice, isSynth, params, opt = {}) {
if (slice.tops) // missing for supports
slice.tops.forEach(top => {
console.log({ render: top });
if (isThin) output
.setLayer('part', Color.part)
.addPolys([top.poly]);
@ -1024,7 +1025,7 @@ function doRender(slice, isSynth, params, opt = {}) {
.setLayer("thin fill", Color.thin)
.addLines(top.thin_fill, vopt({ offset, height }));
if (top.gaps) output
if (top.gaps && devel) output
.setLayer("gaps", Color.gaps)
.addPolys(top.gaps, vopt({ offset, height, thin: true }));