Hide menu
Loading...
Searching...
No Matches
cadex.Measurements.BoundingBox2d Class Reference

Computes bounding rectangles for 2D geometry. More...

Inherits global.SystemIDisposable.

Public Member Functions

 BoundingBox2d (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 

Static Public Member Functions

static cadex.Geom.Box2d ComputeOriented (cadex.Drawing.CurveSet theCurves, cadex.Measurements.BoundingBox2dParameters theParameters)
 Computes an oriented bounding rectangle for the specified 2D curves.
 
static cadex.Geom.Box2d ComputeOriented (cadex.Drawing.CurveSet theCurves)
 
static cadex.Geom.Box2d ComputeOriented (cadex.Collections.Point2dList theCurves, cadex.Measurements.BoundingBox2dParameters theParameters)
 Computes an oriented bounding rectangle for the specified 2D curves.
 
static cadex.Geom.Box2d ComputeOriented (cadex.Collections.Point2dList theCurves)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Detailed Description

Computes bounding rectangles for 2D geometry.

The class provides algorithms for computing a rectangle that encloses the specified 2D geometry.

An oriented bounding rectangle is allowed to have an arbitrary orientation. Its orientation is selected to optimize the rectangle according to the criterion specified in BoundingBox2dParameters, such as minimum area or minimum perimeter.

For a set of points, the rectangle is computed directly from the input points. For a CurveSet, the curves are first discretized using the discretization tolerance specified in BoundingBox2dParameters, and the resulting points are used for the rectangle computation.

The returned Geom.Box2d contains the rectangle position, orientation, width, and height.

See also
BoundingBox2dParameters

Member Function Documentation

◆ ComputeOriented() [1/2]

static cadex.Geom.Box2d cadex.Measurements.BoundingBox2d.ComputeOriented ( cadex.Collections.Point2dList theCurves,
cadex.Measurements.BoundingBox2dParameters theParameters )
inlinestatic

Computes an oriented bounding rectangle for the specified 2D curves.

The curves are discretized using the tolerance specified in theParameters. The rectangle orientation is selected according to the optimization criterion specified in theParameters.

◆ ComputeOriented() [2/2]

static cadex.Geom.Box2d cadex.Measurements.BoundingBox2d.ComputeOriented ( cadex.Drawing.CurveSet theCurves,
cadex.Measurements.BoundingBox2dParameters theParameters )
inlinestatic

Computes an oriented bounding rectangle for the specified 2D curves.

The curves are discretized using the tolerance specified in theParameters. The rectangle orientation is selected according to the optimization criterion specified in theParameters.