Skip to content

[mxcad_3d API documentation](../README. md)/Mx3dGeBendBox

Class: Mx3dGeBndBox ​

Represents a bounding box in three-dimensional space.

Provide constructors and methods for manipulating bounding boxes, including setting, updating, transforming, and checking. The bounding box class is mainly used for calculating and manipulating bounding boxes in space, and is typically used in scenarios such as collision detection and spatial segmentation.

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dGeBndBox()

Construct an empty bounding box by default.

Overrides ​

Mx3dGeObject.constructor

• new Mx3dGeBndBox(theMin, theMax)

Construct a bounding box using the given minimum and maximum points.

Parameters ​

NameTypeDescription
TheMin[Mx3dGePoint] (Mx3dGePoint. md)The minimum point of the bounding box
TheMax[Mx3dGePoint] (Mx3dGePoint. md)The maximum point of the bounding box

Overrides ​

Mx3dGeObject.constructor

Methods ​

AddBndBox ​

▸ AddBndBox(Other): void

Parameters ​

NameType
OtherMx3dGeBndBox

Returns ​

void


AddDir ​

▸ AddDir(D): void

Parameters ​

NameType
DMx3dGeDir

Returns ​

void


AddPoint ​

▸ AddPoint(P): void

Parameters ​

NameType
PMx3dGePoint

Returns ​

void


AddPointDir ​

▸ AddPointDir(P, D): void

Parameters ​

NameType
PMx3dGePoint
DMx3dGeDir

Returns ​

void


CornerMax ​

▸ CornerMax(): Mx3dGePoint

Returns ​

Mx3dGePoint


CornerMin ​

▸ CornerMin(): Mx3dGePoint

Returns ​

Mx3dGePoint


Distance ​

▸ Distance(Other): number

Parameters ​

NameType
OtherMx3dGeBndBox

Returns ​

number


Enlarge ​

▸ Enlarge(Tol): void

Parameters ​

NameType
Tolnumber

Returns ​

void


FinitePart ​

▸ FinitePart(): Mx3dGeBndBox

Returns ​

Mx3dGeBndBox


GetGap ​

▸ GetGap(): number

Returns ​

number


HasFinitePart ​

▸ HasFinitePart(): boolean

Returns ​

boolean


IsOpen ​

▸ IsOpen(): boolean

Returns ​

boolean


IsOpenXmax ​

▸ IsOpenXmax(): boolean

Returns ​

boolean


IsOpenXmin ​

▸ IsOpenXmin(): boolean

Returns ​

boolean


IsOpenYmax ​

▸ IsOpenYmax(): boolean

Returns ​

boolean


IsOpenYmin ​

▸ IsOpenYmin(): boolean

Returns ​

boolean


IsOpenZmax ​

▸ IsOpenZmax(): boolean

Returns ​

boolean


IsOpenZmin ​

▸ IsOpenZmin(): boolean

Returns ​

boolean


IsOutBndBox ​

▸ IsOutBndBox(Other): boolean

Parameters ​

NameType
OtherMx3dGeBndBox

Returns ​

boolean

▸ IsOutBndBox(Other, T): boolean

Parameters ​

NameType
OtherMx3dGeBndBox
TMx3dGeTrsf

Returns ​

boolean


IsOutPPD ​

▸ IsOutPPD(P1, P2, D): boolean

Parameters ​

NameType
P1Mx3dGePoint
P2Mx3dGePoint
DMx3dGeDir

Returns ​

boolean


IsOutPoint ​

▸ IsOutPoint(P): boolean

Parameters ​

NameType
PMx3dGePoint

Returns ​

boolean


IsOutTBT ​

▸ IsOutTBT(T1, Other, T2): boolean

Parameters ​

NameType
T1Mx3dGeTrsf
OtherMx3dGeBndBox
T2Mx3dGeTrsf

Returns ​

boolean


IsThin ​

▸ IsThin(tol): boolean

Parameters ​

NameType
tolnumber

Returns ​

boolean


IsVoid ​

▸ IsVoid(): boolean

Returns ​

boolean


IsWhole ​

▸ IsWhole(): boolean

Returns ​

boolean


IsXThin ​

▸ IsXThin(tol): boolean

Parameters ​

NameType
tolnumber

Returns ​

boolean


IsYThin ​

▸ IsYThin(tol): boolean

Parameters ​

NameType
tolnumber

Returns ​

boolean


IsZThin ​

▸ IsZThin(tol): boolean

Parameters ​

NameType
tolnumber

Returns ​

boolean


OpenXmax ​

▸ OpenXmax(): void

Returns ​

void


OpenXmin ​

▸ OpenXmin(): void

Returns ​

void


OpenYmax ​

▸ OpenYmax(): void

Returns ​

void


OpenYmin ​

▸ OpenYmin(): void

Returns ​

void


OpenZmax ​

▸ OpenZmax(): void

Returns ​

void


OpenZmin ​

▸ OpenZmin(): void

Returns ​

void


Set ​

▸ Set(P, D): void

Set the direction of the bounding box.

Parameters ​

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)The reference point of the bounding box
D[Mx3dGeDir] (Mx3dGeDir. md)The direction of the bounding box

Returns ​

void


SetGap ​

▸ SetGap(Tol): void

Parameters ​

NameType
Tolnumber

Returns ​

void


SetVoid ​

▸ SetVoid(): void

Set the bounding box to an invalid state (empty bounding box).

Returns ​

void


SetWhole ​

▸ SetWhole(): void

Set the bounding box to contain the entire space.

Returns ​

void


SquareExtent ​

▸ SquareExtent(): number

Returns ​

number


Transformed ​

▸ Transformed(T): Mx3dGeBndBox

Parameters ​

NameType
TMx3dGeTrsf

Returns ​

Mx3dGeBndBox


Update ​

▸ Update(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax): void

Parameters ​

NameType
aXminnumber
aYminnumber
aZminnumber
aXmaxnumber
aYmaxnumber
aZmaxnumber

Returns ​

void