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

Public 成员函数

 GLin ()
 
 GLin (GAx1 theA1)
 
 GLin (GPnt theP, GDir theV)
 
void Reverse ()
 
GLin Reversed ()
 
void SetDirection (GDir theV)
 
void SetLocation (GPnt theP)
 
void SetPosition (GAx1 theA1)
 
GDir Direction ()
 
GPnt Location ()
 
GAx1 Position ()
 
double Angle (GLin theOther)
 
boolean Contains (GPnt theP, double theLinearTolerance)
 
double Distance (GPnt theP)
 
double Distance (GLin theOther)
 
double SquareDistance (GPnt theP)
 
double SquareDistance (GLin theOther)
 
GLin Normal (GPnt theP)
 
void Mirror (GPnt theP)
 
GLin Mirrored (GPnt theP)
 
void Mirror (GAx1 theA1)
 
GLin Mirrored (GAx1 theA1)
 
void Mirror (GAx2 theA2)
 
GLin Mirrored (GAx2 theA2)
 
void Rotate (GAx1 theA1, double theAng)
 
GLin Rotated (GAx1 theA1, double theAng)
 
void Scale (GPnt theP, double theS)
 
GLin Scaled (GPnt theP, double theS)
 
void Transform (GTrsf theT)
 
GLin Transformed (GTrsf theT)
 
void Translate (GVec theV)
 
GLin Translated (GVec theV)
 
void Translate (GPnt theP1, GPnt theP2)
 
GLin Translated (GPnt theP1, GPnt theP2)
 

详细描述

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

构造及析构函数说明

◆ GLin() [1/3]

GLin.GLin ( )

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

◆ GLin() [2/3]

GLin.GLin ( GAx1  theA1)

Creates a line defined by axis theA1.

◆ GLin() [3/3]

GLin.GLin ( GPnt  theP,
GDir  theV 
)

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

成员函数说明

◆ Angle()

double GLin.Angle ( GLin  theOther)

Computes the angle between two lines in radians.

◆ Contains()

boolean GLin.Contains ( GPnt  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()

GDir GLin.Direction ( )

Returns the direction of the line.

◆ Distance() [1/2]

double GLin.Distance ( GLin  theOther)

Computes the distance between two lines.

◆ Distance() [2/2]

double GLin.Distance ( GPnt  theP)

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

◆ Location()

GPnt GLin.Location ( )

Returns the location point (origin) of the line.

◆ Mirrored() [1/3]

GLin GLin.Mirrored ( GAx1  theA1)

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

◆ Mirrored() [2/3]

GLin GLin.Mirrored ( GAx2  theA2)

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

◆ Mirrored() [3/3]

GLin GLin.Mirrored ( GPnt  theP)

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

◆ Normal()

GLin GLin.Normal ( GPnt  theP)

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

◆ Position()

GAx1 GLin.Position ( )

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

◆ Reversed()

GLin GLin.Reversed ( )

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

◆ Rotated()

GLin GLin.Rotated ( GAx1  theA1,
double  theAng 
)

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

◆ Scaled()

GLin GLin.Scaled ( GPnt  theP,
double  theS 
)

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

◆ SetDirection()

void GLin.SetDirection ( GDir  theV)

Changes the direction of the line.

◆ SetLocation()

void GLin.SetLocation ( GPnt  theP)

Changes the location point (origin) of the line.

◆ SetPosition()

void GLin.SetPosition ( GAx1  theA1)

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

◆ SquareDistance() [1/2]

double GLin.SquareDistance ( GLin  theOther)

Computes the square distance between two lines.

◆ SquareDistance() [2/2]

double GLin.SquareDistance ( GPnt  theP)

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

◆ Transformed()

GLin GLin.Transformed ( GTrsf  theT)

Transforms a line with the transformation theT from class Trsf.

◆ Translated() [1/2]

GLin GLin.Translated ( GPnt  theP1,
GPnt  theP2 
)

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

◆ Translated() [2/2]

GLin GLin.Translated ( GVec  theV)

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