pyvista.DataSet.length#

property DataSet.length: float[source]#

Return the length of the diagonal of the bounding box.

Returns:
float

Length of the diagonal of the bounding box.

Examples

Get the length of the bounding box of a cube. This should match 3**(1/2) since it is the diagonal of a cube that is 1 x 1 x 1.

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> mesh.length
1.7320508075688772