AnyCAD Rapid SDK  2020
The Rapid CAD SDK
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GBBox Class Reference

Public Member Functions

synchronized void delete ()
 
 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 ()
 

Protected Member Functions

 GBBox (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 

Static Protected Member Functions

static long getCPtr (GBBox obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

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.

Constructor & Destructor Documentation

GBBox.GBBox ( )

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

GBBox.GBBox ( GPnt  theMin,
GPnt  theMax 
)

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

Member Function Documentation

void GBBox.Add ( GBBox  Other)

Adds the box <Other> to <me>.

void GBBox.Add ( GPnt  P)

Adds a Pnt to the box.

void GBBox.Add ( GPnt  P,
GDir  D 
)

Extends <me> from the Pnt

in the direction <D>.

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.

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()

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()

double GBBox.Distance ( GBBox  Other)

Computes the minimum distance between two boxes.

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.

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.

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()

double GBBox.GetGap ( )

Returns the gap of this bounding box.

boolean GBBox.HasFinitePart ( )

Returns TRUE if this box has finite part.

boolean GBBox.IsOpen ( )

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

boolean GBBox.IsOpenXmax ( )

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

boolean GBBox.IsOpenXmin ( )

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

boolean GBBox.IsOpenYmax ( )

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

boolean GBBox.IsOpenYmin ( )

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

boolean GBBox.IsOpenZmax ( )

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

boolean GBBox.IsOpenZmin ( )

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

boolean GBBox.IsOut ( GPnt  P)

Returns True if the Pnt is out the box.

boolean GBBox.IsOut ( GLin  L)

Returns False if the line intersects the box.

boolean GBBox.IsOut ( GPln  P)

Returns False if the plane intersects the box.

boolean GBBox.IsOut ( GBBox  Other)

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

boolean GBBox.IsOut ( GBBox  Other,
GTrsf  T 
)

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

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

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

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.

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.

boolean GBBox.IsVoid ( )

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

boolean GBBox.IsWhole ( )

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

boolean GBBox.IsXThin ( double  tol)

true if xmax-xmin < tol.

boolean GBBox.IsYThin ( double  tol)

true if ymax-ymin < tol.

boolean GBBox.IsZThin ( double  tol)

true if zmax-zmin < tol.

void GBBox.OpenXmax ( )

The Box will be infinitely long in the Xmax direction.

void GBBox.OpenXmin ( )

The Box will be infinitely long in the Xmin direction.

void GBBox.OpenYmax ( )

The Box will be infinitely long in the Ymax direction.

void GBBox.OpenYmin ( )

The Box will be infinitely long in the Ymin direction.

void GBBox.OpenZmax ( )

The Box will be infinitely long in the Zmax direction.

void GBBox.OpenZmin ( )

The Box will be infinitely long in the Zmin direction.

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.

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.

void GBBox.SetGap ( double  Tol)

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

void GBBox.SetVoid ( )

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

void GBBox.SetWhole ( )

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

double GBBox.SquareExtent ( )

Computes the squared diagonal of me.

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.

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";

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

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