pyvista.PolyData.volume

Contents

pyvista.PolyData.volume#

property PolyData.volume: float[source]#

Return the approximate volume of the dataset.

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

Returns:
float

Total volume of the mesh.

Examples

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