AnyCAD Rapid API 2024
Help you to create a better world!
|
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.GLin2d | ( | ) |
Creates a Line corresponding to X axis of the reference coordinate system.
GLin2d.GLin2d | ( | GAx2d | theA | ) |
Creates a line located with theA.
<theP> is the location point (origin) of the line and <theV> is the direction of the line.
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.
double GLin2d.Angle | ( | GLin2d | theOther | ) |
Computes the angle between two lines in radians.
void GLin2d.Coefficients | ( | double[] | theA, |
double[] | theB, | ||
double[] | theC ) |
Returns the normalized coefficients of the line : theA * X + theB * Y + theC = 0.
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.
GDir2d GLin2d.Direction | ( | ) |
Returns the direction of the line.
double GLin2d.Distance | ( | GLin2d | theOther | ) |
Computes the distance between two lines.
double GLin2d.Distance | ( | GPnt2d | theP | ) |
Computes the distance between <me> and the point <theP>.
GPnt2d GLin2d.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 the point <theP> which is the center of the symmetry
Computes the line normal to the direction of <me>, passing through the point <theP>.
GAx2d GLin2d.Position | ( | ) |
Returns the axis placement one axis with 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. theP is the center of the rotation. theAng is the angular value of the rotation in radians.
Scales a line. theS is the scaling value. Only the origin of the line is modified.
void GLin2d.SetDirection | ( | GDir2d | theV | ) |
Changes the direction of the line.
void GLin2d.SetLocation | ( | GPnt2d | theP | ) |
Changes the origin of the line.
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.
double GLin2d.SquareDistance | ( | GLin2d | theOther | ) |
Computes the square distance between two lines.
double GLin2d.SquareDistance | ( | GPnt2d | theP | ) |
Computes the square distance between <me> and the point <theP>.
Transforms a line with the transformation theT from class Trsf2d.
Translates a line from the point theP1 to the point theP2.