pysdic.Mesh.from_vtk_file#
- classmethod Mesh.from_vtk_file(file_path, *, element_type=None, load_properties=True, use_module='meshio')[source]#
Create a mesh from a legacy VTK file (
.vtk) with a single cell type.The points are always 3D (\(E = 3\)).
See also
to_vtk_file()for the reverse operation.
- Parameters:
file_path (Union[str, os.PathLike]) – The path to an existing VTK file, with the extension
.vtk.element_type (Optional[str], optional) – The type of the elements. By default, it is inferred from the cells.
load_properties (bool, optional (default:
True)) – If False, the point and cell data are ignored.use_module (str, optional (default:
"meshio")) – The package used to read the file:"meshio","pyvista"or"vtk"(seefrom_meshio(),from_pyvista()andfrom_vtk()).
- Returns:
The new mesh.
- Return type: