OpenLexocad  27.1
Geom::Ax2d Class Reference

#include <Ax2d.h>

Public Member Functions

 Ax2d ()
 Creates an indefinite Ax2d
More...
 
 Ax2d (const Pnt2d &P, const Dir2d &V)
 
double angle (const Ax2d &Other) const
 
const Dir2ddirection () const
 Returns the direction of <me>.
More...
 
bool isCoaxial (const Ax2d &Other, const double AngularTolerance, const double LinearTolerance) const
 
bool isNormal (const Ax2d &Other, const double AngularTolerance) const
 
bool isOpposite (const Ax2d &Other, const double AngularTolerance) const
 
bool isParallel (const Ax2d &Other, const double AngularTolerance) const
 
const Pnt2dlocation () const
 Returns the origin of <me>.
More...
 
void mirror (const Pnt2d &P)
 
void mirror (const Ax2d &A)
 
Ax2d mirrored (const Pnt2d &P) const
 
Ax2d mirrored (const Ax2d &A) const
 
void reverse ()
 Reverses the direction of <me> and assigns the result to this axis.
More...
 
Ax2d reversed () const
 
void rotate (const Pnt2d &P, const double Ang)
 
Ax2d rotated (const Pnt2d &P, const double Ang) const
 
void scale (const Pnt2d &P, const double S)
 
Ax2d scaled (const Pnt2d &P, const double S) const
 
void setDirection (const Dir2d &V)
 Changes the direction of <me>.
More...
 
void setLocation (const Pnt2d &Locat)
 Changes the "Location" point (origin) of <me>.
More...
 
void transform (const Trsf2d &T)
 
Ax2d transformed (const Trsf2d &T) const
 Transforms an axis placement with a Trsf.
More...
 
void translate (const Vec2d &V)
 
Ax2d translated (const Vec2d &V) const
 
void translate (const Pnt2d &P1, const Pnt2d &P2)
 
Ax2d translated (const Pnt2d &P1, const Pnt2d &P2) const
 

Detailed Description

Describes an axis in the plane (2D space).
An axis is defined by:

  • its origin (also referred to as its "Location point"), and
  • its unit vector (referred to as its "Direction").
    An axis implicitly defines a direct, right-handed
    coordinate system in 2D space by:
  • its origin,
  • its "Direction" (giving the "X Direction" of the coordinate system), and
  • the unit vector normal to "Direction" (positive angle
    measured in the trigonometric sense).
    An axis is used:
  • to describe 2D geometric entities (for example, the
    axis which defines angular coordinates on a circle).
    It serves for 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).
    Note: to define a left-handed 2D coordinate system, use Ax22d.

Constructor & Destructor Documentation

◆ Ax2d() [1/2]

Geom::Ax2d::Ax2d ( )

Creates an indefinite Ax2d

◆ Ax2d() [2/2]

Geom::Ax2d::Ax2d ( const Pnt2d P,
const Dir2d V 
)

Creates an Ax2d.

is the "Location" point of
the axis placement and V is the "Direction" of
the axis placement.

Member Function Documentation

◆ angle()

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

Computes the angle, in radians, between this axis and
the axis Other. The value of the angle is between -Pi and Pi.

◆ direction()

const Dir2d& Geom::Ax2d::direction ( ) const

Returns the direction of <me>.

◆ isCoaxial()

bool Geom::Ax2d::isCoaxial ( const Ax2d 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::Ax2d::isNormal ( const Ax2d Other,
const double  AngularTolerance 
) const

Returns true if this axis and the axis Other are normal to
each other. That is, if the angle between the two axes is equal to Pi/2 or -Pi/2.
Note: the tolerance criterion is given by AngularTolerance.

◆ isOpposite()

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

Returns true if this axis and the axis Other are parallel,
and have opposite orientations. That is, if the angle
between the two axes is equal to Pi or -Pi.
Note: the tolerance criterion is given by AngularTolerance.

◆ isParallel()

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

Returns true if this axis and the axis Other are parallel,
and have either the same or opposite orientations. That
is, if the angle between the two axes is equal to 0, Pi or -Pi.
Note: the tolerance criterion is given by AngularTolerance.

◆ location()

const Pnt2d& Geom::Ax2d::location ( ) const

Returns the origin of <me>.

◆ mirror() [1/2]

void Geom::Ax2d::mirror ( const Pnt2d P)

◆ mirror() [2/2]

void Geom::Ax2d::mirror ( const Ax2d A)

◆ mirrored() [1/2]

Ax2d Geom::Ax2d::mirrored ( const Pnt2d P) const

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

◆ mirrored() [2/2]

Ax2d Geom::Ax2d::mirrored ( const Ax2d A) const

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

◆ reverse()

void Geom::Ax2d::reverse ( )

Reverses the direction of <me> and assigns the result to this axis.

◆ reversed()

Ax2d Geom::Ax2d::reversed ( ) const

Computes a new axis placement with a direction opposite to
the direction of <me>.

◆ rotate()

void Geom::Ax2d::rotate ( const Pnt2d P,
const double  Ang 
)

◆ rotated()

Ax2d Geom::Ax2d::rotated ( const Pnt2d P,
const double  Ang 
) const

Rotates an axis placement.

is the center of the
rotation . Ang is the angular value of the rotation
in radians.

◆ scale()

void Geom::Ax2d::scale ( const Pnt2d P,
const double  S 
)

◆ scaled()

Ax2d Geom::Ax2d::scaled ( const Pnt2d P,
const double  S 
) const

Applies a scaling transformation on the axis placement.
The "Location" point of the axis placement is modified.
The "Direction" is reversed if the scale is negative.

◆ setDirection()

void Geom::Ax2d::setDirection ( const Dir2d V)

Changes the direction of <me>.

◆ setLocation()

void Geom::Ax2d::setLocation ( const Pnt2d Locat)

Changes the "Location" point (origin) of <me>.

◆ transform()

void Geom::Ax2d::transform ( const Trsf2d T)

◆ transformed()

Ax2d Geom::Ax2d::transformed ( const Trsf2d T) const

Transforms an axis placement with a Trsf.

◆ translate() [1/2]

void Geom::Ax2d::translate ( const Vec2d V)

◆ translate() [2/2]

void Geom::Ax2d::translate ( const Pnt2d P1,
const Pnt2d P2 
)

◆ translated() [1/2]

Ax2d Geom::Ax2d::translated ( const Vec2d V) const

Translates an axis placement in the direction of the vector
<V>. The magnitude of the translation is the vector's magnitude.

◆ translated() [2/2]

Ax2d Geom::Ax2d::translated ( const Pnt2d P1,
const Pnt2d P2 
) const

Translates an axis placement from the point <P1> to the
point <P2>.


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