OBBResult#

class OBBResult[source]#

Bases: object

Oriented Bounding Box computed from a point cloud.

OBBResult stores bounding-box geometry only. Use get_rotation_axis_and_radius() when a cylinder-like rotation axis and averaged radius are needed.

center#

Geometric center of the OBB, shape (3,).

Type:

numpy.ndarray

axes#

Principal axes as row vectors of shape (3, 3), ordered by descending extent magnitude.

Type:

numpy.ndarray

extents#

Half-extents along each axis, shape (3,).

Type:

numpy.ndarray

Methods

get_rotation_axis_and_radius(axis_index=None, rotation_axis_hint=None)[source]#

Derive a rotation axis and averaged radius from this oriented bounding box.

Parameters:
  • axis_index (SupportsIndex | None) – Principal axis index to use as the rotation axis. Valid values are 0, 1, and 2.

  • rotation_axis_hint (ndarray | None) – Approximate rotation-axis direction. The principal axis most aligned with this hint is selected.

Returns:

RotationAxisAndRadius with the selected axis and averaged perpendicular half-extent radius.

Raises:

Flow360ValueError – If both selection inputs are provided, if axis_index is invalid, or if rotation_axis_hint is zero.

Return type:

RotationAxisAndRadius

If neither axis_index nor rotation_axis_hint is provided, the rotation axis and averaged radius are guessed from the principal axis whose perpendicular bounding-box extents are most similar. A warning is emitted in that case because this is an inference, not a known geometric property.