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

Public 成员函数

 GLin2d ()
 
 GLin2d (GAx2d theA)
 
 GLin2d (GPnt2d theP, GDir2d theV)
 
 GLin2d (double theA, double theB, double theC)
 
void Reverse ()
 
GLin2d Reversed ()
 
void SetDirection (GDir2d theV)
 
void SetLocation (GPnt2d theP)
 
void SetPosition (GAx2d theA)
 
void Coefficients (double[] theA, double[] theB, double[] theC)
 
GDir2d Direction ()
 
GPnt2d Location ()
 
GAx2d Position ()
 
double Angle (GLin2d theOther)
 
boolean Contains (GPnt2d theP, double theLinearTolerance)
 
double Distance (GPnt2d theP)
 
double Distance (GLin2d theOther)
 
double SquareDistance (GPnt2d theP)
 
double SquareDistance (GLin2d theOther)
 
GLin2d Normal (GPnt2d theP)
 
void Mirror (GPnt2d theP)
 
GLin2d Mirrored (GPnt2d theP)
 
void Mirror (GAx2d theA)
 
GLin2d Mirrored (GAx2d theA)
 
void Rotate (GPnt2d theP, double theAng)
 
GLin2d Rotated (GPnt2d theP, double theAng)
 
void Scale (GPnt2d theP, double theS)
 
GLin2d Scaled (GPnt2d theP, double theS)
 
void Transform (GTrsf2d theT)
 
GLin2d Transformed (GTrsf2d theT)
 
void Translate (GVec2d theV)
 
GLin2d Translated (GVec2d theV)
 
void Translate (GPnt2d theP1, GPnt2d theP2)
 
GLin2d Translated (GPnt2d theP1, GPnt2d 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

构造及析构函数说明

◆ GLin2d() [1/4]

GLin2d.GLin2d ( )

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

◆ GLin2d() [2/4]

GLin2d.GLin2d ( GAx2d  theA)

Creates a line located with theA.

◆ GLin2d() [3/4]

GLin2d.GLin2d ( GPnt2d  theP,
GDir2d  theV 
)

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

◆ GLin2d() [4/4]

GLin2d.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.

成员函数说明

◆ Angle()

double GLin2d.Angle ( GLin2d  theOther)

Computes the angle between two lines in radians.

◆ Coefficients()

void GLin2d.Coefficients ( double[]  theA,
double[]  theB,
double[]  theC 
)

Returns the normalized coefficients of the line : theA * X + theB * Y + theC = 0.

◆ Contains()

boolean GLin2d.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.

◆ Direction()

GDir2d GLin2d.Direction ( )

Returns the direction of the line.

◆ Distance() [1/2]

double GLin2d.Distance ( GLin2d  theOther)

Computes the distance between two lines.

◆ Distance() [2/2]

double GLin2d.Distance ( GPnt2d  theP)

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

◆ Location()

GPnt2d GLin2d.Location ( )

Returns the location point (origin) of the line.

◆ Mirrored() [1/2]

GLin2d GLin2d.Mirrored ( GAx2d  theA)

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

◆ Mirrored() [2/2]

GLin2d GLin2d.Mirrored ( GPnt2d  theP)

Performs the symmetrical transformation of a line with respect to the point <theP> which is the center of the symmetry

◆ Normal()

GLin2d GLin2d.Normal ( GPnt2d  theP)

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

◆ Position()

GAx2d GLin2d.Position ( )

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

◆ Reversed()

GLin2d GLin2d.Reversed ( )

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

◆ Rotated()

GLin2d 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.

◆ Scaled()

GLin2d GLin2d.Scaled ( GPnt2d  theP,
double  theS 
)

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

◆ SetDirection()

void GLin2d.SetDirection ( GDir2d  theV)

Changes the direction of the line.

◆ SetLocation()

void GLin2d.SetLocation ( GPnt2d  theP)

Changes the origin of the line.

◆ SetPosition()

void GLin2d.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.

◆ SquareDistance() [1/2]

double GLin2d.SquareDistance ( GLin2d  theOther)

Computes the square distance between two lines.

◆ SquareDistance() [2/2]

double GLin2d.SquareDistance ( GPnt2d  theP)

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

◆ Transformed()

GLin2d GLin2d.Transformed ( GTrsf2d  theT)

Transforms a line with the transformation theT from class Trsf2d.

◆ Translated() [1/2]

GLin2d GLin2d.Translated ( GPnt2d  theP1,
GPnt2d  theP2 
)

Translates a line from the point theP1 to the point theP2.

◆ Translated() [2/2]

GLin2d GLin2d.Translated ( GVec2d  theV)

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