mmg
mmg copied to clipboard
Feature/surface degeneracy
⚠️ DO NOT MERGE NOW ⚠️
🚧 Work in progress 🚧
This branch adds checks when in pattern splittings (mmg3d) : if the tetra that is split contains ref edges or ridges, the sign of the projection of the normal(s) at edge/ridge points onto the normal at the triangles that will be created is checked.
The aim is to avoid to end up with a negative projection and a faillure in : https://github.com/MmgTools/mmg/blob/9eea7ec2c4a0d4620c43edafa9da30488c536aa4/src/mmg3d/bezier_3d.c#L393-L394 .
Preliminary results: I think that we don't to integrate this feature
- forbidding some patterns leads to mesh degeneracy and very bad meshes (in term of qualities)
- checks forbid operators once the surface is already degenerated so surface approximation is not better than without this checks. See the attached picture, left mesh is the result without checking the normal projection, right mesh is the result with normal projection checking and the interdiction of splits in case of negative projection.

- time regression on continuous integration test
mmg/MecaPart/geom_1_before.mesh
. Test is run inrelease
mode and with-hmin 0.1 -hausd 0.1
command line options: master branch (commit62fc7b421
) runs in 4.530s, current branch (commit504fe7ba
) runs in 2.22min
To do (only if integration is planned)
- For now, it has been tested with Delaunay kernel. More tests would be needed
- checks have been added to pattern splits only. It is possible that we have to add similar checks in swaps / collapses