Cavity operators
Remesher implementation: the cavity operator
Given a mesh entity (a vertex or an edge in the present case), the cavity is the set of mesh elements that contain the entity .
A cavity can be filled from a vertex as the set of elements created from and the faces of the boundary of the cavity (oriented outwards).
Edge collapse using cavity operators
The collapse of edge can be performed as follow
- check the tags
- if and , do not collapse
- if and , swap indices and
- build the vertex cavity
- fill the vertex cavity from :
- if passes all the criteria for swaps
- remove all the elements from from the mesh
- insert all the elements from to the mesh
What to do with the metric ?
Edge split using cavity operators
The collapse of edge can be performed as follow
- build the edge cavity
- create the midpoint , project it onto the geometry if needed, and compute the metric
- fill the vertex cavity from :
- if passes all the criteria for swaps
- remove all the elements from from the mesh
- insert verted (with metric ) to the mesh
- insert all the elements from to the mesh
Edge swap using cavity operators
The swap of edge can be performed as follow
- build the edge cavity
- compute
- if is too low, loop over all the vertices on the boundary of C (that are neither nor )
- fill the vertex cavity from :
- if passes all the criteria, it is a valid candidate
- if valid candidates are available, let be the best one (the one with for which the minimum element quality is maximum)
- remove all the elements from from the mesh
- insert all the elements from to the mesh
Smoothing using cavity operators
The smoothnig of vertex can be performed as follow
- build the vertex cavity
- compute
- compute the subset of the vertices in that are tagged in the same entity as or one of its children, and average the positions of these vertices to obtain the new position
- if is on a boundary, project on the geometry
- fill the vertex cavity from :
- if :
- locate the element of that contains (or is the closest), and interpolate the metric in using the barycentric coordinates
- update the location and metric of vertex