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_corner
Point3D Minimum corner for the box.
- max_corner
Point3D Maximum corner for the box.
- center
Point3D Center of the box.
- min_corner
Overview#
Evaluate whether a point lies within the box. |
|
Check if point components are within box. |
Minimum corner of the bounding box. |
|
Maximum corner of the bounding box. |
|
Center of the bounding box. |
Find the intersection of 2 BoundingBox objects. |
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:
- point
Point3D Point to compare against the bounds.
- point
- Returns:
- bool
Trueif 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:
- x
Real Point X component to compare against the bounds.
- y
Real Point Y component to compare against the bounds.
- z
Real Point Z component to compare against the bounds.
- x
- Returns:
- bool
Trueif the components are contained in the bounding box. Otherwise,False.
- BoundingBox.__eq__(other: BoundingBox) bool#
Equals operator for the
BoundingBoxclass.
- BoundingBox.__ne__(other: BoundingBox) bool#
Not equals operator for the
BoundingBoxclass.
- 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.