MmgTools / mmg

open source software for bidimensional and tridimensional remeshing
http://www.mmgtools.org
Other
375 stars 118 forks source link

Ensure that required triangles are preserved #274

Closed laetitia-m closed 4 months ago

laetitia-m commented 6 months ago

This PR

  1. Fix a bug introduced by PR #239
  2. Improve comments

Explanations of 1. A bug was introduced by PR #239: triangles required by the user in the input mesh were not preserved anymore.

Indeed, in PR #239, if the face was not MG_PARALLEL, then the tags MG_REQ+MG_SURF were removed, while only MG_SURF should have been removed if the triangle was initially required by the user.

Now, i.e. in this PR, the tag MG_REQ of edges is removed only if the edge is MG_PARALLEL and MG_SURF. By convention in ParMmg (see tag_pmmg.c in ParMmg), if an entity is

so we remove the tags MG_NOSURF and MG_REQ only if the edge is effectively MG_PARALLEL and identified as MG_NOSURF.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 50.45%. Comparing base (9e391f3) to head (3bcfeaa). Report is 16 commits behind head on develop.

Files Patch % Lines
src/mmg3d/hash_3d.c 20.00% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #274 +/- ## =========================================== - Coverage 50.47% 50.45% -0.02% =========================================== Files 174 176 +2 Lines 47158 47202 +44 Branches 10259 10263 +4 =========================================== + Hits 23802 23818 +16 - Misses 15633 15652 +19 - Partials 7723 7732 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Algiane commented 4 months ago

Thanks!