AnyCAD Rapid API 2023
Help you to create a better world!
载入中...
搜索中...
未找到
GBBox类 参考

Public 成员函数

 GBBox ()
 
 GBBox (GPnt theMin, GPnt theMax)
 
void SetWhole ()
 
void SetVoid ()
 
void Set (GPnt P)
 
void Set (GPnt P, GDir D)
 
void Update (double aXmin, double aYmin, double aZmin, double aXmax, double aYmax, double aZmax)
 
void Update (double X, double Y, double Z)
 
double GetGap ()
 
void SetGap (double Tol)
 
void Enlarge (double Tol)
 
void Get (double[] theXmin, double[] theYmin, double[] theZmin, double[] theXmax, double[] theYmax, double[] theZmax)
 
GPnt CornerMin ()
 
GPnt CornerMax ()
 
void OpenXmin ()
 
void OpenXmax ()
 
void OpenYmin ()
 
void OpenYmax ()
 
void OpenZmin ()
 
void OpenZmax ()
 
boolean IsOpen ()
 
boolean IsOpenXmin ()
 
boolean IsOpenXmax ()
 
boolean IsOpenYmin ()
 
boolean IsOpenYmax ()
 
boolean IsOpenZmin ()
 
boolean IsOpenZmax ()
 
boolean IsWhole ()
 
boolean IsVoid ()
 
boolean IsXThin (double tol)
 
boolean IsYThin (double tol)
 
boolean IsZThin (double tol)
 
boolean IsThin (double tol)
 
GBBox Transformed (GTrsf T)
 
void Add (GBBox Other)
 
void Add (GPnt P)
 
void Add (GPnt P, GDir D)
 
void Add (GDir D)
 
boolean IsOut (GPnt P)
 
boolean IsOut (GLin L)
 
boolean IsOut (GPln P)
 
boolean IsOut (GBBox Other)
 
boolean IsOut (GBBox Other, GTrsf T)
 
boolean IsOut (GTrsf T1, GBBox Other, GTrsf T2)
 
boolean IsOut (GPnt P1, GPnt P2, GDir D)
 
double Distance (GBBox Other)
 
void Dump ()
 
double SquareExtent ()
 
GBBox FinitePart ()
 
boolean HasFinitePart ()
 

详细描述

Describes a bounding box in 3D space. A bounding box is parallel to the axes of the coordinates system. If it is finite, it is defined by the three intervals: - [ Xmin,Xmax ], - [ Ymin,Ymax ], - [ Zmin,Zmax ]. A bounding box may be infinite (i.e. open) in one or more directions. It is said to be: - OpenXmin if it is infinite on the negative side of the "X Direction"; - OpenXmax if it is infinite on the positive side of the "X Direction"; - OpenYmin if it is infinite on the negative side of the "Y Direction"; - OpenYmax if it is infinite on the positive side of the "Y Direction"; - OpenZmin if it is infinite on the negative side of the "Z Direction"; - OpenZmax if it is infinite on the positive side of the "Z Direction"; - WholeSpace if it is infinite in all six directions. In this case, any point of the space is inside the box; - Void if it is empty. In this case, there is no point included in the box. A bounding box is defined by: - six bounds (Xmin, Xmax, Ymin, Ymax, Zmin and Zmax) which limit the bounding box if it is finite, - eight flags (OpenXmin, OpenXmax, OpenYmin, OpenYmax, OpenZmin, OpenZmax, WholeSpace and Void) which describe the bounding box if it is infinite or empty, and - a gap, which is included on both sides in any direction when consulting the finite bounds of the box.

构造及析构函数说明

◆ GBBox() [1/2]

GBBox.GBBox ( )

Creates an empty Box. The constructed box is qualified Void. Its gap is null.

◆ GBBox() [2/2]

GBBox.GBBox ( GPnt  theMin,
GPnt  theMax 
)

Creates a bounding box, it contains: - minimum/maximum point of bounding box, The constructed box is qualified Void. Its gap is null.

成员函数说明

◆ Add() [1/4]

void GBBox.Add ( GBBox  Other)

Adds the box <Other> to <me>.

◆ Add() [2/4]

void GBBox.Add ( GDir  D)

Extends the Box in the given Direction, i.e. adds an half-line. The box may become infinite in 1,2 or 3 directions.

◆ Add() [3/4]

void GBBox.Add ( GPnt  P)

Adds a Pnt to the box.

◆ Add() [4/4]

void GBBox.Add ( GPnt  P,
GDir  D 
)

Extends <me> from the Pnt

in the direction <D>.

◆ CornerMax()

GPnt GBBox.CornerMax ( )

Returns the upper corner of this bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- Precision::Infinite(). Standard_ConstructionError exception will be thrown if the box is void. if IsVoid()

◆ CornerMin()

GPnt GBBox.CornerMin ( )

Returns the lower corner of this bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- Precision::Infinite(). Standard_ConstructionError exception will be thrown if the box is void. if IsVoid()

◆ Distance()

double GBBox.Distance ( GBBox  Other)

Computes the minimum distance between two boxes.

◆ Enlarge()

void GBBox.Enlarge ( double  Tol)

Enlarges the box with a tolerance value. (minvalues-Abs(<tol>) and maxvalues+Abs(<tol>)) This means that the minimum values of its X, Y and Z intervals of definition, when they are finite, are reduced by the absolute value of Tol, while the maximum values are increased by the same amount.

◆ FinitePart()

GBBox GBBox.FinitePart ( )

Returns a finite part of an infinite bounding box (returns self if this is already finite box). This can be a Void box in case if its sides has been defined as infinite (Open) without adding any finite points. WARNING! This method relies on Open flags, the infinite points added using Add() method will be returned as is.

◆ Get()

void GBBox.Get ( double[]  theXmin,
double[]  theYmin,
double[]  theZmin,
double[]  theXmax,
double[]  theYmax,
double[]  theZmax 
)

Returns the bounds of this bounding box. The gap is included. If this bounding box is infinite (i.e. "open"), returned values may be equal to +/- Precision::Infinite(). Standard_ConstructionError exception will be thrown if the box is void. if IsVoid()

◆ GetGap()

double GBBox.GetGap ( )

Returns the gap of this bounding box.

◆ HasFinitePart()

boolean GBBox.HasFinitePart ( )

Returns TRUE if this box has finite part.

◆ IsOpen()

boolean GBBox.IsOpen ( )

Returns true if this bounding box has at least one open direction.

◆ IsOpenXmax()

boolean GBBox.IsOpenXmax ( )

Returns true if this bounding box is open in the Xmax direction.

◆ IsOpenXmin()

boolean GBBox.IsOpenXmin ( )

Returns true if this bounding box is open in the Xmin direction.

◆ IsOpenYmax()

boolean GBBox.IsOpenYmax ( )

Returns true if this bounding box is open in the Ymax direction.

◆ IsOpenYmin()

boolean GBBox.IsOpenYmin ( )

Returns true if this bounding box is open in the Ymix direction.

◆ IsOpenZmax()

boolean GBBox.IsOpenZmax ( )

Returns true if this bounding box is open in the Zmax direction.

◆ IsOpenZmin()

boolean GBBox.IsOpenZmin ( )

Returns true if this bounding box is open in the Zmin direction.

◆ IsOut() [1/7]

boolean GBBox.IsOut ( GBBox  Other)

Returns False if the <Box> intersects or is inside <me>.

◆ IsOut() [2/7]

boolean GBBox.IsOut ( GBBox  Other,
GTrsf  T 
)

Returns False if the transformed <Box> intersects or is inside <me>.

◆ IsOut() [3/7]

boolean GBBox.IsOut ( GLin  L)

Returns False if the line intersects the box.

◆ IsOut() [4/7]

boolean GBBox.IsOut ( GPln  P)

Returns False if the plane intersects the box.

◆ IsOut() [5/7]

boolean GBBox.IsOut ( GPnt  P)

Returns True if the Pnt is out the box.

◆ IsOut() [6/7]

boolean GBBox.IsOut ( GPnt  P1,
GPnt  P2,
GDir  D 
)

Returns False if the flat band lying between two parallel lines represented by their reference points <P1>, <P2> and direction <D> intersects the box.

◆ IsOut() [7/7]

boolean GBBox.IsOut ( GTrsf  T1,
GBBox  Other,
GTrsf  T2 
)

Returns False if the transformed <Box> intersects or is inside the transformed box <me>.

◆ IsThin()

boolean GBBox.IsThin ( double  tol)

Returns true if IsXThin, IsYThin and IsZThin are all true, i.e. if the box is thin in all three dimensions.

◆ IsVoid()

boolean GBBox.IsVoid ( )

Returns true if this bounding box is empty (Void flag).

◆ IsWhole()

boolean GBBox.IsWhole ( )

Returns true if this bounding box is infinite in all 6 directions (WholeSpace flag).

◆ IsXThin()

boolean GBBox.IsXThin ( double  tol)

true if xmax-xmin < tol.

◆ IsYThin()

boolean GBBox.IsYThin ( double  tol)

true if ymax-ymin < tol.

◆ IsZThin()

boolean GBBox.IsZThin ( double  tol)

true if zmax-zmin < tol.

◆ OpenXmax()

void GBBox.OpenXmax ( )

The Box will be infinitely long in the Xmax direction.

◆ OpenXmin()

void GBBox.OpenXmin ( )

The Box will be infinitely long in the Xmin direction.

◆ OpenYmax()

void GBBox.OpenYmax ( )

The Box will be infinitely long in the Ymax direction.

◆ OpenYmin()

void GBBox.OpenYmin ( )

The Box will be infinitely long in the Ymin direction.

◆ OpenZmax()

void GBBox.OpenZmax ( )

The Box will be infinitely long in the Zmax direction.

◆ OpenZmin()

void GBBox.OpenZmin ( )

The Box will be infinitely long in the Zmin direction.

◆ Set() [1/2]

void GBBox.Set ( GPnt  P)

Sets this bounding box so that it bounds - the point P. This involves first setting this bounding box to be void and then adding the point P.

◆ Set() [2/2]

void GBBox.Set ( GPnt  P,
GDir  D 
)

Sets this bounding box so that it bounds the half-line defined by point P and direction D, i.e. all points M defined by M=P+u*D, where u is greater than or equal to 0, are inside the bounding volume. This involves first setting this box to be void and then adding the half-line.

◆ SetGap()

void GBBox.SetGap ( double  Tol)

Set the gap of this bounding box to abs(Tol).

◆ SetVoid()

void GBBox.SetVoid ( )

Sets this bounding box so that it is empty. All points are outside a void box.

◆ SetWhole()

void GBBox.SetWhole ( )

Sets this bounding box so that it covers the whole of 3D space. It is infinitely long in all directions.

◆ SquareExtent()

double GBBox.SquareExtent ( )

Computes the squared diagonal of me.

◆ Transformed()

GBBox GBBox.Transformed ( GTrsf  T)

Returns a bounding box which is the result of applying the transformation T to this bounding box. Warning Applying a geometric transformation (for example, a rotation) to a bounding box generally increases its dimensions. This is not optimal for algorithms which use it.

◆ Update() [1/2]

void GBBox.Update ( double  aXmin,
double  aYmin,
double  aZmin,
double  aXmax,
double  aYmax,
double  aZmax 
)

Enlarges this bounding box, if required, so that it contains at least: - interval [ aXmin,aXmax ] in the "X Direction", - interval [ aYmin,aYmax ] in the "Y Direction", - interval [ aZmin,aZmax ] in the "Z Direction";

◆ Update() [2/2]

void GBBox.Update ( double  X,
double  Y,
double  Z 
)

Adds a point of coordinates (X,Y,Z) to this bounding box.