PathBoundingRectangle_OrNil


Computes the smallest rectangle containing a path; returns NIL when the path is empty.

Syntax

C++
C#
Python
 
def PathBoundingRectangle_OrNil(
	inPath: Path,
	/,
	*,
	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
Input value inPath Path Input path
Input value inBoundingRectangleFeature BoundingRectangleFeature BoundingRectangleFeature.MinimalArea Determines what kind of bounding rectangle will be computed
Input value inReferenceAngle float 0.0 The middle angle of the valid range of the output rectangle's angle
Input value inRectangleOrientation RectangleOrientation RectangleOrientation.Horizontal Orientation of the output rectangle
Output value outBoundingRectangle Rectangle2D | None Smallest bounding rectangle of the input path
Output value outCenter Point2D | None Center of the bounding rectangle
Output value outLongSide float | None Length of the bounding rectangle long side
Output value outShortSide float | None Length of the bounding rectangle short side