Remesh surfacic holes
API function: algo.remeshSurfacicHoles
As part of your mesh optimization process, you can fill surfacic holes in your mesh model. This feature fills holes from selected occurrences, with the possibility to fill them with a continuous surface following local polygon density.
This example shows a model before and after processing:
Tip
When experimenting, we recommend that you first use the repair mesh function before using this function, as it will eliminates some boundaries that this algorithm will try filling and that might lead to unexpected results.
Parameters
Occurrences
Select occurrences on which to look for surfacic holes to fill.
Max diameter
Set the maximum diameter (in mm) of the holes to find and fill. Holes with a bigger diameter are ignored and left as-is. Setting a negative value will result in all size of holes being considered and filled.
Refine
Ticking this box adds a refinement pass after a simple filling of the hole, resulting in a more continuous surface. The density is set according to the local density around the hole. When unticked, the hole will be filled by created triangles linking the existing points, but without creating additional triangles. This will result in a less detailed filling surface.
Here are the results obtained with and without refinement:
Number of neighbors
Select the number of neighbors to consider around the borders of the holes in order to infer the newly created surface. Increasing this value will increase the algorithm complexity. Reducing it is recommended when the model has sharp edges located at very close neighborhood.
Tip
The default number of neighbors is 3, which is a good compromise that seems to work in most cases. It is to note that this parameter is not used when refine is not ticked.
Fill with material
Set the ID of the material to use for the filling part created by the algorithm.
Algorithm principle and limitations
The way this algorithm works is in two steps :
- First, it computes a filling mesh by connecting border vertices together
- Second, when refine is ticked, it computes an aextrapolating surface to fill the hole based on Moving Least Square (MLS) approaches. It then progressively subdivises created triangles, projecting the new points on this extrapolating surface.
The MLS approach fits spheres with respect to some input points: the n-neighborhood of the border (n being user chosen). This means that the resulting surface will have progressive curvature. This is adapted to organic shapes, like those obtained after a 3D scan. It also means that the resulting surface might not always be what is expected, like in this case:
What is happening here, is that the computed surface corresponds to the whole sphere. However, the projection happens on the closest side, which is the side where we already have a mesh in our case, leading to self intersections.
To remove other type of holes (blind holes or through hole), see remove holes.