The vtkhdf_converter.py module#

Summary#

pd_to_vtkhdf

Write the PyVista PolyData directly to a VTKHDF file.

vtkhdf_to_pd

Read a VTKHDF file and convert it to PyVista PolyData.

ug_to_vtkhdf

Write the PyVista UnstructuredGrid directly to a VTKHDF file.

vtkhdf_to_ug

Read a VTKHDF file and convert it to PyVista UnstructuredGrid.

Description#

Utils module for VTKHDF management.

Module detail#

vtkhdf_converter.pd_to_vtkhdf(pd: pyvista.PolyData, output_vtkhdf_file: str | pathlib.Path) pathlib.Path#

Write the PyVista PolyData directly to a VTKHDF file.

Parameters:
pdpv.PolyData

The PyVista PolyData to be written.

output_vtkhdf_fileUnion[str, Path]

The output VTKHDF file path.

Returns:
Path

The path to the saved VTKHDF file.

vtkhdf_converter.vtkhdf_to_pd(input_vtkhdf_file: str | pathlib.Path) pyvista.PolyData#

Read a VTKHDF file and convert it to PyVista PolyData.

Parameters:
input_vtkhdf_fileUnion[str, Path]

The input VTKHDF file path.

Returns:
pv.PolyData

The converted PyVista PolyData.

vtkhdf_converter.ug_to_vtkhdf(ug: pyvista.UnstructuredGrid, output_vtkhdf_file: str | pathlib.Path) pathlib.Path#

Write the PyVista UnstructuredGrid directly to a VTKHDF file.

Parameters:
ugpv.UnstructuredGrid

The PyVista UnstructuredGrid to be written.

output_vtkhdf_fileUnion[str, Path]

The output VTKHDF file path.

Returns:
Path

The path to the saved VTKHDF file.

vtkhdf_converter.vtkhdf_to_ug(input_vtkhdf_file: str | pathlib.Path) pyvista.UnstructuredGrid#

Read a VTKHDF file and convert it to PyVista UnstructuredGrid.

Parameters:
input_vtkhdf_fileUnion[str, Path]

The input VTKHDF file path.

Returns:
pv.UnstructuredGrid

The converted PyVista UnstructuredGrid.