capytaine.meshes.quality module

Tools for mesh quality and mesh healing. Based on meshmagick <https://github.com/LHEEA/meshmagick> by François Rongère.

capytaine.meshes.quality.merge_duplicate_rows(arr, atol=1e-08)[source]

Returns a new node array where close nodes have been merged into one node (following atol).

Parameters:
  • arr (array_like) – array of the coordinates of the mesh’s nodes

  • atol (float, optional) – the tolerance used to define nodes that are coincident and that have to be merged

Returns:

  • arr (ndarray) – array of the coordinates of the mesh’s nodes where every node is different

  • newID (ndarray) – array of the new new vertices IDs

capytaine.meshes.quality.merge_duplicates(mesh, atol=1e-08)[source]

Merges the duplicate vertices of the mesh in place.

Parameters:

atol (float, optional) – Absolute tolerance. default is 1e-8

Returns:

new_id – Array of indices that merges the vertices.

Return type:

ndarray

capytaine.meshes.quality.print_quality(mesh)[source]

Returns data on the mesh quality. Needs to be tested…

It uses VTK and is reproduced from http://vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Verdict/Testing/Python/MeshQuality.py