Skip to content

Add smooth meshing strength presets #49

Closed

Description

@vycdev

Kromacut could replace the current Smooth Meshing on/off control with a strength selector.

Possible options:

  • None
  • Minimal
  • Medium
  • Aggressive

The goal is to let users choose how much smoothing they want based on the model. Some prints may only need a light cleanup around jagged edges, while others may benefit from stronger smoothing. Users should also be able to turn smoothing off entirely when they want sharper pixel-accurate geometry or faster generation.

Suggested behavior:

  • None should behave like smooth meshing is disabled today.
  • One preset should preserve the current Smooth Meshing behavior so existing users do not lose the familiar result.
  • Stronger presets should be treated carefully and validated against preview, STL export, and 3MF export.
  • The setting should be understandable as a print/model quality option, not just a visual preview effect.

Important constraint:
Smooth meshing strength must not introduce gaps, overlaps, non-manifold geometry, or broken shared boundaries between colors. This is especially important because Smooth Meshing affects exported geometry, not only the 3D preview.

Related: #40

Desired outcome:
Users can choose the amount of smoothing that fits their model, from no smoothing to a more aggressive softened edge style, while keeping generated models printable and reliable.

Activity

  1. added
    enhancement
    on Jun 29, 2026
  2. vycdev commented on Oct 1, 2026

    @vycdev
    OwnerAuthor

    Implemented and merged into develop in #86 (merge commit 406b19d).

    Smooth Meshing now offers None, Minimal, Medium, and Aggressive for the built preview and STL/3MF exports. None preserves the disabled behavior, Medium preserves the original enabled geometry, and saved on/off settings migrate automatically. Aggressive adds a stable finishing pass within the existing movement limit. The built strength is recorded in print instructions and 3MF metadata, with documentation and translations updated.

    Validation included:

    • 141 focused meshing/export/storage tests and 3 Chromium tests passing, plus build, TypeScript, lint, and translation/document checks.
    • All 65,535 nonempty 4x4 masks passing for Minimal and Aggressive: 131,070 meshes checked for rounded topology and winding. Additional randomized and precision checks passed, including 5,000 meshes using fractional pixel sizes, distant coordinates, and thin layers.
    • Diagonal regression checks across eight orientations and two pixel sizes, plus image/profile STL and 3MF fixtures. No new geometry defects were found in the review passes.
    • Comparisons against the original mesher showed no material performance regression on the tested fixtures. Medium's vertices and indices remain byte-for-byte compatible; longer timing comparisons showed at most a 0.34 ms median difference on the smaller fixtures. The repeatable benchmark is available through npm run benchmark:meshing -- cc577a7.

    Closing as completed in develop.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions