Repository navigation
Export a smoothed relief STL as one closed solid instead of stacked layer shells - #257
Merged
Merged
Conversation
Smoothed relief layers are closed slabs, and the STL wrote them one after another, keeping two opposite caps on every layer interface. Tag the layers with their stack data, and have the STL exporter build one stepped solid over a shared tessellation of the layers' coverage counts with the Flat Paint solid mesher. Diagonal contacts the tessellation does not join are bridged like the unsmoothed STL's heightfield. Preview and 3MF are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ilt, and keep export progress monotonic Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ress moving forward Co-Authored-By: Claude Opus 5.5 <[email protected]>
…queue Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
vycdev
force-pushed
the
t3/smooth-relief-stl-solid
branch
from
November 30, 2026 20:35
2804c81 to
cd8938b
Compare
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With Smooth Meshing on, a relief STL wasn't one solid. It was every color layer's closed slab written one after another, so each layer interface kept two opposite caps in the same plane, and walls met four to an edge. PrusaSlicer reads such a file as one part per layer. The issue's 4-color image gave 90 coincident face pairs and 185 edges shared by four triangles.
Now the STL is one closed stepped solid. Smoothed relief layers carry their stack data (mask, Z range, strength), and the STL exporter builds the solid with the existing Flat Paint solid mesher. It runs over one shared outline smoothing of all layers, labeled by how many layers cover each pixel. Caps appear only on the outside, walls split wherever another face meets them, and no faces sit inside the model. Where two diagonal pixels rise above both of their neighbors and would touch only at a corner, which an STL can't keep apart, the higher neighbor is raised to bridge them. The unsmoothed STL already does the same, and it keeps the full-pixel bridges the smoothed layers had in checkered and dithered areas. Anything that isn't a smoothed relief stack of two or more layers (a single layer, masks not nested, other meshes, different transforms, non-finite heights) falls back to the old path, and so does a solid the mesher fails to build.
The preview and the 3MF are unchanged, and so is the STL with Smooth Meshing off. I first tried building the preview and 3MF layers on the shared outline too, so all three would match. It made 18× more triangles on a 256×256, 8-layer relief, so I kept this STL-only.
What changes in the print
--infopartsThe outline differs slightly from before and from the preview. The per-layer smoothing caps each rectangle from corner to corner, so long straight edges get pulled in by up to about 0.35 px (0.035 mm here). The shared outline keeps every boundary vertex, so straight edges stay put and only corners round. On this small image that is about 6% more volume at Medium. It is a sliver along each outline, so the share shrinks as regions get larger.
Size and time cost (Medium, Node on Apple silicon):
Tests (
tests/smoothReliefStl.test.ts, new)npm test(1361 pass), lint,tsc -b,test:i18n,test:docs,test:e2e:all(all 8 suites).No docs change: the docs already describe the STL as a single-geometry model. Changelog under Unreleased → Fixed.
Fixes #111
Council review
Rounds: 5. Only two providers are available here, so there is no third seat.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code