Hi,
Without input size map, Mmg compute its own size map in order to satisfy the prescribed hausdoff distance while respecting the gradation threshold and truncating sizes by hmin/hmax parameters. On your mesh, it gives the following:
-
step 1 - computation of the size map linked to the hausdorff distance
as your input mesh contains only planar surfaces, the hausdorff distance is 0 everywhere (the discretization represent perfectly the underlying geometry) and the associated computed size map contains infinite sizes. And Mmg will not refine your boundaries on this criteron.
-
step 2 - truncation by hmin/hmax
then this size map is truncated by the hmax/hmin parameters: in your case, only the hmax parameter applies because all sizes are too large. You obtain a uniform size map equal to hmax.
-
step 3 - sizes gradation to avoid too large variations between the lengths of consecutive edges
the aim of this step is to control the mesh quality: if we have large variations for edges belonging to one element, then the element will b distorded. In your case the size map is constant so the gradation doesn’t apply.
I think that there is a misunderstanding for the hgrad parameter: it doesn’t force edge jumps to be equal to the threshold, it only ensure that the jump is not larger than this threshold.
For the comparison with the commercial mesh: It seems to detect that some edges are constrained by the geometry and will be forced to be very small. It is an approach that you have often when you work in the specific field of mesh generation (because you always start from the definition of the geometry). In Mmg, we don’t have this kind of detection (we guess that we don’t know if our mesh is a direct definition of the geometry of the object or if it is a discretization / computational mesh of the object.
To conclude: sorry, but with mmgs, you will need to compute and impose your own size map. I think that it is not too hard to do, either by directly hacking mmgs to impose small sizes on corners, either with mmgs API functions:
- you run mmgs one time in analysis mode to add corners to your mesh
- you travel your mesh nodes and impose a small size at corners and a large one on other nodes.
- you run mmgs a second time with this size map.
For the aircraft test, I think that the hausdorff threshold is too large.
Just for your info: it is my last answer on this forum because I leave the project tomorrow.
Best Regards