pysdic.PointCloud.bounding_box#

PointCloud.bounding_box()[source]#

Compute the axis-aligned bounding box of the point cloud.

The non-finite points (NaN, Inf) are ignored.

Returns:

  • numpy.ndarray – The minimum coordinates, an array of shape \((E,)\).

  • numpy.ndarray – The maximum coordinates, an array of shape \((E,)\).

Raises:

ValueError – If the point cloud is empty or contains only non-finite points.

Return type:

Tuple[ndarray, ndarray]

Examples

1import numpy
2from pysdic import PointCloud
3
4point_cloud = PointCloud([[0, 0, 0], [1, 0, 0], [0, 2, 0], [0, 0, 3]])
5min_coords, max_coords = point_cloud.bounding_box()
6print(min_coords, max_coords)  # [0. 0. 0.] [1. 2. 3.]