OpenLexocad  27.1
Geom::Ax22d Class Reference

#include <Ax22d.h>

Public Member Functions

 Ax22d ()
 Creates an indefinite coordinate system.
More...
 
 Ax22d (const Pnt2d &P, const Dir2d &Vx, const Dir2d &Vy)
 
 Ax22d (const Pnt2d &P, const Dir2d &V, const bool Sense=true)
 
 Ax22d (const Ax2d &A, const bool Sense=true)
 
const Pnt2dlocation () const
 Returns the "location" point (origin) of <me>.
More...
 
void mirror (const Pnt2d &P)
 
void mirror (const Ax2d &A)
 
Ax22d mirrored (const Pnt2d &P) const
 
Ax22d mirrored (const Ax2d &A) const
 
void rotate (const Pnt2d &P, const double Ang)
 
Ax22d rotated (const Pnt2d &P, const double Ang) const
 
void scale (const Pnt2d &P, const double S)
 
Ax22d scaled (const Pnt2d &P, const double S) const
 
void setAxis (const Ax22d &A1)
 
void setLocation (const Pnt2d &P)
 Changes the "location" point (origin) of <me>.
More...
 
void setXAxis (const Ax2d &A1)
 
void setXDirection (const Dir2d &Vx)
 
void setYAxis (const Ax2d &A1)
 
void setYDirection (const Dir2d &Vy)
 
void transform (const Trsf2d &T)
 
Ax22d transformed (const Trsf2d &T) const
 
void translate (const Vec2d &V)
 
void translate (const Pnt2d &P1, const Pnt2d &P2)
 
Ax22d translated (const Vec2d &V) const
 
Ax22d translated (const Pnt2d &P1, const Pnt2d &P2) const
 
Ax2d xAxis () const
 
const Dir2dxDirection () const
 Returns the "xDirection" of <me>.
More...
 
Ax2d yAxis () const
 
const Dir2dyDirection () const
 Returns the "yDirection" of <me>.
More...
 
const Pnt2d_CSFDB_GetAx22dpoint () const
 
const Dir2d_CSFDB_GetAx22dvydir () const
 
const Dir2d_CSFDB_GetAx22dvxdir () const
 
bool operator== (const Ax22d &other) const
 

Detailed Description

Describes a coordinate system in a plane (2D space).
A coordinate system is defined by:

  • its origin (also referred to as its "location point"), and
  • two orthogonal unit vectors, respectively, called the "X <br> Direction" and the "Y Direction".
    A Ax22d may be right-handed ("direct sense") or
    left-handed ("inverse" or "indirect sense").
    You use a Ax22d to:
  • describe 2D geometric entities, in particular to position
    them. The local coordinate system of a geometric
    entity serves for the same purpose as the STEP
    function "axis placement two axes", or
  • define geometric transformations.
    Note: we refer to the "X Axis" and "Y Axis" as the axes having:
  • the origin of the coordinate system as their origin, and
  • the unit vectors "X Direction" and "Y Direction",
    respectively, as their unit vectors.

Constructor & Destructor Documentation

◆ Ax22d() [1/4]

Geom::Ax22d::Ax22d ( )

Creates an indefinite coordinate system.

◆ Ax22d() [2/4]

Geom::Ax22d::Ax22d ( const Pnt2d P,
const Dir2d Vx,
const Dir2d Vy 
)

Creates a coordinate system with origin P and where:

  • Vx is the "X Direction", and
  • the "Y Direction" is orthogonal to Vx and
    oriented so that the cross products Vx^"Y <br> Direction" and Vx^Vy have the same sign.
    Raises ConstructionError if Vx and Vy are parallel (same or opposite orientation).

◆ Ax22d() [3/4]

Geom::Ax22d::Ax22d ( const Pnt2d P,
const Dir2d V,
const bool  Sense = true 
)

Creates - a coordinate system with origin P and "X Direction"
V, which is:

  • right-handed if Sense is true (default value), or
  • left-handed if Sense is false

◆ Ax22d() [4/4]

Geom::Ax22d::Ax22d ( const Ax2d A,
const bool  Sense = true 
)

Creates - a coordinate system where its origin is the origin of
A and its "X Direction" is the unit vector of A, which is:

  • right-handed if Sense is true (default value), or
  • left-handed if Sense is false.

Member Function Documentation

◆ _CSFDB_GetAx22dpoint()

const Pnt2d& Geom::Ax22d::_CSFDB_GetAx22dpoint ( ) const
inline

◆ _CSFDB_GetAx22dvxdir()

const Dir2d& Geom::Ax22d::_CSFDB_GetAx22dvxdir ( ) const
inline

◆ _CSFDB_GetAx22dvydir()

const Dir2d& Geom::Ax22d::_CSFDB_GetAx22dvydir ( ) const
inline

◆ location()

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

Returns the "location" point (origin) of <me>.

◆ mirror() [1/2]

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

◆ mirror() [2/2]

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

◆ mirrored() [1/2]

Ax22d Geom::Ax22d::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.
Warnings :
The main direction of the axis placement is not changed.
The "xDirection" and the "yDirection" are reversed.
So the axis placement stay right handed.

◆ mirrored() [2/2]

Ax22d Geom::Ax22d::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.
The transformation is performed on the "location"
point, on the "xDirection" and "yDirection".
The resulting main "Direction" is the cross product between
the "xDirection" and the "yDirection" after transformation.

◆ operator==()

bool Geom::Ax22d::operator== ( const Ax22d other) const

◆ rotate()

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

◆ rotated()

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

Rotates an axis placement. <A1> is the axis of the
rotation . Ang is the angular value of the rotation
in radians.

◆ scale()

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

◆ scaled()

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

Applies a scaling transformation on the axis placement.
The "location" point of the axisplacement is modified.
Warnings :
If the scale <S> is negative :
. the main direction of the axis placement is not changed.
. The "xDirection" and the "yDirection" are reversed.
So the axis placement stay right handed.

◆ setAxis()

void Geom::Ax22d::setAxis ( const Ax22d A1)

Assigns the origin and the two unit vectors of the
coordinate system A1 to this coordinate system.

◆ setLocation()

void Geom::Ax22d::setLocation ( const Pnt2d P)

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

◆ setXAxis()

void Geom::Ax22d::setXAxis ( const Ax2d A1)

Changes the xAxis and yAxis ("location" point and "Direction")
of <me>.
The "yDirection" is recomputed in the same sense as before.

◆ setXDirection()

void Geom::Ax22d::setXDirection ( const Dir2d Vx)

Assigns Vx to the "X Direction" of
this coordinate system. The other unit vector of this
coordinate system is recomputed, normal to Vx ,
without modifying the orientation (right-handed or
left-handed) of this coordinate system.

◆ setYAxis()

void Geom::Ax22d::setYAxis ( const Ax2d A1)

Changes the xAxis and yAxis ("location" point and "Direction") of <me>.
The "xDirection" is recomputed in the same sense as before.

◆ setYDirection()

void Geom::Ax22d::setYDirection ( const Dir2d Vy)

Assignsr Vy to the "Y Direction" of
this coordinate system. The other unit vector of this
coordinate system is recomputed, normal to Vy,
without modifying the orientation (right-handed or
left-handed) of this coordinate system.

◆ transform()

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

◆ transformed()

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

Transforms an axis placement with a Trsf.
The "location" point, the "xDirection" and the
"yDirection" are transformed with T. The resulting
main "Direction" of <me> is the cross product between
the "xDirection" and the "yDirection" after transformation.

◆ translate() [1/2]

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

◆ translate() [2/2]

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

◆ translated() [1/2]

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

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

◆ translated() [2/2]

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

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

◆ xAxis()

Ax2d Geom::Ax22d::xAxis ( ) const

Returns an axis, for which

  • the origin is that of this coordinate system, and
  • the unit vector is either the "X Direction" of this coordinate system.
    Note: the result is the "X Axis" of this coordinate system.

◆ xDirection()

const Dir2d& Geom::Ax22d::xDirection ( ) const

Returns the "xDirection" of <me>.

◆ yAxis()

Ax2d Geom::Ax22d::yAxis ( ) const

Returns an axis, for which

  • the origin is that of this coordinate system, and
  • the unit vector is either the "Y Direction" of this coordinate system.
    Note: the result is the "Y Axis" of this coordinate system.

◆ yDirection()

const Dir2d& Geom::Ax22d::yDirection ( ) const

Returns the "yDirection" of <me>.


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