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