- PolyData.fill_holes(hole_size, inplace=False, progress_bar=False)¶
Fill holes in a pyvista.PolyData or vtk.vtkPolyData object.
Holes are identified by locating boundary edges, linking them together into loops, and then triangulating the resulting loops. Note that you can specify an approximate limit to the size of the hole that can be filled.
This method is known to segfault. Use at your own risk.
Specifies the maximum hole size to fill. This is represented as a radius to the bounding circumsphere containing the hole. Note that this is an approximate area; the actual area cannot be computed without first triangulating the hole.
Return new mesh or overwrite input.
Display a progress bar to indicate progress.
Mesh with holes filled if
Create a partial sphere with a hole and then fill it.
>>> import pyvista as pv >>> sphere_with_hole = pv.Sphere(end_theta=330) >>> sphere = sphere_with_hole.fill_holes(1000) >>> edges = sphere.extract_feature_edges(feature_edges=False, ... manifold_edges=False) >>> assert edges.n_cells == 0