PointsBoundingRectangle_OrNil
Computes the smallest rectangle containing an array of points; returns NIL when the array is empty.
Syntax
C++
Python
def PointsBoundingRectangle_OrNil( inPoints: list[Point2D], /, *, inBoundingRectangleFeature: BoundingRectangleFeature = BoundingRectangleFeature.MinimalArea, inReferenceAngle: float = 0.0, inRectangleOrientation: RectangleOrientation = RectangleOrientation.Horizontal ) -> ( outBoundingRectangle: Rectangle2D | None, outCenter: Point2D | None, outLongSide: float | None, outShortSide: float | None )
Parameters
| Name | Type | Default | Description | |
|---|---|---|---|---|
![]() |
inPoints | list[Point2D] | Input array of points | |
![]() |
inBoundingRectangleFeature | BoundingRectangleFeature | BoundingRectangleFeature.MinimalArea | Determines what kind of bounding rectangle will be computed |
![]() |
inReferenceAngle | float | 0.0 | The middle angle of the valid range of the output rectangle's angle |
![]() |
inRectangleOrientation | RectangleOrientation | RectangleOrientation.Horizontal | Orientation of the output rectangle |
![]() |
outBoundingRectangle | Rectangle2D | None | Smallest bounding rectangle of the input points | |
![]() |
outCenter | Point2D | None | Center of the bounding rectangle | |
![]() |
outLongSide | float | None | Length of the bounding rectangle long side | |
![]() |
outShortSide | float | None | Length of the bounding rectangle short side |


