The vtkhdf_converter.py module#
Summary#
Write the PyVista PolyData directly to a VTKHDF file. |
|
Read a VTKHDF file and convert it to PyVista PolyData. |
|
Write the PyVista UnstructuredGrid directly to a VTKHDF file. |
|
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:
- pd
pv.PolyData The PyVista PolyData to be written.
- output_vtkhdf_file
Union[str,Path] The output VTKHDF file path.
- pd
- Returns:
PathThe 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_file
Union[str,Path] The input VTKHDF file path.
- input_vtkhdf_file
- Returns:
pv.PolyDataThe 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:
- ug
pv.UnstructuredGrid The PyVista UnstructuredGrid to be written.
- output_vtkhdf_file
Union[str,Path] The output VTKHDF file path.
- ug
- Returns:
PathThe 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_file
Union[str,Path] The input VTKHDF file path.
- input_vtkhdf_file
- Returns:
pv.UnstructuredGridThe converted PyVista UnstructuredGrid.