algorithm_to_mesh_handler#
- algorithm_to_mesh_handler(
- mesh_or_algo,
- port=0,
Handle vtkAlgorithm where mesh objects are expected.
This is a convenience method to handle vtkAlgorithm when passed to methods that expect a
DataSet. This method will check if the passed object is a vtkAlgorithm or vtkAlgorithmOutput and if so, return that algorithm’s output dataset (mesh) as the mesh to be used by the calling function.- Parameters:
- mesh_or_algo
DataSet| vtkAlgorithm | vtkAlgorithmOutput The input to be used as a data set (mesh) or vtkAlgorithm object.
- port
int, default: 0 If the input (
mesh_or_algo) is an algorithm, this specifies which output port to use on that algorithm for the returned mesh.
- mesh_or_algo
- Returns:
- mesh
pyvista.DataSet The resulting mesh data set from the input.
- algorithmvtkAlgorithm | vtkAlgorithmOutput |
None If an algorithm is passed, it will be returned. Otherwise returns
None.
- mesh