pymeshfix.MeshFix#

class pymeshfix.MeshFix(*args)#

Cleans and tetrahedralize surface meshes using MeshFix

Parameters:

args (pyvista.PolyData or (np.ndarray, np.ndarray)) – Either a pyvista surface mesh pyvista.PolyData or a (n x 3) vertex array and (n x 3) face array (indices of the triangles).

Examples

Create a meshfix object from a pyvista mesh.

>>> from pyvista import examples
>>> import pymeshfix as mf
>>> cow = examples.download_cow()
>>> meshfix = mf.MeshFix(holy_cow)
>>> meshfix = mf.MeshFix(points, faces)

Methods

MeshFix.extract_holes()

Extract the boundaries of the holes in this mesh to a new PyVista mesh of lines.

MeshFix.faces()

Indices of the faces of the mesh

MeshFix.load_arrays(v, f)

Loads triangular mesh from vertex and face numpy arrays.

MeshFix.plot([show_holes])

Plot the mesh.

MeshFix.points()

Points of the mesh

MeshFix.repair([verbose, joincomp, ...])

Performs mesh repair using MeshFix's default repair process.

MeshFix.save(filename[, binary])

Writes a surface mesh to disk.

Attributes

MeshFix.mesh

Return the surface mesh