Skip to content

Smoothed relief STL retains coincident internal layer caps #111

Done

Description

@vycdev

🤖 This was created by Codex using the GPT-6.1-Sol model on xhigh reasoning effort, during automated macOS end-to-end testing.

Environment

macOS 27.0.1 (26A434), Apple M6 Mac mini per host brief, arm64; official v4.2.0 aarch64 DMG copied to /Applications. Main/release commit 9487475. Observed on Mac; the export code is shared, so this is not established as Mac-specific.

Reproduction

Create a 32×24 transparent PNG with nested opaque rectangles (Pillow example):

from PIL import Image, ImageDraw
im = Image.new("RGBA", (32, 24))
d = ImageDraw.Draw(im)
for box, color in [
    ((2, 2, 29, 21), "#00ff00"),
    ((6, 5, 24, 18), "#ffff00"),
    ((10, 8, 20, 15), "#000000"),
    ((13, 10, 17, 13), "#ffffff"),
]:
    d.rectangle(box, fill=color)
im.save("nested-colors.png")
  1. Import the PNG; 3D → Auto-paint. Four filaments: white #ffffff HD .677; black #000000 HD .05; green #00ff00 HD .885; yellow #ffff00 HD .556.
  2. XY .1 mm/pixel, regular layer .12, first .20 mm, max height 5 mm. Enhanced on, Fast, Uniform, Compact 80%, repeats Off. Separation, dithering, Flat Paint and isolated-speck cleanup off.
  3. Smooth Meshing Aggressive, Build 3D Model, export STL. Observed stack: black .20, white .48, yellow .36, green .24; total 1.28 mm / 10 physical layers.
  4. Repeat from a fresh app launch, import the same inputs and rebuild/export. Compare with Smooth None.

Expected / actual

Expected: the documented single-geometry STL has a manifold exterior without coincident opposite internal faces at material-layer interfaces. 3MF should retain separate physical layer objects.

Actual in both native exports: 492 triangles, 90 coincident opposite-normal face pairs, and 185 coordinate edges incident to four triangles. No open boundary or degenerate triangles. Both exports are byte-identical (SHA-256 6233f591d89049c35ec5faa1b1c0e22fd2935f0f0324c1884a31954106f43213). These counts also occur with exact float coordinates, so they are not a rounding artifact.

The None STL has 108 triangles, zero duplicate face pairs, zero open edges and zero >2-incidence edges. The corresponding Aggressive 3MF has ten individually closed, manifold layer meshes without duplicate faces per object; shared interfaces are appropriate between separate 3MF objects.

Severity assessed as Medium: this is a concrete mesh-topology finding; I have not verified a failed slice or print and do not claim every slicer rejects it. Workaround: use 3MF, or None for a unified STL.

Cause / fix direction after reproduction

Smoothed layers set compactHeightfield:false; exportObjectToStlBlob then concatenates their closed meshes, retaining opposing caps at shared Z planes. The unsmoothed path compacts into one heightfield exterior. Existing smooth STL coverage checks a single layer or individual layers, which does not catch the aggregate interfaces. A fix needs a manifold union/exterior strategy that preserves smooth boundaries; simply enabling unsmoothed heightfield compaction would discard the chosen smoothing. No speculative geometry PR proposed.

Evidence / duplicate search

Local root /Users/vycdev/Desktop/kromacut-e2e/:

  • exports/relief-aggressive.stl and relief-aggressive-trial2.stl
  • exports/relief-aggressive.3mf and relief-none.stl
  • perf/smoothed-stl-topology.json and perf/validate-exports.py
  • screenshots/relief-aggressive.png and relief-aggressive-trial2.png (built strength, 1.28 mm model and successful save)

Searched open/closed issues and PRs. #40 addresses lateral boundaries between side-by-side colors in a multi-head layer, rather than coincident caps between stacked physical layers in a single STL. #49/#86 introduce smoothing presets but do not report this combined-STL case. No duplicate found; no comments added to existing reports.

Activity

  1. vycdev commented on Dec 1, 2026

    @vycdev
    OwnerAuthor

    Fixed in develop by #257. It ships in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions