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

Public Member Functions

synchronized void delete ()
 GLin2d ()
 GLin2d (GAx2d A)
 GLin2d (GPnt2d P, GDir2d V)
 GLin2d (double A, double B, double C)
void Reverse ()
GLin2d Reversed ()
void SetDirection (GDir2d V)
void SetLocation (GPnt2d P)
void SetPosition (GAx2d A)
void Coefficients (double[] A, double[] B, double[] C)
GDir2d Direction ()
GPnt2d Location ()
GAx2d Position ()
double Angle (GLin2d Other)
boolean Contains (GPnt2d P, double LinearTolerance)
double Distance (GPnt2d P)
double Distance (GLin2d Other)
double SquareDistance (GPnt2d P)
double SquareDistance (GLin2d Other)
GLin2d Normal (GPnt2d P)
void Mirror (GPnt2d P)
GLin2d Mirrored (GPnt2d P)
void Mirror (GAx2d A)
GLin2d Mirrored (GAx2d A)
void Rotate (GPnt2d P, double Ang)
GLin2d Rotated (GPnt2d P, double Ang)
void Scale (GPnt2d P, double S)
GLin2d Scaled (GPnt2d P, double S)
void Transform (GTrsf2d T)
GLin2d Transformed (GTrsf2d T)
void Translate (GVec2d V)
GLin2d Translated (GVec2d V)
void Translate (GPnt2d P1, GPnt2d P2)
GLin2d Translated (GPnt2d P1, GPnt2d P2)

Protected Member Functions

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

Static Protected Member Functions

static long getCPtr (GLin2d obj)

Protected Attributes

transient boolean swigCMemOwn

Detailed Description

Describes a line in 2D space. A line is positioned in the plane with an axis (a gp_Ax2d object) which gives the line its origin and 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 GccAna and Geom2dGcc packages which provide functions for constructing lines defined by geometric constraints gce_MakeLin2d which provides functions for more complex line constructions Geom2d_Line which provides additional functions for constructing lines and works, in particular, with the parametric equations of lines

Constructor & Destructor Documentation

GLin2d.GLin2d ( )

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

GLin2d.GLin2d ( GAx2d  A)

Creates a line located with A.

GLin2d.GLin2d ( GPnt2d  P,
GDir2d  V 

is the location point (origin) of the line and <V> is the direction of the line.

GLin2d.GLin2d ( double  A,
double  B,
double  C 

Creates the line from the equation A*X + B*Y + C = 0.0 Raises ConstructionError if Sqrt(A*A + B*B) <= Resolution from gp. Raised if Sqrt(A*A + B*B) <= Resolution from gp.

Member Function Documentation

double GLin2d.Angle ( GLin2d  Other)

Computes the angle between two lines in radians.

void GLin2d.Coefficients ( double[]  A,
double[]  B,
double[]  C 

Returns the normalized coefficients of the line : A * X + B * Y + C = 0.

boolean GLin2d.Contains ( GPnt2d  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.

GDir2d GLin2d.Direction ( )

Returns the direction of the line.

double GLin2d.Distance ( GPnt2d  P)

Computes the distance between <me> and the point


double GLin2d.Distance ( GLin2d  Other)

Computes the distance between two lines.

GPnt2d GLin2d.Location ( )

Returns the location point (origin) of the line.

GLin2d GLin2d.Mirrored ( GPnt2d  P)

Performs the symmetrical transformation of a line with respect to the point

which is the center of the symmetry

GLin2d GLin2d.Mirrored ( GAx2d  A)

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

GLin2d GLin2d.Normal ( GPnt2d  P)

Computes the line normal to the direction of <me>, passing through the point


GAx2d GLin2d.Position ( )

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

GLin2d GLin2d.Reversed ( )

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

GLin2d GLin2d.Rotated ( GPnt2d  P,
double  Ang 

Rotates a line. P is the center of the rotation. Ang is the angular value of the rotation in radians.

GLin2d GLin2d.Scaled ( GPnt2d  P,
double  S 

Scales a line. S is the scaling value. Only the origin of the line is modified.

void GLin2d.SetDirection ( GDir2d  V)

Changes the direction of the line.

void GLin2d.SetLocation ( GPnt2d  P)

Changes the origin of the line.

void GLin2d.SetPosition ( GAx2d  A)

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

double GLin2d.SquareDistance ( GPnt2d  P)

Computes the square distance between <me> and the point


double GLin2d.SquareDistance ( GLin2d  Other)

Computes the square distance between two lines.

GLin2d GLin2d.Transformed ( GTrsf2d  T)

Transforms a line with the transformation T from class Trsf2d.

GLin2d GLin2d.Translated ( GVec2d  V)

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

GLin2d GLin2d.Translated ( GPnt2d  P1,
GPnt2d  P2 

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