pyvista.to_meshio#
- to_meshio(mesh: DataSet) meshio.Mesh[source]#
 Convert a PyVista mesh to a
meshiomesh instance.Added in version 0.45.
- Parameters:
 - mesh
pyvista.DataSet Any PyVista mesh/spatial data type.
- mesh
 - Returns:
 meshio.MeshA mesh instance from the
meshiolibrary.
- Raises:
 ImportErrorIf the meshio package is not installed.
See also
Examples
Convert a pyvista sphere to a
meshiomesh instance.>>> import pyvista as pv >>> sphere = pv.Sphere() >>> mesh = pv.to_meshio(sphere)