volume

property PolyData.volume

Return the mesh volume.

This will throw a VTK error/warning if not a closed surface.

Returns
float

Total volume of the mesh.

Examples

>>> import pyvista
>>> sphere = pyvista.Sphere()
>>> sphere.volume
0.5183