AnyCAD Rapid SDK
2021
The Rapid CAD SDK

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 
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
GLin2d.GLin2d  (  ) 
Creates a Line corresponding to X axis of the reference coordinate system.
GLin2d.GLin2d  (  GAx2d  A  ) 
Creates a line located with A.
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.
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.
Performs the symmetrical transformation of a line with respect to the point
which is the center of the symmetry
Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
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.
Rotates a line. P is the center of the rotation. Ang is the angular value of the rotation in radians.
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.
Transforms a line with the transformation T from class Trsf2d.
Translates a line in the direction of the vector V. The magnitude of the translation is the vector's magnitude.