Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
gp_Ax3 Class Reference

Describes a coordinate system in 3D space. Unlike a gp_Ax2 coordinate system, a gp_Ax3 can be right-handed ("direct sense") or left-handed ("indirect sense"). A coordinate system is defined by: More...

#include <gp_Ax3.hxx>

Public Member Functions

constexpr gp_Ax3 () noexcept
 Creates an object corresponding to the reference coordinate system (OXYZ).
 
 gp_Ax3 (const gp_Ax2 &theA)
 Creates a coordinate system from a right-handed coordinate system.
 
 gp_Ax3 (const gp_Pnt &theP, const gp_Dir &theN, const gp_Dir &theVx)
 Creates a right handed axis placement with the "Location" point theP and two directions, theN gives the "Direction" and theVx gives the "XDirection". Raises ConstructionError if theN and theVx are parallel (same or opposite orientation).
 
constexpr gp_Ax3 (const gp_Pnt &theP, const gp_Dir::D theN, const gp_Dir::D theVx) noexcept
 Creates an axis placement with standard directions. This constructor allows constexpr and noexcept construction when using standard directions.
 
 gp_Ax3 (const gp_Pnt &theP, const gp_Dir &theV)
 Creates an axis placement with the "Location" point <theP> and the normal direction <theV>.
 
constexpr gp_Ax3 (const gp_Pnt &theP, const gp_Dir::D theV) noexcept
 Creates an axis placement with the given location point and standard direction.
 
constexpr gp_Ax3 (const gp_Dir::D theV) noexcept
 Creates an axis placement at the origin with the given standard direction.
 
constexpr void XReverse () noexcept
 Reverses the X direction of <me>.
 
constexpr void YReverse () noexcept
 Reverses the Y direction of <me>.
 
constexpr void ZReverse () noexcept
 Reverses the Z direction of <me>.
 
void SetAxis (const gp_Ax1 &theA1)
 Assigns the origin and "main Direction" of the axis theA1 to this coordinate system, then recomputes its "X Direction" and "Y Direction". Note:
 
void SetDirection (const gp_Dir &theV)
 Changes the main direction of this coordinate system, then recomputes its "X Direction" and "Y Direction". Note:
 
constexpr void SetLocation (const gp_Pnt &theP) noexcept
 Changes the "Location" point (origin) of <me>.
 
void SetXDirection (const gp_Dir &theVx)
 Changes the "Xdirection" of <me>. The main direction "Direction" is not modified, the "Ydirection" is modified. If <theVx> is not normal to the main direction then <XDirection> is computed as follows XDirection = Direction ^ (theVx ^ Direction). Raises ConstructionError if <theVx> is parallel (same or opposite orientation) to the main direction of <me>
 
void SetYDirection (const gp_Dir &theVy)
 Changes the "Ydirection" of <me>. The main direction is not modified but the "Xdirection" is changed. If <theVy> is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ (<theVy> ^ Direction). Raises ConstructionError if <theVy> is parallel to the main direction of <me>
 
double Angle (const gp_Ax3 &theOther) const
 Computes the angular value between the main direction of <me> and the main direction of <theOther>. Returns the angle between 0 and PI in radians.
 
constexpr const gp_Ax1Axis () const noexcept
 Returns the main axis of <me>. It is the "Location" point and the main "Direction".
 
gp_Ax2 Ax2 () const
 Computes a right-handed coordinate system with the same "X Direction" and "Y Direction" as those of this coordinate system, then recomputes the "main Direction". If this coordinate system is right-handed, the result returned is the same coordinate system. If this coordinate system is left-handed, the result is reversed.
 
constexpr const gp_DirDirection () const noexcept
 Returns the main direction of <me>.
 
constexpr const gp_PntLocation () const noexcept
 Returns the "Location" point (origin) of <me>.
 
constexpr const gp_DirXDirection () const noexcept
 Returns the "XDirection" of <me>.
 
constexpr const gp_DirYDirection () const noexcept
 Returns the "YDirection" of <me>.
 
constexpr bool Direct () const
 Returns True if the coordinate system is right-handed. i.e. XDirection().Crossed(YDirection()).Dot(Direction()) > 0.
 
bool IsCoplanar (const gp_Ax3 &theOther, const double theLinearTolerance, const double theAngularTolerance) const
 Returns True if . the distance between the "Location" point of <me> and <theOther> is lower or equal to theLinearTolerance and . the distance between the "Location" point of <theOther> and <me> is lower or equal to theLinearTolerance and . the main direction of <me> and the main direction of <theOther> are parallel (same or opposite orientation).
 
bool IsCoplanar (const gp_Ax1 &theA1, const double theLinearTolerance, const double theAngularTolerance) const
 Returns True if . the distance between <me> and the "Location" point of theA1 is lower of equal to theLinearTolerance and . the distance between theA1 and the "Location" point of <me> is lower or equal to theLinearTolerance and . the main direction of <me> and the direction of theA1 are normal.
 
void Mirror (const gp_Pnt &theP) noexcept
 
gp_Ax3 Mirrored (const gp_Pnt &theP) const noexcept
 Performs the symmetrical transformation of an axis placement with respect to the point theP 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.
 
void Mirror (const gp_Ax1 &theA1) noexcept
 
gp_Ax3 Mirrored (const gp_Ax1 &theA1) const noexcept
 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.
 
void Mirror (const gp_Ax2 &theA2) noexcept
 
gp_Ax3 Mirrored (const gp_Ax2 &theA2) const noexcept
 Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <theA2> locates the plane of the symmetry: (Location, XDirection, YDirection). 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.
 
void Rotate (const gp_Ax1 &theA1, const double theAng)
 
gp_Ax3 Rotated (const gp_Ax1 &theA1, const double theAng) const
 Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.
 
void Scale (const gp_Pnt &theP, const double theS)
 
gp_Ax3 Scaled (const gp_Pnt &theP, const double theS) const
 Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale <theS> 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.
 
void Transform (const gp_Trsf &theT)
 
gp_Ax3 Transformed (const gp_Trsf &theT) const
 Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of <me> is the cross product between the "XDirection" and the "YDirection" after transformation.
 
constexpr void Translate (const gp_Vec &theV) noexcept
 
constexpr gp_Ax3 Translated (const gp_Vec &theV) const noexcept
 Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.
 
constexpr void Translate (const gp_Pnt &theP1, const gp_Pnt &theP2) noexcept
 
constexpr gp_Ax3 Translated (const gp_Pnt &theP1, const gp_Pnt &theP2) const noexcept
 Translates an axis placement from the point <theP1> to the point <theP2>.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
 Dumps the content of me into the stream.
 
bool InitFromJson (const Standard_SStream &theSStream, int &theStreamPos)
 Inits the content of me from the stream.
 

Detailed Description

Describes a coordinate system in 3D space. Unlike a gp_Ax2 coordinate system, a gp_Ax3 can be right-handed ("direct sense") or left-handed ("indirect sense"). A coordinate system is defined by:

Constructor & Destructor Documentation

◆ gp_Ax3() [1/7]

constexpr gp_Ax3::gp_Ax3 ( )
inlineconstexprnoexcept

Creates an object corresponding to the reference coordinate system (OXYZ).

◆ gp_Ax3() [2/7]

gp_Ax3::gp_Ax3 ( const gp_Ax2 & theA)
inline

Creates a coordinate system from a right-handed coordinate system.

◆ gp_Ax3() [3/7]

gp_Ax3::gp_Ax3 ( const gp_Pnt & theP,
const gp_Dir & theN,
const gp_Dir & theVx )
inline

Creates a right handed axis placement with the "Location" point theP and two directions, theN gives the "Direction" and theVx gives the "XDirection". Raises ConstructionError if theN and theVx are parallel (same or opposite orientation).

◆ gp_Ax3() [4/7]

constexpr gp_Ax3::gp_Ax3 ( const gp_Pnt & theP,
const gp_Dir::D theN,
const gp_Dir::D theVx )
inlineconstexprnoexcept

Creates an axis placement with standard directions. This constructor allows constexpr and noexcept construction when using standard directions.

◆ gp_Ax3() [5/7]

gp_Ax3::gp_Ax3 ( const gp_Pnt & theP,
const gp_Dir & theV )

Creates an axis placement with the "Location" point <theP> and the normal direction <theV>.

◆ gp_Ax3() [6/7]

constexpr gp_Ax3::gp_Ax3 ( const gp_Pnt & theP,
const gp_Dir::D theV )
inlineconstexprnoexcept

Creates an axis placement with the given location point and standard direction.

◆ gp_Ax3() [7/7]

constexpr gp_Ax3::gp_Ax3 ( const gp_Dir::D theV)
inlineexplicitconstexprnoexcept

Creates an axis placement at the origin with the given standard direction.

Member Function Documentation

◆ Angle()

double gp_Ax3::Angle ( const gp_Ax3 & theOther) const
inline

Computes the angular value between the main direction of <me> and the main direction of <theOther>. Returns the angle between 0 and PI in radians.

◆ Ax2()

gp_Ax2 gp_Ax3::Ax2 ( ) const
inline

Computes a right-handed coordinate system with the same "X Direction" and "Y Direction" as those of this coordinate system, then recomputes the "main Direction". If this coordinate system is right-handed, the result returned is the same coordinate system. If this coordinate system is left-handed, the result is reversed.

◆ Axis()

constexpr const gp_Ax1 & gp_Ax3::Axis ( ) const
inlineconstexprnoexcept

Returns the main axis of <me>. It is the "Location" point and the main "Direction".

◆ Direct()

constexpr bool gp_Ax3::Direct ( ) const
inlineconstexpr

Returns True if the coordinate system is right-handed. i.e. XDirection().Crossed(YDirection()).Dot(Direction()) > 0.

◆ Direction()

constexpr const gp_Dir & gp_Ax3::Direction ( ) const
inlineconstexprnoexcept

Returns the main direction of <me>.

◆ DumpJson()

void gp_Ax3::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const

Dumps the content of me into the stream.

◆ InitFromJson()

bool gp_Ax3::InitFromJson ( const Standard_SStream & theSStream,
int & theStreamPos )

Inits the content of me from the stream.

◆ IsCoplanar() [1/2]

bool gp_Ax3::IsCoplanar ( const gp_Ax1 & theA1,
const double theLinearTolerance,
const double theAngularTolerance ) const
inline

Returns True if . the distance between <me> and the "Location" point of theA1 is lower of equal to theLinearTolerance and . the distance between theA1 and the "Location" point of <me> is lower or equal to theLinearTolerance and . the main direction of <me> and the direction of theA1 are normal.

◆ IsCoplanar() [2/2]

bool gp_Ax3::IsCoplanar ( const gp_Ax3 & theOther,
const double theLinearTolerance,
const double theAngularTolerance ) const
inline

Returns True if . the distance between the "Location" point of <me> and <theOther> is lower or equal to theLinearTolerance and . the distance between the "Location" point of <theOther> and <me> is lower or equal to theLinearTolerance and . the main direction of <me> and the main direction of <theOther> are parallel (same or opposite orientation).

◆ Location()

constexpr const gp_Pnt & gp_Ax3::Location ( ) const
inlineconstexprnoexcept

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

◆ Mirror() [1/3]

void gp_Ax3::Mirror ( const gp_Ax1 & theA1)
noexcept

◆ Mirror() [2/3]

void gp_Ax3::Mirror ( const gp_Ax2 & theA2)
noexcept

◆ Mirror() [3/3]

void gp_Ax3::Mirror ( const gp_Pnt & theP)
noexcept

◆ Mirrored() [1/3]

gp_Ax3 gp_Ax3::Mirrored ( const gp_Ax1 & theA1) const
noexcept

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.

◆ Mirrored() [2/3]

gp_Ax3 gp_Ax3::Mirrored ( const gp_Ax2 & theA2) const
noexcept

Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <theA2> locates the plane of the symmetry: (Location, XDirection, YDirection). 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.

◆ Mirrored() [3/3]

gp_Ax3 gp_Ax3::Mirrored ( const gp_Pnt & theP) const
noexcept

Performs the symmetrical transformation of an axis placement with respect to the point theP 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.

◆ Rotate()

void gp_Ax3::Rotate ( const gp_Ax1 & theA1,
const double theAng )
inline

◆ Rotated()

gp_Ax3 gp_Ax3::Rotated ( const gp_Ax1 & theA1,
const double theAng ) const
inline

Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.

◆ Scale()

void gp_Ax3::Scale ( const gp_Pnt & theP,
const double theS )
inline

◆ Scaled()

gp_Ax3 gp_Ax3::Scaled ( const gp_Pnt & theP,
const double theS ) const
inline

Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale <theS> 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 gp_Ax3::SetAxis ( const gp_Ax1 & theA1)
inline

Assigns the origin and "main Direction" of the axis theA1 to this coordinate system, then recomputes its "X Direction" and "Y Direction". Note:

  • The new "X Direction" is computed as follows: new "X Direction" = V1 ^(previous "X Direction" ^ V) where V is the "Direction" of theA1.
  • The orientation of this coordinate system (right-handed or left-handed) is not modified. Raises ConstructionError if the "Direction" of <theA1> and the "XDirection" of <me> are parallel (same or opposite orientation) because it is impossible to calculate the new "XDirection" and the new "YDirection".

◆ SetDirection()

void gp_Ax3::SetDirection ( const gp_Dir & theV)
inline

Changes the main direction of this coordinate system, then recomputes its "X Direction" and "Y Direction". Note:

  • The new "X Direction" is computed as follows: new "X Direction" = theV ^ (previous "X Direction" ^ theV).
  • The orientation of this coordinate system (left- or right-handed) is not modified. Raises ConstructionError if <theV> and the previous "XDirection" are parallel because it is impossible to calculate the new "XDirection" and the new "YDirection".

◆ SetLocation()

constexpr void gp_Ax3::SetLocation ( const gp_Pnt & theP)
inlineconstexprnoexcept

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

◆ SetXDirection()

void gp_Ax3::SetXDirection ( const gp_Dir & theVx)
inline

Changes the "Xdirection" of <me>. The main direction "Direction" is not modified, the "Ydirection" is modified. If <theVx> is not normal to the main direction then <XDirection> is computed as follows XDirection = Direction ^ (theVx ^ Direction). Raises ConstructionError if <theVx> is parallel (same or opposite orientation) to the main direction of <me>

◆ SetYDirection()

void gp_Ax3::SetYDirection ( const gp_Dir & theVy)
inline

Changes the "Ydirection" of <me>. The main direction is not modified but the "Xdirection" is changed. If <theVy> is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ (<theVy> ^ Direction). Raises ConstructionError if <theVy> is parallel to the main direction of <me>

◆ Transform()

void gp_Ax3::Transform ( const gp_Trsf & theT)
inline

◆ Transformed()

gp_Ax3 gp_Ax3::Transformed ( const gp_Trsf & theT) const
inline

Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of <me> is the cross product between the "XDirection" and the "YDirection" after transformation.

◆ Translate() [1/2]

constexpr void gp_Ax3::Translate ( const gp_Pnt & theP1,
const gp_Pnt & theP2 )
inlineconstexprnoexcept

◆ Translate() [2/2]

constexpr void gp_Ax3::Translate ( const gp_Vec & theV)
inlineconstexprnoexcept

◆ Translated() [1/2]

constexpr gp_Ax3 gp_Ax3::Translated ( const gp_Pnt & theP1,
const gp_Pnt & theP2 ) const
inlineconstexprnoexcept

Translates an axis placement from the point <theP1> to the point <theP2>.

◆ Translated() [2/2]

constexpr gp_Ax3 gp_Ax3::Translated ( const gp_Vec & theV) const
inlineconstexprnoexcept

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

◆ XDirection()

constexpr const gp_Dir & gp_Ax3::XDirection ( ) const
inlineconstexprnoexcept

Returns the "XDirection" of <me>.

◆ XReverse()

constexpr void gp_Ax3::XReverse ( )
inlineconstexprnoexcept

Reverses the X direction of <me>.

◆ YDirection()

constexpr const gp_Dir & gp_Ax3::YDirection ( ) const
inlineconstexprnoexcept

Returns the "YDirection" of <me>.

◆ YReverse()

constexpr void gp_Ax3::YReverse ( )
inlineconstexprnoexcept

Reverses the Y direction of <me>.

◆ ZReverse()

constexpr void gp_Ax3::ZReverse ( )
inlineconstexprnoexcept

Reverses the Z direction of <me>.


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