BoundingBox#

class ansys.geometry.core.math.bbox.BoundingBox(min_corner: ansys.geometry.core.math.point.Point3D, max_corner: ansys.geometry.core.math.point.Point3D, center: ansys.geometry.core.math.point.Point3D = None)#

Maintains the box structure for Bounding Boxes.

Parameters:
min_cornerPoint3D

Minimum corner for the box.

max_cornerPoint3D

Maximum corner for the box.

centerPoint3D

Center of the box.

Overview#

contains_point

Evaluate whether a point lies within the box.

contains_point_components

Check if point components are within box.

min_corner

Minimum corner of the bounding box.

max_corner

Maximum corner of the bounding box.

center

Center of the bounding box.

intersect_bboxes

Find the intersection of 2 BoundingBox objects.

__eq__

Equals operator for the BoundingBox class.

__ne__

Not equals operator for the BoundingBox class.

Import detail#

from ansys.geometry.core.math.bbox import BoundingBox

Property detail#

property BoundingBox.min_corner: ansys.geometry.core.math.point.Point3D#

Minimum corner of the bounding box.

property BoundingBox.max_corner: ansys.geometry.core.math.point.Point3D#

Maximum corner of the bounding box.

property BoundingBox.center: ansys.geometry.core.math.point.Point3D#

Center of the bounding box.

Method detail#

BoundingBox.contains_point(point: ansys.geometry.core.math.point.Point3D) bool#

Evaluate whether a point lies within the box.

Parameters:
pointPoint3D

Point to compare against the bounds.

Returns:
bool

True if the point is contained in the bounding box. Otherwise, False.

BoundingBox.contains_point_components(x: ansys.geometry.core.typing.Real, y: ansys.geometry.core.typing.Real, z: ansys.geometry.core.typing.Real) bool#

Check if point components are within box.

Parameters:
xReal

Point X component to compare against the bounds.

yReal

Point Y component to compare against the bounds.

zReal

Point Z component to compare against the bounds.

Returns:
bool

True if the components are contained in the bounding box. Otherwise, False.

BoundingBox.__eq__(other: BoundingBox) bool#

Equals operator for the BoundingBox class.

BoundingBox.__ne__(other: BoundingBox) bool#

Not equals operator for the BoundingBox class.

static BoundingBox.intersect_bboxes(box_1: BoundingBox, box_2: BoundingBox) None | BoundingBox#

Find the intersection of 2 BoundingBox objects.

Parameters:
box_1: BoundingBox

The box to consider the intersection of with respect to box_2.

box_2: BoundingBox

The box to consider the intersection of with respect to box_1.

Returns:
BoundingBox:

The box representing the intersection of the two passed in boxes.