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

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 更多...

类 AnyCAD.Foundation.GLin2d 继承关系图:

Public 成员函数

 GLin2d (global::System.IntPtr cPtr, bool cMemoryOwn)
 仅供内部使用
 
void Dispose ()
 
 GLin2d ()
 Creates a Line corresponding to X axis of the reference coordinate system.
 
 GLin2d (GAx2d theA)
 Creates a line located with theA.
 
 GLin2d (GPnt2d theP, GDir2d theV)
 <theP> is the location point (origin) of the line and <theV> is the direction of the line.
 
 GLin2d (double theA, double theB, double theC)
 Creates the line from the equation theA*X + theB*Y + theC = 0.0 Raises ConstructionError if Sqrt(theA*theA + theB*theB) <= Resolution from gp. Raised if Sqrt(theA*theA + theB*theB) <= Resolution from gp.
 
void Reverse ()
 
GLin2d Reversed ()
 Reverses the positioning axis of this line. Note: - Reverse assigns the result to this line, while - Reversed creates a new one.
 
void SetDirection (GDir2d theV)
 Changes the direction of the line.
 
void SetLocation (GPnt2d theP)
 Changes the origin of the line.
 
void SetPosition (GAx2d theA)
 Complete redefinition of the line. The "Location" point of <theA> is the origin of the line. The "Direction" of <theA> is the direction of the line.
 
void Coefficients (ref double theA, ref double theB, ref double theC)
 Returns the normalized coefficients of the line : theA * X + theB * Y + theC = 0.
 
GDir2d Direction ()
 Returns the direction of the line.
 
GPnt2d Location ()
 Returns the location point (origin) of the line.
 
GAx2d Position ()
 Returns the axis placement one axis with the same location and direction as <me>.
 
double Angle (GLin2d theOther)
 Computes the angle between two lines in radians.
 
bool Contains (GPnt2d theP, double theLinearTolerance)
 Returns true if this line contains the point theP, that is, if the distance between point theP and this line is less than or equal to theLinearTolerance.
 
double Distance (GPnt2d theP)
 Computes the distance between <me> and the point <theP>.
 
double Distance (GLin2d theOther)
 Computes the distance between two lines.
 
double SquareDistance (GPnt2d theP)
 Computes the square distance between <me> and the point <theP>.
 
double SquareDistance (GLin2d theOther)
 Computes the square distance between two lines.
 
GLin2d Normal (GPnt2d theP)
 Computes the line normal to the direction of <me>, passing through the point <theP>.
 
void Mirror (GPnt2d theP)
 
GLin2d Mirrored (GPnt2d theP)
 Performs the symmetrical transformation of a line with respect to the point <theP> which is the center of the symmetry
 
void Mirror (GAx2d theA)
 
GLin2d Mirrored (GAx2d theA)
 Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
 
void Rotate (GPnt2d theP, double theAng)
 
GLin2d Rotated (GPnt2d theP, double theAng)
 Rotates a line. theP is the center of the rotation. theAng is the angular value of the rotation in radians.
 
void Scale (GPnt2d theP, double theS)
 
GLin2d Scaled (GPnt2d theP, double theS)
 Scales a line. theS is the scaling value. Only the origin of the line is modified.
 
void Transform (GTrsf2d theT)
 
GLin2d Transformed (GTrsf2d theT)
 Transforms a line with the transformation theT from class Trsf2d.
 
void Translate (GVec2d theV)
 
GLin2d Translated (GVec2d theV)
 Translates a line in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
 
void Translate (GPnt2d theP1, GPnt2d theP2)
 
GLin2d Translated (GPnt2d theP1, GPnt2d theP2)
 Translates a line from the point theP1 to the point theP2.
 

详细描述

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