Maximum edge length for vtkAdaptiveSubdivisionFilter()


I have two meshes with the following properties:

m_faces: 16640
m_points: 49920
m_area: 178.82696989147524

m1_faces: 8
m1_points: 24
m1_area: 1.440205667851934

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)?


1 Like

More specifically I found that the maximum edge length for the above example should be between [0.0188-0.0265].

On another example with the following two meshes:

Sph1_faces: 390
Sph1_points: 1170
Sph1_area: 1.9251713393584104

Sph2_faces: 1722
Sph2_points: 5166
Sph2_area: 10.59400389764954

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.