I have two meshes with the following properties:
Now I would like to subdivide
m1 so that it has approx. the same faces number as
m, i.e. 16640. I am using the vtkAdaptiveSubdivisionFilter() which according to the description:
…is a filter that subdivides triangles based on maximum edge length and/or triangle area.
My question is how to get the maximum edge length, according to some trial and error I found that this needs to be around
0.02. However, I couldn’t find any formulation that gives this number and is consistent on different meshes. Any idea how to calculate this maximum edge length each time (I would need a generic formulation since I would like to apply this on different meshes)?
More specifically I found that the maximum edge length for the above example should be between
On another example with the following two meshes:
The given maximum edge length should be between
[0.089-0.09]. I’ve tried also to play a bit with the other variable that can be set, i.e. the
maximum triangle area but no luck. There is also the option to set the maximum number of triangles which as I understood needs to be combined with one of the maximum edge length or maximum triangle area parameters but then it creates some strange output with artifacts (missing triangles), see images below:
Initial mesh to be subdivided:
Output after I set the maximum number of triangles:
so you can see that some of the triangles are discarded.
To be honest, I am not quite sure how the vtkAdaptiveSubdivisionFilter() function works.