OpenLexocad  27.1
Geom::Lin Class Reference

#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::Dirdirection () const
 Returns the direction of the line.
More...
 
const Geom::Pntlocation () const
 Returns the location point (origin) of the line.
More...
 
const Geom::Ax1position () 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...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Lin() [1/3]

Geom::Lin::Lin ( )

Creates an indefinite Line.

◆ Lin() [2/3]

Geom::Lin::Lin ( const Geom::Ax1 A1)

Creates a line defined by axis A1.

◆ Lin() [3/3]

Geom::Lin::Lin ( const Geom::Pnt P,
const Geom::Dir V 
)

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).

Member Function Documentation

◆ angle()

double Geom::Lin::angle ( const Lin Other) const

Computes the angle between two lines in radians.

◆ contains()

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..

◆ direction()

const Geom::Dir& Geom::Lin::direction ( ) const

Returns the direction of the line.

◆ distance() [1/2]

double Geom::Lin::distance ( const Geom::Pnt P) const

Computes the distance between <me> and the point P.

◆ distance() [2/2]

double Geom::Lin::distance ( const Lin Other) const

Computes the distance between two lines.

◆ location()

const Geom::Pnt& Geom::Lin::location ( ) const

Returns the location point (origin) of the line.

◆ mirror() [1/3]

void Geom::Lin::mirror ( const Geom::Pnt P)

◆ mirror() [2/3]

void Geom::Lin::mirror ( const Geom::Ax1 A1)

◆ mirror() [3/3]

void Geom::Lin::mirror ( const Geom::Ax2 A2)

◆ mirrored() [1/3]

Lin Geom::Lin::mirrored ( const Geom::Pnt P) const

Performs the symmetrical transformation of a line
with respect to the point P which is the center of
the symmetry.

◆ mirrored() [2/3]

Lin Geom::Lin::mirrored ( const Geom::Ax1 A1) const

Performs the symmetrical transformation of a line
with respect to an axis placement which is the axis
of the symmetry.

◆ mirrored() [3/3]

Lin Geom::Lin::mirrored ( const Geom::Ax2 A2) const

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).

◆ normal()

Lin Geom::Lin::normal ( const Geom::Pnt P) const

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.

◆ position()

const Geom::Ax1& Geom::Lin::position ( ) const

Returns the axis placement one axis whith the same
location and direction as <me>.

◆ reverse()

void Geom::Lin::reverse ( )

◆ reversed()

Lin Geom::Lin::reversed ( ) const

Reverses the direction of the line.
Note:

  • Reverse assigns the result to this line, while
  • Reversed creates a new one.

◆ rotate()

void Geom::Lin::rotate ( const Geom::Ax1 A1,
const double  Ang 
)

◆ rotated()

Lin Geom::Lin::rotated ( const Geom::Ax1 A1,
const double  Ang 
) const

Rotates a line. A1 is the axis of the rotation.
Ang is the angular value of the rotation in radians.

◆ scale()

void Geom::Lin::scale ( const Geom::Pnt P,
const double  S 
)

◆ scaled()

Lin Geom::Lin::scaled ( const Geom::Pnt P,
const double  S 
) const

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.

◆ setDirection()

void Geom::Lin::setDirection ( const Geom::Dir V)

Changes the direction of the line.

◆ setLocation()

void Geom::Lin::setLocation ( const Geom::Pnt P)

Changes the location point (origin) of the line.

◆ setPosition()

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.

◆ squareDistance() [1/2]

double Geom::Lin::squareDistance ( const Geom::Pnt P) const

Computes the square distance between <me> and the point P.

◆ squareDistance() [2/2]

double Geom::Lin::squareDistance ( const Lin Other) const

Computes the square distance between two lines.

◆ transform()

void Geom::Lin::transform ( const Geom::Trsf T)

◆ transformed()

Lin Geom::Lin::transformed ( const Geom::Trsf T) const

Transforms a line with the transformation T from class Trsf.

◆ translate() [1/2]

void Geom::Lin::translate ( const Geom::Vec V)

◆ translate() [2/2]

void Geom::Lin::translate ( const Geom::Pnt P1,
const Geom::Pnt P2 
)

◆ translated() [1/2]

Lin Geom::Lin::translated ( const Geom::Vec V) const

Translates a line in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.

◆ translated() [2/2]

Lin Geom::Lin::translated ( const Geom::Pnt P1,
const Geom::Pnt P2 
) const

Translates a line from the point P1 to the point P2.


The documentation for this class was generated from the following file: