pyvista.save_meshio#

save_meshio(filename, mesh, file_format=None, **kwargs)[source]#

Save mesh to file using meshio.

Parameters:
filenamestr

Filename to save the mesh to.

meshpyvista.DataSet

Any PyVista mesh/spatial data type.

file_formatstr, optional

File type for meshio to save. For example '.bdf'. This is normally inferred from the extension but this can be overridden.

**kwargsdict, optional

Additional keyword arguments. See meshio.write_points_cells for more details.

Examples

Save a pyvista sphere to a Abaqus data file.

>>> import pyvista as pv
>>> sphere = pv.Sphere()
>>> pv.save_meshio('mymesh.inp', sphere)