|
AnyCAD Rapid API 2026
Help you to create a better world!
|
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 更多...
Public 成员函数 | |
| GLin (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| GLin () | |
| Creates a Line corresponding to Z axis of the reference coordinate system. | |
| GLin (GAx1 theA1) | |
| Creates a line defined by axis theA1. | |
| 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). | |
| void | Reverse () |
| GLin | Reversed () |
| Reverses the direction of the line. Note: - Reverse assigns the result to this line, while - Reversed creates a new one. | |
| void | SetDirection (GDir theV) |
| Changes the direction of the line. | |
| void | SetLocation (GPnt theP) |
| Changes the location point (origin) of the line. | |
| void | 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. | |
| GDir | Direction () |
| Returns the direction of the line. | |
| GPnt | Location () |
| Returns the location point (origin) of the line. | |
| GAx1 | Position () |
| Returns the axis placement one axis with the same location and direction as <me>. | |
| double | Angle (GLin theOther) |
| Computes the angle between two lines in radians. | |
| bool | 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.. | |
| double | Distance (GPnt theP) |
| Computes the distance between <me> and the point theP. | |
| double | Distance (GLin theOther) |
| Computes the distance between two lines. | |
| double | SquareDistance (GPnt theP) |
| Computes the square distance between <me> and the point theP. | |
| double | SquareDistance (GLin theOther) |
| Computes the square distance between two lines. | |
| 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. | |
| void | Mirror (GPnt theP) |
| GLin | Mirrored (GPnt theP) |
| Performs the symmetrical transformation of a line with respect to the point theP which is the center of the symmetry. | |
| void | Mirror (GAx1 theA1) |
| GLin | Mirrored (GAx1 theA1) |
| Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry. | |
| void | Mirror (GAx2 theA2) |
| 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). | |
| void | Rotate (GAx1 theA1, double theAng) |
| 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. | |
| void | Scale (GPnt theP, double theS) |
| 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. | |
| void | Transform (GTrsf theT) |
| GLin | Transformed (GTrsf theT) |
| Transforms a line with the transformation theT from class Trsf. | |
| void | Translate (GVec theV) |
| GLin | Translated (GVec theV) |
| Translates a line in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. | |
| void | Translate (GPnt theP1, GPnt theP2) |
| GLin | Translated (GPnt theP1, GPnt theP2) |
| Translates a line from the point theP1 to the point 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