BoundingBox2D
#
- class ansys.geometry.core.math.bbox.BoundingBox2D(x_min: ansys.geometry.core.typing.Real = sys.float_info.max, x_max: ansys.geometry.core.typing.Real = sys.float_info.min, y_min: ansys.geometry.core.typing.Real = sys.float_info.max, y_max: ansys.geometry.core.typing.Real = sys.float_info.min)#
Maintains the X and Y dimensions.
- Parameters:
- x_min
Real
Minimum value for the x-dimensional bounds.
- x_max
Real
Maximum value for the x-dimensional bounds.
- y_min
Real
Minimum value for the y-dimensional bounds.
- y_max
Real
Maximum value for the y-dimensional bounds.
- x_min
Overview#
Extend the ranges of the bounding box to include a point. |
|
Extend the ranges of the bounding box to include the X and Y values. |
|
Extend the ranges of the bounding box to include given points. |
|
Evaluate whether a point lies within the X and Y range bounds. |
|
Check if point components are within the X and Y range bounds. |
Import detail#
from ansys.geometry.core.math.bbox import BoundingBox2D
Property detail#
- property BoundingBox2D.x_min: ansys.geometry.core.typing.Real#
Minimum value of X-dimensional bounds.
- Returns:
Real
Minimum value of the X-dimensional bounds.
- property BoundingBox2D.x_max: ansys.geometry.core.typing.Real#
Maximum value of the X-dimensional bounds.
- Returns:
Real
Maximum value of the X-dimensional bounds.
- property BoundingBox2D.y_min: ansys.geometry.core.typing.Real#
Minimum value of Y-dimensional bounds.
- Returns:
Real
Minimum value of Y-dimensional bounds.
- property BoundingBox2D.y_max: ansys.geometry.core.typing.Real#
Maximum value of Y-dimensional bounds.
- Returns:
Real
Maximum value of Y-dimensional bounds.
Method detail#
- BoundingBox2D.add_point(point: ansys.geometry.core.math.point.Point2D) None #
Extend the ranges of the bounding box to include a point.
- Parameters:
- point
Point2D
Point to include within the bounds.
- point
Notes
This method is only applicable if the point components are outside the current bounds.
- BoundingBox2D.add_point_components(x: ansys.geometry.core.typing.Real, y: ansys.geometry.core.typing.Real) None #
Extend the ranges of the bounding box to include the X and Y values.
- Parameters:
- x
Real
Point X component to include within the bounds.
- y
Real
Point Y component to include within the bounds.
- x
Notes
This method is only applicable if the point components are outside the current bounds.
- BoundingBox2D.add_points(points: list[ansys.geometry.core.math.point.Point2D]) None #
Extend the ranges of the bounding box to include given points.
- Parameters:
- points
list
[Point2D
] List of points to include within the bounds.
- points
- BoundingBox2D.contains_point(point: ansys.geometry.core.math.point.Point2D) bool #
Evaluate whether a point lies within the X and Y range bounds.
- Parameters:
- point
Point2D
Point to compare against the bounds.
- point
- Returns:
- bool
True
if the point is contained in the bounding box. Otherwise,False
.
- BoundingBox2D.contains_point_components(x: ansys.geometry.core.typing.Real, y: ansys.geometry.core.typing.Real) bool #
Check if point components are within the X and Y range bounds.
- Parameters:
- x
Real
Point X component to compare against the bounds.
- y
Real
Point Y component to compare against the bounds.
- x
- Returns:
- bool
True
if the components are contained in the bounding box. Otherwise,False
.
- BoundingBox2D.__eq__(other: BoundingBox2D) bool #
Equals operator for the
BoundingBox2D
class.
- BoundingBox2D.__ne__(other: BoundingBox2D) bool #
Not equals operator for the
BoundingBox2D
class.