-nr option in MMG level set mode and Tangents/Normals/Corners/Ridges in output mesh file


#1

Dear Algiane, dear developpers,

I noticed several “unexpected” behaviors when trying to use the -ls mode combined with -nr:

  • MMG3D writes the following field in the output mesh even if the option “-nr” is used:
    - Corners
    - RequiredVertices
    - Normals
    - NormalAtVertices
    - Tangents
    - TangentAtVertices
    - Edges
    - Ridges
  • The output mesh computed is dependent on whether the above fields are present or not in the input mesh file. I observed that the fields “Tangents” and “Normals” have an influence even if “Corners” and “Ridges” are not present (and even with the last commit b61df0 on the develop version). These behaviors are not encountered in mmg2D.

Could you explain the meaning of these fields (in particular, Tangents and Normals) and how they are taken into account by the -ls mode. In my application, I would like to preserve the “flatness” of the bounding box by specifying a set of ridges and corners, and I would like these to be preserved “as is” after successive applications of MMG (so without getting new ridges and corners). Right now, I am cleaning the output mesh file from all the extra fields because they tend to create very ill shaped mesh after a few iterations.

Many thanks for your help,
Florian


#2

Hi Florian,

Thank you for this feedback.

  • The -nr mode allows to disable the sharp angle detection but doesn’t change the Mmg outputs : the corners, ridges and required entities created by Mmg are saved. In level-set mode, ridges are created along non-manifold edges, thus you may obtain such edges in your output mesh.

  • When Mmg read a mesh with input normals and tangents, it ignores the tangents but read the normals and uses it if they belongs to regular points. Thus, the provided normals can modified the Mmg remeshing (because they may be different from the normals computed by Mmg).

Thanks to your remarks, since the release 5.4.0, in level-set mode :

  • the input normals are ignored by Mmg (because in an iterative process of level-set discretization, you are right, the outputs normals belonging to the level-set of the previous iteration are meaningless);

  • the input corners belonging to the level-set are ignored.

We will continue to think on how improve the behaviour of Mmg regarding the singularities in level-set mode.

I will keep you aware.
Regards,

Algiane.