capytaine.meshes.properties module

Helper functions to compute some properties of the mesh. Based on meshmagick <https://github.com/LHEEA/meshmagick> by François Rongère.

capytaine.meshes.properties.compute_connectivity(mesh)[source]

Compute the connectivities of the mesh.

It concerns further connectivity than simple faces/vertices connectivities. It computes the vertices / vertices, vertices / faces and faces / faces connectivities.

Note

  • Note that if the mesh is not conformal, the algorithm may not perform correctly

TODO: The computation of boundaries should be in the future computed with help of VTK

capytaine.meshes.properties.compute_faces_properties(mesh)[source]

Compute the faces properties of the mesh

capytaine.meshes.properties.compute_radiuses(mesh, faces_centers)[source]

Compute the radiuses of the faces of the mesh.

The radius is defined here as the maximal distance between the center of mass of a cell and one of its points.

capytaine.meshes.properties.connected_components(mesh)[source]

Returns a list of meshes that each corresponds to the a connected component in the original mesh. Assumes the mesh is mostly conformal without duplicate vertices.

capytaine.meshes.properties.connected_components_of_waterline(mesh, z=0.0)[source]