VTKConverter#
- class ansys.tools.visualization_interface.backends.usd.vtk_converter.VTKConverter#
Convert VTK files to USD format for visualization.
Overview#
Load a VTK asset into a given stage. |
Convert a VTK file to a USD file. |
|
Convert a VTK file to a USD stage. |
|
Get the appropriate VTK reader based on the file extension. |
|
Convert VTK polydata to USD mesh geometry. |
|
Convert a USD mesh to VTK polydata. |
Import detail#
from ansys.tools.visualization_interface.backends.usd.vtk_converter import VTKConverter
Method detail#
- static VTKConverter.convert_vtk_file_to_usd(vtk_file_path: str | pathlib.Path, stage: pxr.Usd.Stage = None) None#
Convert a VTK file to a USD file.
- Parameters:
- vtk_file_path
Union[str,Path] Path to the VTK file to convert.
- stage
Usd.Stage Stage to add the converted USD data to.
- vtk_file_path
- static VTKConverter.convert_vtk_to_usd(data: vtk.vtkDataSet, stage: pxr.Usd.Stage = None, mesh_name: str = 'VTKMesh') pxr.Usd.Stage#
Convert a VTK file to a USD stage.
- Parameters:
- vtk_file_path
Union[str,Path] Path to the VTK file to convert.
- stage
Usd.Stage Stage to add the VTK data to.
- vtk_file_path
- Returns:
Usd.StageStage containing the VTK data.
- static VTKConverter.get_vtk_reader(file_path: pathlib.Path) vtk.vtkAlgorithm#
Get the appropriate VTK reader based on the file extension.
- Parameters:
- file_path
Path Path to the VTK file.
- file_path
- static VTKConverter.convert_polydata_to_usd_mesh(polydata: vtk.vtkPolyData, stage: pxr.Usd.Stage = None, mesh_name: str = 'VTKMesh') None#
Convert VTK polydata to USD mesh geometry.
- Parameters:
- polydata
vtk.vtkPolyData VTK polydata to convert.
- stage
Usd.Stage USD stage to add the mesh to.
- mesh_name
str, default:"VTKMesh" Name of the mesh in USD.
- polydata