pymeshfix.clean_from_arrays#

pymeshfix.clean_from_arrays = <nanobind.nb_func object>#

numpy.ndarray[dtype=int32, shape=(*, *), order=’C’, writable=False], verbose: bool = False, joincomp: bool = False, remove_smallest_components: bool = True) -> tuple

Clean and repair a triangular surface mesh from vertex and face arrays.

Parameters:
  • v (numpy.ndarray[np.float64]) – Vertex array of shape (n, 3).

  • f (numpy.ndarray[np.int32]) – Face array of shape (m, 3).

  • verbose (bool, default: False) – Enable verbose output.

  • joincomp (bool, default: False) – Attempt to join nearby open components.

  • remove_smallest_components (bool, default: True) – Remove all but the largest connected component before repair.

Returns:

  • numpy.ndarray – Cleaned vertex array.

  • numpy.ndarray – Cleaned face array.

Examples

>>> import pymeshfix
>>> import numpy as np
>>> points = np.load('points.npy')
>>> faces = np.load('faces.npy')
>>> clean_points, clean_faces = pymeshfix.clean_from_arrays(points, faces)
Type:

clean_from_arrays(v

Type:

numpy.ndarray[dtype=float64, shape=(*, *), order=’C’, writable=False], f