CAD Exchanger SDK
cadex::ModelData_Axis2Placement Class Reference

Defines a right-hand axis placement in 3D. More...

Public Member Functions

 ModelData_Axis2Placement ()
 Constructor. More...
 
 ModelData_Axis2Placement (const ModelData_Point &theLocation, const ModelData_Direction &theAxis, const ModelData_Direction &theRefDirection)
 Constructor.
 
 ModelData_Axis2Placement (const gp_Ax2 &)
 Constructor.
 
 operator const gp_Ax2 & () const
 
 operator gp_Ax2 & ()
 
const ModelData_PointLocation () const
 Returns a location point of the axis placement.
 
const ModelData_DirectionAxis () const
 Returns a Z-direction of the axis placement. More...
 
const ModelData_DirectionXDirection () const
 Returns a X-direction of the axis placement. More...
 
const ModelData_DirectionYDirection () const
 Returns a Y-direction of the axis placement. More...
 
void Transform (const ModelData_Transformation &theTransformation)
 Transforms the axis with a transformation matrix.
 
ModelData_Axis2Placement Transformed (const ModelData_Transformation &theTransformation) const
 Returns an axis which is transformed with a transformation matrix. More...
 
void Mirror (const ModelData_Point &theAxis)
 
void Mirror (const ModelData_Axis1Placement &theAxis)
 
void Mirror (const ModelData_Axis2Placement &theAxis)
 
template<typename T >
ModelData_Axis2Placement Mirrored (const T &theRef) const
 
void Rotate (const ModelData_Axis1Placement &theAxis, double theAngle)
 
ModelData_Axis2Placement Rotated (const ModelData_Axis1Placement &theAxis, double theAngle)
 
void Translate (const ModelData_Vector &theVector)
 
ModelData_Axis2Placement Translated (const ModelData_Vector &theVector)
 

Static Public Member Functions

static ModelData_Axis2PlacementXOY ()
 Returns an axis placement with axes aligned with main ones.
 
static ModelData_Axis2PlacementYOZ ()
 
static ModelData_Axis2PlacementZOX ()
 

Detailed Description

Defines a right-hand axis placement in 3D.

An axis placement is defined by a location point, a Z-direction and a reference direction (XRef).

The following image depicts an example of an axis placement:

axis2.png
Axis2Placement

The Z-direction defines a plane perpendicular to Z. Other directions are defined as follows:

  • the Y-direction is defined as a cross-product of the Z-direction and the reference direction;
  • the X-direction is defined as a cross-product of the Y-direction and the Z-direction.

X,Y,Z axes always define a right-hand axis placement.

See also
ModelData_Axis3Placement.
Examples:
brepmodeling/main.cxx.

Constructor & Destructor Documentation

◆ ModelData_Axis2Placement()

cadex::ModelData_Axis2Placement::ModelData_Axis2Placement ( )

Constructor.

Creates an axis placement with axes aligned with main ones. Creates an object equal to one returned by XOY().

Member Function Documentation

◆ Axis()

const ModelData_Direction & cadex::ModelData_Axis2Placement::Axis ( ) const

Returns a Z-direction of the axis placement.

See also
XDirection(), YDirection().

◆ Transformed()

ModelData_Axis2Placement cadex::ModelData_Axis2Placement::Transformed ( const ModelData_Transformation theTransformation) const
inline

Returns an axis which is transformed with a transformation matrix.

See also
Transform().

◆ XDirection()

const ModelData_Direction & cadex::ModelData_Axis2Placement::XDirection ( ) const

Returns a X-direction of the axis placement.

See also
Axis(), YDirection().

◆ YDirection()

const ModelData_Direction & cadex::ModelData_Axis2Placement::YDirection ( ) const

Returns a Y-direction of the axis placement.

See also
Axis(), XDirection().