OpenLexocad  27.1
Geom::Ax1 Class Reference

#include <Ax1.h>

Public Member Functions

 Ax1 ()=default
 Creates a undefined Ax1.
More...
 
 Ax1 (const Geom::Pnt &P, const Geom::Dir &V)
 P is the location point and V is the direction of <me>.
More...
 
void setDirection (const Geom::Dir &V)
 Assigns V as the "Direction" of this axis.
More...
 
void setLocation (const Geom::Pnt &P)
 Assigns P as the origin of this axis.
More...
 
const Geom::Dirdirection () const
 Returns the direction of <me>.
More...
 
const Geom::Pntlocation () const
 Returns the location point of <me>.
More...
 
bool isCoaxial (const Ax1 &Other, const double AngularTolerance, const double LinearTolerance) const
 
bool isNormal (const Ax1 &Other, const double AngularTolerance) const
 
bool isOpposite (const Ax1 &Other, const double AngularTolerance) const
 
bool isParallel (const Ax1 &Other, const double AngularTolerance) const
 
double angle (const Ax1 &Other) const
 
void reverse ()
 
Ax1 reversed () const
 Reverses the unit vector of this axis and creates a new one.
More...
 
void mirror (const Geom::Pnt &P)
 
Ax1 mirrored (const Geom::Pnt &P) const
 
void mirror (const Ax1 &A1)
 
Ax1 mirrored (const Ax1 &A1) const
 
void mirror (const Geom::Ax2 &A2)
 
Ax1 mirrored (const Geom::Ax2 &A2) const
 
void rotate (const Ax1 &A1, const double Ang)
 
Ax1 rotated (const Ax1 &A1, const double Ang) const
 
void scale (const Geom::Pnt &P, const double S)
 
Ax1 scaled (const Geom::Pnt &P, const double S) const
 
void transform (const Geom::Trsf &T)
 
Ax1 transformed (const Geom::Trsf &T) const
 
void translate (const Geom::Vec &V)
 
Ax1 translated (const Geom::Vec &V) const
 
void translate (const Geom::Pnt &P1, const Geom::Pnt &P2)
 
Ax1 translated (const Geom::Pnt &P1, const Geom::Pnt &P2) const
 

Detailed Description

Describes an axis in 3D space.
An axis is defined by:

  • its origin (also referred to as its "Location point"), and
  • its unit vector (referred to as its "Direction" or "main Direction").
    An axis is used:
  • to describe 3D geometric entities (for example, the
    axis of a revolution entity). It serves the same purpose
    as the STEP function "axis placement one axis", or
  • to define geometric transformations (axis of
    symmetry, axis of rotation, and so on).
    For example, this entity can be used to locate a geometric entity
    or to define a symmetry axis.

Constructor & Destructor Documentation

◆ Ax1() [1/2]

Geom::Ax1::Ax1 ( )
default

Creates a undefined Ax1.

◆ Ax1() [2/2]

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

P is the location point and V is the direction of <me>.

Member Function Documentation

◆ angle()

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

Computes the angular value, in radians, between <me>.Direction() and
<Other>.Direction(). Returns the angle between 0 and 2*PI
radians.

◆ direction()

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

Returns the direction of <me>.

◆ isCoaxial()

bool Geom::Ax1::isCoaxial ( const Ax1 Other,
const double  AngularTolerance,
const double  LinearTolerance 
) const

Returns True if :
. the angle between <me> and <Other> is lower or equal
to <AngularTolerance> and
. the distance between <me>.Location() and <Other> is lower
or equal to <LinearTolerance> and
. the distance between <Other>.Location() and <me> is lower
or equal to LinearTolerance.

◆ isNormal()

bool Geom::Ax1::isNormal ( const Ax1 Other,
const double  AngularTolerance 
) const

Returns True if the direction of the <me> and <Other>
are normal to each other.
That is, if the angle between the two axes is equal to Pi/2.
Note: the tolerance criterion is given by AngularTolerance..

◆ isOpposite()

bool Geom::Ax1::isOpposite ( const Ax1 Other,
const double  AngularTolerance 
) const

Returns True if the direction of <me> and <Other> are
parallel with opposite orientation. That is, if the angle
between the two axes is equal to Pi.
Note: the tolerance criterion is given by AngularTolerance.

◆ isParallel()

bool Geom::Ax1::isParallel ( const Ax1 Other,
const double  AngularTolerance 
) const

Returns True if the direction of <me> and <Other> are
parallel with same orientation or opposite orientation. That
is, if the angle between the two axes is equal to 0 or Pi.
Note: the tolerance criterion is given by
AngularTolerance.

◆ location()

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

Returns the location point of <me>.

◆ mirror() [1/3]

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

Performs the symmetrical transformation of an axis
placement with respect to the point P which is the
center of the symmetry and assigns the result to this axis.

◆ mirror() [2/3]

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

Performs the symmetrical transformation of an axis
placement with respect to an axis placement which
is the axis of the symmetry and assigns the result to this axis.

◆ mirror() [3/3]

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

Performs the symmetrical transformation of an axis
placement with respect to a plane. The axis placement
<A2> locates the plane of the symmetry :
(Location, XDirection, YDirection) and assigns the result to this axis.

◆ mirrored() [1/3]

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

Performs the symmetrical transformation of an axis
placement with respect to the point P which is the
center of the symmetry and creates a new axis.

◆ mirrored() [2/3]

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

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

◆ mirrored() [3/3]

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

Performs the symmetrical transformation of an axis
placement with respect to a plane. The axis placement
<A2> locates the plane of the symmetry :
(Location, XDirection, YDirection) and creates a new axis.

◆ reverse()

void Geom::Ax1::reverse ( )

Reverses the unit vector of this axis.
and assigns the result to this axis.

◆ reversed()

Ax1 Geom::Ax1::reversed ( ) const

Reverses the unit vector of this axis and creates a new one.

◆ rotate()

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

Rotates this axis at an angle Ang (in radians) about the axis A1
and assigns the result to this axis.

◆ rotated()

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

Rotates this axis at an angle Ang (in radians) about the axis A1
and creates a new one.

◆ scale()

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

Applies a scaling transformation to this axis with:

  • scale factor S, and
  • center P and assigns the result to this axis.

◆ scaled()

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

Applies a scaling transformation to this axis with:

  • scale factor S, and
  • center P and creates a new axis.

◆ setDirection()

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

Assigns V as the "Direction" of this axis.

◆ setLocation()

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

Assigns P as the origin of this axis.

◆ transform()

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

Applies the transformation T to this axis.
and assigns the result to this axis.

◆ transformed()

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

Applies the transformation T to this axis and creates a new one.
Translates an axis plaxement in the direction of the vector
<V>. The magnitude of the translation is the vector's magnitude.

◆ translate() [1/2]

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

Translates this axis by the vector V,
and assigns the result to this axis.

◆ translate() [2/2]

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

Translates this axis by:
the vector (P1, P2) defined from point P1 to point P2.
and assigns the result to this axis.

◆ translated() [1/2]

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

Translates this axis by the vector V,
and creates a new one.

◆ translated() [2/2]

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

Translates this axis by:
the vector (P1, P2) defined from point P1 to point P2.
and creates a new one.


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