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

Public Member Functions

synchronized void delete ()
 
 GLin ()
 
 GLin (GAx1 A1)
 
 GLin (GPnt P, GDir V)
 
void Reverse ()
 
GLin Reversed ()
 
void SetDirection (GDir V)
 
void SetLocation (GPnt P)
 
void SetPosition (GAx1 A1)
 
GDir Direction ()
 
GPnt Location ()
 
GAx1 Position ()
 
double Angle (GLin Other)
 
boolean Contains (GPnt P, double LinearTolerance)
 
double Distance (GPnt P)
 
double Distance (GLin Other)
 
double SquareDistance (GPnt P)
 
double SquareDistance (GLin Other)
 
GLin Normal (GPnt P)
 
void Mirror (GPnt P)
 
GLin Mirrored (GPnt P)
 
void Mirror (GAx1 A1)
 
GLin Mirrored (GAx1 A1)
 
void Mirror (GAx2 A2)
 
GLin Mirrored (GAx2 A2)
 
void Rotate (GAx1 A1, double Ang)
 
GLin Rotated (GAx1 A1, double Ang)
 
void Scale (GPnt P, double S)
 
GLin Scaled (GPnt P, double S)
 
void Transform (GTrsf T)
 
GLin Transformed (GTrsf T)
 
void Translate (GVec V)
 
GLin Translated (GVec V)
 
void Translate (GPnt P1, GPnt P2)
 
GLin Translated (GPnt P1, GPnt P2)
 

Protected Member Functions

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

Static Protected Member Functions

static long getCPtr (GLin obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

Describes a line in 3D space. A line is positioned in space with an axis (a gp_Ax1 object) which gives it an origin and a unit vector. A line and an axis are similar objects, thus, we can convert one into the other. A line provides direct access to the majority of the edit and query functions available on its positioning axis. In addition, however, a line has specific functions for computing distances and positions. See Also gce_MakeLin which provides functions for more complex line constructions Geom_Line which provides additional functions for constructing lines and works, in particular, with the parametric equations of lines

Constructor & Destructor Documentation

GLin.GLin ( )

Creates a Line corresponding to Z axis of the reference coordinate system.

GLin.GLin ( GAx1  A1)

Creates a line defined by axis A1.

GLin.GLin ( GPnt  P,
GDir  V 
)

Creates a line passing through point P and parallel to vector V (P and V are, respectively, the origin and the unit vector of the positioning axis of the line).

Member Function Documentation

double GLin.Angle ( GLin  Other)

Computes the angle between two lines in radians.

boolean GLin.Contains ( GPnt  P,
double  LinearTolerance 
)

Returns true if this line contains the point P, that is, if the distance between point P and this line is less than or equal to LinearTolerance..

GDir GLin.Direction ( )

Returns the direction of the line.

double GLin.Distance ( GPnt  P)

Computes the distance between <me> and the point P.

double GLin.Distance ( GLin  Other)

Computes the distance between two lines.

GPnt GLin.Location ( )

Returns the location point (origin) of the line.

GLin GLin.Mirrored ( GPnt  P)

Performs the symmetrical transformation of a line with respect to the point P which is the center of the symmetry.

GLin GLin.Mirrored ( GAx1  A1)

Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.

GLin GLin.Mirrored ( GAx2  A2)

Performs the symmetrical transformation of a line with respect to a plane. The axis placement <A2> locates the plane of the symmetry : (Location, XDirection, YDirection).

GLin GLin.Normal ( GPnt  P)

Computes the line normal to the direction of <me>, passing through the point P. Raises ConstructionError if the distance between <me> and the point P is lower or equal to Resolution from gp because there is an infinity of solutions in 3D space.

GAx1 GLin.Position ( )

Returns the axis placement one axis whith the same location and direction as <me>.

GLin GLin.Reversed ( )

Reverses the direction of the line. Note: - Reverse assigns the result to this line, while - Reversed creates a new one.

GLin GLin.Rotated ( GAx1  A1,
double  Ang 
)

Rotates a line. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.

GLin GLin.Scaled ( GPnt  P,
double  S 
)

Scales a line. S is the scaling value. The "Location" point (origin) of the line is modified. The "Direction" is reversed if the scale is negative.

void GLin.SetDirection ( GDir  V)

Changes the direction of the line.

void GLin.SetLocation ( GPnt  P)

Changes the location point (origin) of the line.

void GLin.SetPosition ( GAx1  A1)

Complete redefinition of the line. The "Location" point of <A1> is the origin of the line. The "Direction" of <A1> is the direction of the line.

double GLin.SquareDistance ( GPnt  P)

Computes the square distance between <me> and the point P.

double GLin.SquareDistance ( GLin  Other)

Computes the square distance between two lines.

GLin GLin.Transformed ( GTrsf  T)

Transforms a line with the transformation T from class Trsf.

GLin GLin.Translated ( GVec  V)

Translates a line in the direction of the vector V. The magnitude of the translation is the vector's magnitude.

GLin GLin.Translated ( GPnt  P1,
GPnt  P2 
)

Translates a line from the point P1 to the point P2.