Skip to content

mkit.io.pyvista

as_poly_data

as_poly_data(mesh: AnySurfaceMesh) -> PolyData

as_unstructured_grid

as_unstructured_grid(mesh: AnyMesh) -> UnstructuredGrid

is_point_cloud

is_point_cloud(mesh: PolyData) -> bool

Determine if a given PyVista PolyData object represents a point cloud.

A point cloud is characterized by having the number of points plus the number of lines equal to the number of cells.

Parameters:

  • mesh (PolyData) –

    The PyVista PolyData object to check.

Returns:

  • bool

    True if the PolyData object is a point cloud, False otherwise.

Reference
  1. https://github.com/pyvista/pyvista/blob/main/pyvista/core/filters/poly_data.py#L1724-L1728

make_tet_mesh

make_tet_mesh(
    _points: ArrayLike, _tetra: ArrayLike
) -> UnstructuredGrid

read_poly_data

read_poly_data(fpath: StrPath) -> PolyData