ogstools.mesh.file_io module#

ogstools.mesh.file_io.read(filename)[source]#

Read a single mesh from a filepath.

Return type:

UnstructuredGrid

ogstools.mesh.file_io.save(mesh, filename=None, **kwargs)[source]#

Save mesh to file.

Supported are all file formats pyvista supports. In case you want to save as a vtu-file and the given mesh is not a pv.UnstructuredGrid it is cast to one prior to saving.

Parameters:
  • mesh (DataSet) – pyvista mesh

  • filename (Path | str | None) – Filepath to save the mesh to

Return type:

Path

Returns:

Filepath to saved mesh