Hide menu
Loading...
Searching...
No Matches

Defines an axis as a combination of point and direction. More...

#include <cadex/Geom/Axis1d.hxx>

Public Member Functions

 Axis1d ()
 Constructor.
 
 Axis1d (const Axis1d &theOther)
 Constructor.
 
 Axis1d (const Geom::Point &theLocation, const Geom::Direction &theDir)
 Constructor.
 
const Geom::PointLocation () const
 Returns an origin point.
 
const Geom::DirectionDirection () const
 Returns a direction value.
 
bool IsCoaxial (const Axis1d &theOther, double theAngularTolerance, double theDistanceTolerance, bool theAllowOpposite)
 Returns true if this axis is coaxial to theOther.
 
void Reverse ()
 
Axis1d Reversed () const
 
void Transform (const Transformation &theTransformation)
 
Axis1d Transformed (const Transformation &theTransformation) const
 
void Scale (const Point &thePoint, double theScale)
 Sets scale to an origin point.
 
Axis1d Scaled (const Point &thePoint, double theScale) const
 
void Mirror (const Point &Point)
 Mirrors an origin point.
 
void Mirror (const Axis1d &theAxis)
 
void Mirror (const Axis3d &theAxis)
 
Axis1d Mirrored (const Point &thePoint) const
 
Axis1d Mirrored (const Axis1d &theAxis) const
 
Axis1d Mirrored (const Axis3d &theAxis) const
 
void Rotate (const Axis1d &theAxis, double theAngle)
 
Axis1d Rotated (const Axis1d &theAxis, double theAngle)
 
void Translate (const Vector &theVector)
 
Axis1d Translated (const Vector &theVector)
 

Static Public Member Functions

static const Axis1dOX ()
 Returns an OX axis.
 
static const Axis1dOY ()
 Returns an OY axis.
 
static const Axis1dOZ ()
 Returns an OZ axis.
 

Detailed Description

Defines an axis as a combination of point and direction.

Constructor & Destructor Documentation

◆ Axis1d() [1/2]

cadex::Geom::Axis1d::Axis1d ( )

Constructor.

Creates an axis from point (0., 0., 0.) and direction (0., 0., 1.).

◆ Axis1d() [2/2]

cadex::Geom::Axis1d::Axis1d ( const Geom::Point & theLocation,
const Geom::Direction & theDir )

Constructor.

Creates an axis from origin point and direction.

Member Function Documentation

◆ Direction()

const Geom::Direction & cadex::Geom::Axis1d::Direction ( ) const

Returns a direction value.

Returns the value specified in the constructor.

Examples
MTKConverter/Program.cs, and machining/feature_recognizer/Program.cs.

◆ IsCoaxial()

bool cadex::Geom::Axis1d::IsCoaxial ( const Axis1d & theOther,
double theAngularTolerance,
double theDistanceTolerance,
bool theAllowOpposite )

Returns true if this axis is coaxial to theOther.

Returns true if angle between axes is less than theAngularTolerance and distances between each axis origins and another axis is less than theDistanceTolerance. If theAllowOpposite is true then also checks if the angle is equal to PI within theAngularTolerance.

◆ Location()

const Geom::Point & cadex::Geom::Axis1d::Location ( ) const

Returns an origin point.

Returns the value specified in the constructor.

◆ Mirror()

void cadex::Geom::Axis1d::Mirror ( const Point & thePoint)

Mirrors an origin point.

Location() = 2.0 * thePoint - Location(). Reverses directions.

◆ OX()

const Axis1d & cadex::Geom::Axis1d::OX ( )
static

Returns an OX axis.

Creates an axis from point (0., 0., 0.) and direction (1., 0., 0.).

◆ OY()

const Axis1d & cadex::Geom::Axis1d::OY ( )
static

Returns an OY axis.

Creates an axis from point (0., 0., 0.) and direction (0., 1., 0.).

◆ OZ()

const Axis1d & cadex::Geom::Axis1d::OZ ( )
static

Returns an OZ axis.

Creates an axis from point (0., 0., 0.) and direction (0., 0., 1.).

◆ Scale()

void cadex::Geom::Axis1d::Scale ( const Point & thePoint,
double theScale )

Sets scale to an origin point.

If scale is less than zero than a direction value will be reversed.