Skip to content

mkit.io.pyvista

as_poly_data

as_poly_data(mesh: AnySurfaceMesh) -> PolyData

as_unstructured_grid

as_unstructured_grid(mesh: Any) -> 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/556d86725f27c43e30445c877961910d0fff0893/pyvista/core/filters/poly_data.py#L1730-L1734

load_obj

load_obj(fpath: StrPath) -> PolyData

load_poly_data

load_poly_data(fpath: StrPath) -> PolyData

make_tet_mesh

make_tet_mesh(
    points: FN3Like, tetra: IN4Like
) -> UnstructuredGrid

save_obj

save_obj(mesh: PolyData, fpath: StrPath) -> None