AnyCAD Rapid API 2024
Help you to create a better world!
|
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.GLin | ( | ) |
Creates a Line corresponding to Z axis of the reference coordinate system.
GLin.GLin | ( | GAx1 | theA1 | ) |
Creates a line defined by axis theA1.
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).
double GLin.Angle | ( | GLin | theOther | ) |
Computes the angle between two lines in radians.
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..
GDir GLin.Direction | ( | ) |
Returns the direction of the line.
double GLin.Distance | ( | GLin | theOther | ) |
Computes the distance between two lines.
double GLin.Distance | ( | GPnt | theP | ) |
Computes the distance between <me> and the point theP.
GPnt GLin.Location | ( | ) |
Returns the location point (origin) of the line.
Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
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).
Performs the symmetrical transformation of a line with respect to the point theP which is the center of the symmetry.
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.
GAx1 GLin.Position | ( | ) |
Returns the axis placement one axis with the same location and direction as <me>.
GLin GLin.Reversed | ( | ) |
Reverses the direction of the line. Note: - Reverse assigns the result to this line, while - Reversed creates a new one.
Rotates a line. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
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.
void GLin.SetDirection | ( | GDir | theV | ) |
Changes the direction of the line.
void GLin.SetLocation | ( | GPnt | theP | ) |
Changes the location point (origin) of the line.
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.
double GLin.SquareDistance | ( | GLin | theOther | ) |
Computes the square distance between two lines.
double GLin.SquareDistance | ( | GPnt | theP | ) |
Computes the square distance between <me> and the point theP.
Translates a line from the point theP1 to the point theP2.