Skip to content

Mesh_3: Missing surface facets near protected curves and non-manifold material boundaries #9787

Closed

Description

@CheLamVien

Description

We use Mesh_3 to mesh a two-material implicit domain with Labeled_mesh_domain_3 and protected curves registered through add_features_and_incidences.

Environment: CGAL 6.2.1, Ubuntu 24.04, GCC 13.3, Boost 1.83, oneTBB 2021.11, Release, EPICK, 12 threads, seed 42.

Observed behaviour

  1. Some protected edges have no incident restricted surface facets. This persists after refinement and changing edge_distance.
  2. Each material's boundary contains edges with four incident triangles, distinct from valid triple junctions.

Raw non_manifold() volume results, without optimisers or cleanup:

Facet size Edge size Edge distance Tetrahedra Unsupported edges Four-triangle edges: material 1 / 2
0.5 1 0 8,219,495 65 55 / 35
0.25 1 0 14,011,599 72 37 / 19
0.125 1 0 46,549,924 71 52 / 40
0.25 1 0.5 14,020,805 71 42 / 30
0.25 1 0.25 14,024,143 63 53 / 32
0.25 0.25 0 16,805,163 86 48 / 24

An unsupported protected edge is an edge in the C3T3 feature complex with no incident restricted surface facets. The edge is present in the mesh, but it is not shared by any recovered material-interface triangle.

Input curves stay fixed; edge_size changes their mesh sampling. Reducing it to 0.25 produced 75,777 mesh segments instead of 21,069 and smaller adjacent triangles, but defects remained. Unsupported counts refer to different subdivisions. Other criteria are unchanged. Parallel scheduling can affect counts. We have not demonstrated deleted tetrahedra, and understand that non_manifold() allows non-manifold topology.

In previous volume-meshing tests, manifold() and manifold_with_boundary() did not complete within the 5–10-hour limits. A separate instrumented manifold_with_boundary() run terminated with SIGSEGV during surface refinement. The standalone reproducer did not reproduce this crash.

Expected behaviour

Recovered material interfaces and manifold boundaries per material, preserving valid triple junctions.

Questions

  1. Is it expected that registered protected edges can have no incident restricted surface facets in Labeled_mesh_domain_3, even with fine meshing criteria?
  2. How can surface recovery near protected curves be improved?
  3. How can we enforce manifold boundaries per material while preserving triple junctions?
  4. Is there an alternative to manifold() or manifold_with_boundary() for this case?

Potentially related: #9338; a shared cause is unconfirmed.

Reproducer

The attached cgal_issue_minimal/ contains the source code, input geometry, protected curves and instructions in README.md.
cgal_issue_minimal.zip

Image Image

In the images, red lines represent the protected curves, while green lines highlight non-manifold material-boundary edges. The first image also displays the mesh edges, whereas the second shows the surface without them.

Activity

  1. lrineau commented on Oct 23, 2026

    @lrineau
    Member

    Questions

    1. Is it expected that registered protected edges can have no incident restricted surface facets in `Labeled_mesh_domain_3`, even with fine meshing criteria?
    

    It is unfortunate but expected. The protect edge is in the 1D-complex of the mesh but has not incident facets in the 2D-complex.

    2. How can surface recovery near protected curves be improved?
    

    I would have say manifold() but you already showed it cannot be used.

    You can reduce the facet_distance criterion. It will force the facets of the 2D-complex to be a better approximation of the surface.

    3. How can we enforce manifold boundaries per material while preserving triple junctions?
    
    4. Is there an alternative to `manifold()` or `manifold_with_boundary()` for this case?
    

    No, and no, as far as I know. Which is strange, because I think it could be implemented.

  2. CheLamVien commented on Oct 23, 2026

    @CheLamVien
    Author

    Hi @lrineau,

    Thank you for your answers. I reduced the facet_distance to 0.001, which leads to more than 48 million tet elements, but it did not help.

  3. harshith-roy commented on Oct 25, 2026

    @harshith-roy

    Hi @janetournois and @lrineau,

    I've been investigating this issue, particularly the relationship between protected edges in the 1D feature complex and restricted surface facets in the 2D complex.

    From my initial investigation, I understand that unsupported protected edges can occur under the current meshing behavior, while enforcing manifold boundaries per material may require more substantial changes to the refinement algorithm.

    I'm interested in working on this issue and would like to investigate the underlying cause further. I'm currently looking into reproducing the reported behavior and identifying whether a targeted improvement is feasible.

    Would you recommend focusing first on surface recovery near protected curves, or on the per-material non-manifold boundaries? I'd also be happy to contribute a focused regression test or diagnostic if that would be useful.

    I'd appreciate your guidance on the most appropriate direction before making implementation changes.

    Thanks for your time!

  4. janetournois commented on Nov 17, 2026

    @janetournois
    Member

    Hello @CheLamVien ,
    thanks for your report.
    The pull-request #9855 solves your issue, provided you add a new meshing criterion : facet_normals_variation(90)). My suggestion here is 90 degrees but you can tune it as you like.
    Best,

  5. CheLamVien commented on Nov 17, 2026

    @CheLamVien
    Author

    Hi @janetournois

    Thank you for your fix. It works like a charm now.

    Best,
    Vien

  6. afabri commented on Nov 17, 2026

    @afabri
    Member

    Hello @CheLamVien,
    In case you have a project webpage or a publication, where the mesh generator is used, we would be glad to add it on the page https://www.cgal.org/projects.html

  7. CheLamVien commented on Nov 17, 2026

    @CheLamVien
    Author

    Hi @afabri,

    The current results are still WIP. However, I have one submitted paper using CGAL and another one that is already published.
    https://www.sciencedirect.com/science/article/pii/S2214180425002168
    I'll inform you when the other one gets published as well.

    Best,
    Vien

  8. CheLamVien commented on Nov 17, 2026

    @CheLamVien
    Author

    And my project is SFB 1270 ELAINE - Electrically Active Implants
    https://www.elaine.uni-rostock.de/

    Cheers,
    Vien

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions