pyvista.DataSet.center

Contents

pyvista.DataSet.center#

property DataSet.center: tuple[float, float, float][source]#

Return the center of the bounding box.

Returns:
tuple[float, float, float]

Center of the bounding box.

Examples

Get the center of a mesh.

>>> import pyvista as pv
>>> mesh = pv.Sphere(center=(1, 2, 0))
>>> mesh.center
(1.0, 2.0, 0.0)