Hello everybody,
I’m new using mmg. I need to remesh meshes in vtp format, controlling the cell size according to a metric. So as I understood, I need to use a size map. However I can’t succeed to make mmgs take this size map into account.
For now I already just try to remesh with a constant size. If I provide this constant size at command line (mmgs_O3 test.vtp -hsiz .001
), it works as expected
However if I save this same size in point data, suffixed with :metric
(as explained in the prerequisite section)
> mesh.point_data["size:metric"]
pyvista_ndarray([0.001, 0.001, 0.001, ..., 0.001, 0.001, 0.001])
Then running mmgs_O3 test.vtp
just remeshes ignoring the size map.
I note however that mmgs does read this field, as if I create another one suffixed with :metric
, it fails with an error ## Error:MMG5_count_vtkEntities: 2 metric fields detected (labelled with a string containing the 'metric' keyword).
.
So, I must be missing something, but can’t find what. What do I miss for mmgs to take this size into account?
Thank you in advance!
Edit: ah just found something. Actually I have cell data on this mesh, and in verbose mode, mmgs complained that “SEVERAL SOLUTION => IGNORED: 2”. If I delete the mesh data, remeshing works taking the size map into account.
So I guess I found my answer, but why is this cell data blocking remeshing? Its name doesn’t contain :metric
.