Level-set and anisotropic mesh optimization


Thanks a lot for creating MMG - I am making good progress on solving some 3D remeshing problems with it.

I wondered if it’s possible to prescribe both an isosurface for discretization and a metric for anisotropic mesh improvement for a single call to mmg3dls, or if I must first call mmg3dls for the isosurface cut, and then a second call to mmg3dlib to improve the mesh?



Hi Joe,

Thank you for using Mmg!

You can prescribe both an isosurface and a metric in a single call but it is currently in ß-test (especially with anisotropic mesh adaptation that is less stable than the isotropic case).
To use this new feature, you will need to checkout the develop branch of the project:
git checkout develop.

How to use this feature

Using the API

  • you will find an example of level-set discretization + mesh adaptation in the following directory: mmg/libexamples/mmg3d/IsosurfDiscretization_lsAndMetric/main.c
  • you will find an example of level-set discretization without mesh adaptation (old behaviour) here:

With command line

  • you can still provide your level-set with the -sol ls-file.sol argument;
  • you can provide your metric with the -met metric-file.sol argument.

Finally : for now this feature doesn’t support other I/O than Medit or API.



Great! I will give it a shot and let you know if I run into any issues.

thanks a lot