|
OpenLexocad
27.0
|
#include <Lin2d.h>
Public Member Functions | |
| Lin2d () | |
| Creates an indefinite Line. More... | |
| Lin2d (const Ax2d &A) | |
| Creates a line located with A. More... | |
| Lin2d (const Pnt2d &P, const Dir2d &V) | |
| Lin2d (const double A, const double B, const double C) | |
| double | angle (const Lin2d &Other) const |
| Computes the angle between two lines in radians. More... | |
| void | coefficients (double &A, double &B, double &C) const |
| bool | contains (const Pnt2d &P, const double LinearTolerance) const |
| double | distance (const Pnt2d &P) const |
| Computes the distance between <me> and the point. More... | |
| double | distance (const Lin2d &Other) const |
| Computes the distance between two lines. More... | |
| double | signedDistance (const Pnt2d &P) const |
| Computes the signed distance between <me> and the point. More... | |
| const Dir2d & | direction () const |
| Returns the direction of the line. More... | |
| const Pnt2d & | location () const |
| Returns the location point (origin) of the line. More... | |
| void | mirror (const Pnt2d &P) |
| void | mirror (const Ax2d &A) |
| Lin2d | mirrored (const Ax2d &A) const |
| Lin2d | mirrored (const Pnt2d &P) const |
| Lin2d | normal (const Pnt2d &P) const |
| const Ax2d & | position () const |
| void | reverse () |
| Lin2d | reversed () const |
| void | rotate (const Pnt2d &P, const double Ang) |
| Lin2d | rotated (const Pnt2d &P, const double Ang) const |
| void | scale (const Pnt2d &P, const double S) |
| Lin2d | scaled (const Pnt2d &P, const double S) const |
| void | setDirection (const Dir2d &V) |
| Changes the direction of the line. More... | |
| void | setLocation (const Pnt2d &P) |
| Changes the origin of the line. More... | |
| void | setPosition (const Ax2d &A) |
| double | squareDistance (const Pnt2d &P) const |
| double | squareDistance (const Lin2d &Other) const |
| Computes the square distance between two lines. More... | |
| void | transform (const Trsf2d &T) |
| Lin2d | transformed (const Trsf2d &T) const |
| Transforms a line with the transformation T from class Trsf2d. More... | |
| void | translate (const Vec2d &V) |
| void | translate (const Pnt2d &P1, const Pnt2d &P2) |
| Lin2d | translated (const Vec2d &V) const |
| Lin2d | translated (const Pnt2d &P1, const Pnt2d &P2) const |
| Translates a line from the point P1 to the point P2. More... | |
| const Ax2d & | _CSFDB_GetLin2dpos () const |
Describes a line in 2D space.
A line is positioned in the plane with an axis (a 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
| Geom::Lin2d::Lin2d | ( | ) |
Creates an indefinite Line.
| Geom::Lin2d::Lin2d | ( | const Ax2d & | A | ) |
Creates a line located with A.
is the location point (origin) of the line and
<V> is the direction of the line.
| Geom::Lin2d::Lin2d | ( | const double | A, |
| const double | B, | ||
| const double | C | ||
| ) |
Creates the line from the equation A*X + B*Y + C = 0.0 Raises ConstructionError if Sqrt(A*A + B*B) <= Resolution from gp.
//! Raised if Sqrt(A*A + B*B) <= Resolution from gp.
|
inline |
| double Geom::Lin2d::angle | ( | const Lin2d & | Other | ) | const |
Computes the angle between two lines in radians.
| void Geom::Lin2d::coefficients | ( | double & | A, |
| double & | B, | ||
| double & | C | ||
| ) | const |
Returns the normalized coefficients of the line :
A * X + B * Y + C = 0.
| bool Geom::Lin2d::contains | ( | const Pnt2d & | P, |
| const double | LinearTolerance | ||
| ) | const |
Returns true if this line contains the point P, that is, if the
distance between point P and this line is less than or
equal to LinearTolerance.
| const Dir2d& Geom::Lin2d::direction | ( | ) | const |
Returns the direction of the line.
| double Geom::Lin2d::distance | ( | const Pnt2d & | P | ) | const |
Computes the distance between <me> and the point.
.
| double Geom::Lin2d::distance | ( | const Lin2d & | Other | ) | const |
Computes the distance between two lines.
| const Pnt2d& Geom::Lin2d::location | ( | ) | const |
Returns the location point (origin) of the line.
| void Geom::Lin2d::mirror | ( | const Pnt2d & | P | ) |
| void Geom::Lin2d::mirror | ( | const Ax2d & | A | ) |
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
which is the center
of the symmetry
Computes the line normal to the direction of <me>,
passing through the point
.
| const Ax2d& Geom::Lin2d::position | ( | ) | const |
Returns the axis placement one axis whith the same
location and direction as <me>.
| void Geom::Lin2d::reverse | ( | ) |
| Lin2d Geom::Lin2d::reversed | ( | ) | const |
Reverses the positioning axis of this line.
Note:
| void Geom::Lin2d::rotate | ( | const Pnt2d & | P, |
| const double | Ang | ||
| ) |
Rotates a line. P is the center of the rotation.
Ang is the angular value of the rotation in radians.
| void Geom::Lin2d::scale | ( | const Pnt2d & | P, |
| const double | S | ||
| ) |
Scales a line. S is the scaling value. Only the
origin of the line is modified.
| void Geom::Lin2d::setDirection | ( | const Dir2d & | V | ) |
Changes the direction of the line.
| void Geom::Lin2d::setLocation | ( | const Pnt2d & | P | ) |
Changes the origin of the line.
| void Geom::Lin2d::setPosition | ( | const Ax2d & | A | ) |
Complete redefinition of the line.
The "location" point of is the origin of the line.
The "direction" of is the direction of the line.
| double Geom::Lin2d::signedDistance | ( | const Pnt2d & | P | ) | const |
Computes the signed distance between <me> and the point.
.
| double Geom::Lin2d::squareDistance | ( | const Pnt2d & | P | ) | const |
Computes the square distance between <me> and the point
.
| double Geom::Lin2d::squareDistance | ( | const Lin2d & | Other | ) | const |
Computes the square distance between two lines.
| void Geom::Lin2d::transform | ( | const Trsf2d & | T | ) |
Transforms a line with the transformation T from class Trsf2d.
| void Geom::Lin2d::translate | ( | const Vec2d & | V | ) |
Translates a line in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.
Translates a line from the point P1 to the point P2.