OpenLexocad
28.0
|
#include <Lin.h>
Public Member Functions | |
Lin () | |
Creates an indefinite Line. More... | |
Lin (const Geom::Ax1 &A1) | |
Creates a line defined by axis A1. More... | |
Lin (const Geom::Pnt &P, const Geom::Dir &V) | |
void | reverse () |
Lin | reversed () const |
void | setDirection (const Geom::Dir &V) |
Changes the direction of the line. More... | |
void | setLocation (const Geom::Pnt &P) |
Changes the location point (origin) of the line. More... | |
void | setPosition (const Geom::Ax1 &A1) |
const Geom::Dir & | direction () const |
Returns the direction of the line. More... | |
const Geom::Pnt & | location () const |
Returns the location point (origin) of the line. More... | |
const Geom::Ax1 & | position () const |
double | angle (const Lin &Other) const |
Computes the angle between two lines in radians. More... | |
bool | contains (const Geom::Pnt &P, const double LinearTolerance) const |
double | distance (const Geom::Pnt &P) const |
Computes the distance between <me> and the point P. More... | |
double | distance (const Lin &Other) const |
Computes the distance between two lines. More... | |
double | squareDistance (const Geom::Pnt &P) const |
Computes the square distance between <me> and the point P. More... | |
double | squareDistance (const Lin &Other) const |
Computes the square distance between two lines. More... | |
Lin | normal (const Geom::Pnt &P) const |
void | mirror (const Geom::Pnt &P) |
Lin | mirrored (const Geom::Pnt &P) const |
void | mirror (const Geom::Ax1 &A1) |
Lin | mirrored (const Geom::Ax1 &A1) const |
void | mirror (const Geom::Ax2 &A2) |
Lin | mirrored (const Geom::Ax2 &A2) const |
void | rotate (const Geom::Ax1 &A1, const double Ang) |
Lin | rotated (const Geom::Ax1 &A1, const double Ang) const |
void | scale (const Geom::Pnt &P, const double S) |
Lin | scaled (const Geom::Pnt &P, const double S) const |
void | transform (const Geom::Trsf &T) |
Lin | transformed (const Geom::Trsf &T) const |
Transforms a line with the transformation T from class Trsf. More... | |
void | translate (const Geom::Vec &V) |
Lin | translated (const Geom::Vec &V) const |
void | translate (const Geom::Pnt &P1, const Geom::Pnt &P2) |
Lin | translated (const Geom::Pnt &P1, const Geom::Pnt &P2) const |
Translates a line from the point P1 to the point P2. More... | |
Describes a line in 3D space.
A line is positioned in space with an axis (a Geom::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
Geom::Lin::Lin | ( | ) |
Creates an indefinite Line.
Geom::Lin::Lin | ( | const Geom::Ax1 & | A1 | ) |
Creates a line defined by axis A1.
Creates a line passing through point P and parallel to
vector V (P and V are, respectively, the origin and
the unit vector of the positioning axis of the line).
double Geom::Lin::angle | ( | const Lin & | Other | ) | const |
Computes the angle between two lines in radians.
bool Geom::Lin::contains | ( | const Geom::Pnt & | 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 Geom::Dir& Geom::Lin::direction | ( | ) | const |
Returns the direction of the line.
double Geom::Lin::distance | ( | const Geom::Pnt & | P | ) | const |
Computes the distance between <me> and the point P.
double Geom::Lin::distance | ( | const Lin & | Other | ) | const |
Computes the distance between two lines.
const Geom::Pnt& Geom::Lin::location | ( | ) | const |
Returns the location point (origin) of the line.
void Geom::Lin::mirror | ( | const Geom::Ax1 & | A1 | ) |
void Geom::Lin::mirror | ( | const Geom::Ax2 & | A2 | ) |
void Geom::Lin::mirror | ( | const Geom::Pnt & | P | ) |
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 <A2>
locates the plane of the symmetry :
(Location, XDirection, YDirection).
Performs the symmetrical transformation of a line
with respect to the point P which is the center of
the symmetry.
Computes the line normal to the direction of <me>, passing
through the point P. Raises ConstructionError
if the distance between <me> and the point P is lower
or equal to Resolution from gp because there is an infinity of
solutions in 3D space.
const Geom::Ax1& Geom::Lin::position | ( | ) | const |
Returns the axis placement one axis whith the same
location and direction as <me>.
void Geom::Lin::reverse | ( | ) |
Lin Geom::Lin::reversed | ( | ) | const |
Reverses the direction of the line.
Note:
void Geom::Lin::rotate | ( | const Geom::Ax1 & | A1, |
const double | Ang | ||
) |
Rotates a line. A1 is the axis of the rotation.
Ang is the angular value of the rotation in radians.
void Geom::Lin::scale | ( | const Geom::Pnt & | P, |
const double | S | ||
) |
Scales a line. S is the scaling value.
The "Location" point (origin) of the line is modified.
The "Direction" is reversed if the scale is negative.
void Geom::Lin::setDirection | ( | const Geom::Dir & | V | ) |
Changes the direction of the line.
void Geom::Lin::setLocation | ( | const Geom::Pnt & | P | ) |
Changes the location point (origin) of the line.
void Geom::Lin::setPosition | ( | const Geom::Ax1 & | A1 | ) |
Complete redefinition of the line.
The "Location" point of <A1> is the origin of the line.
The "Direction" of <A1> is the direction of the line.
double Geom::Lin::squareDistance | ( | const Geom::Pnt & | P | ) | const |
Computes the square distance between <me> and the point P.
double Geom::Lin::squareDistance | ( | const Lin & | Other | ) | const |
Computes the square distance between two lines.
void Geom::Lin::transform | ( | const Geom::Trsf & | T | ) |
Lin Geom::Lin::transformed | ( | const Geom::Trsf & | T | ) | const |
Transforms a line with the transformation T from class Trsf.
void Geom::Lin::translate | ( | const Geom::Vec & | V | ) |
Translates a line from the point P1 to the point P2.
Translates a line in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.