Open CASCADE Technology  7.2.0
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

 gp_Ax3 ()
 Creates an object corresponding to the reference coordinate system (OXYZ). More...
 
 gp_Ax3 (const gp_Ax2 &A)
 Creates a coordinate system from a right-handed coordinate system. More...
 
 gp_Ax3 (const gp_Pnt &P, const gp_Dir &N, const gp_Dir &Vx)
 Creates a right handed axis placement with the "Location" point P and two directions, N gives the "Direction" and Vx gives the "XDirection". Raises ConstructionError if N and Vx are parallel (same or opposite orientation). More...
 
 gp_Ax3 (const gp_Pnt &P, const gp_Dir &V)
 Creates an axis placement with the "Location" point. More...
 
void XReverse ()
 Reverses the X direction of <me>. More...
 
void YReverse ()
 Reverses the Y direction of <me>. More...
 
void ZReverse ()
 Reverses the Z direction of <me>. More...
 
void SetAxis (const gp_Ax1 &A1)
 Assigns the origin and "main Direction" of the axis A1 to this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: More...
 
void SetDirection (const gp_Dir &V)
 Changes the main direction of this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: More...
 
void SetLocation (const gp_Pnt &P)
 Changes the "Location" point (origin) of <me>. More...
 
void SetXDirection (const gp_Dir &Vx)
 Changes the "Xdirection" of <me>. The main direction "Direction" is not modified, the "Ydirection" is modified. If <Vx> is not normal to the main direction then <XDirection> is computed as follows XDirection = Direction ^ (Vx ^ Direction). Raises ConstructionError if <Vx> is parallel (same or opposite orientation) to the main direction of <me> More...
 
void SetYDirection (const gp_Dir &Vy)
 Changes the "Ydirection" of <me>. The main direction is not modified but the "Xdirection" is changed. If <Vy> is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ (<Vy> ^ Direction). Raises ConstructionError if <Vy> is parallel to the main direction of <me> More...
 
Standard_Real Angle (const gp_Ax3 &Other) const
 Computes the angular value between the main direction of <me> and the main direction of <Other>. Returns the angle between 0 and PI in radians. More...
 
const gp_Ax1Axis () const
 Returns the main axis of <me>. It is the "Location" point and the main "Direction". More...
 
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. More...
 
const gp_DirDirection () const
 Returns the main direction of <me>. More...
 
const gp_PntLocation () const
 Returns the "Location" point (origin) of <me>. More...
 
const gp_DirXDirection () const
 Returns the "XDirection" of <me>. More...
 
const gp_DirYDirection () const
 Returns the "YDirection" of <me>. More...
 
Standard_Boolean Direct () const
 Returns True if the coordinate system is right-handed. i.e. XDirection().Crossed(YDirection()).Dot(Direction()) > 0. More...
 
Standard_Boolean IsCoplanar (const gp_Ax3 &Other, const Standard_Real LinearTolerance, const Standard_Real AngularTolerance) const
 Returns True if . the distance between the "Location" point of <me> and <Other> is lower or equal to LinearTolerance and . the distance between the "Location" point of <Other> and <me> is lower or equal to LinearTolerance and . the main direction of <me> and the main direction of <Other> are parallel (same or opposite orientation). More...
 
Standard_Boolean IsCoplanar (const gp_Ax1 &A1, const Standard_Real LinearTolerance, const Standard_Real AngularTolerance) const
 Returns True if . the distance between <me> and the "Location" point of A1 is lower of equal to LinearTolerance and . the distance between A1 and the "Location" point of <me> is lower or equal to LinearTolerance and . the main direction of <me> and the direction of A1 are normal. More...
 
void Mirror (const gp_Pnt &P)
 
gp_Ax3 Mirrored (const gp_Pnt &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. More...
 
void Mirror (const gp_Ax1 &A1)
 
gp_Ax3 Mirrored (const gp_Ax1 &A1) 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. More...
 
void Mirror (const gp_Ax2 &A2)
 
gp_Ax3 Mirrored (const gp_Ax2 &A2) const
 Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <A2> 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. More...
 
void Rotate (const gp_Ax1 &A1, const Standard_Real Ang)
 
gp_Ax3 Rotated (const gp_Ax1 &A1, const Standard_Real Ang) const
 Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians. More...
 
void Scale (const gp_Pnt &P, const Standard_Real S)
 
gp_Ax3 Scaled (const gp_Pnt &P, const Standard_Real 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. More...
 
void Transform (const gp_Trsf &T)
 
gp_Ax3 Transformed (const gp_Trsf &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. More...
 
void Translate (const gp_Vec &V)
 
gp_Ax3 Translated (const gp_Vec &V) const
 Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector's magnitude. More...
 
void Translate (const gp_Pnt &P1, const gp_Pnt &P2)
 
gp_Ax3 Translated (const gp_Pnt &P1, const gp_Pnt &P2) const
 Translates an axis placement from the point <P1> to the point <P2>. More...
 

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/4]

gp_Ax3::gp_Ax3 ( )

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

◆ gp_Ax3() [2/4]

gp_Ax3::gp_Ax3 ( const gp_Ax2 A)

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

◆ gp_Ax3() [3/4]

gp_Ax3::gp_Ax3 ( const gp_Pnt P,
const gp_Dir N,
const gp_Dir Vx 
)

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

◆ gp_Ax3() [4/4]

gp_Ax3::gp_Ax3 ( const gp_Pnt P,
const gp_Dir V 
)

Creates an axis placement with the "Location" point.

and the normal direction <V>.

Member Function Documentation

◆ Angle()

Standard_Real gp_Ax3::Angle ( const gp_Ax3 Other) const

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

◆ Ax2()

gp_Ax2 gp_Ax3::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.

◆ Axis()

const gp_Ax1& gp_Ax3::Axis ( ) const

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

◆ Direct()

Standard_Boolean gp_Ax3::Direct ( ) const

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

◆ Direction()

const gp_Dir& gp_Ax3::Direction ( ) const

Returns the main direction of <me>.

◆ IsCoplanar() [1/2]

Standard_Boolean gp_Ax3::IsCoplanar ( const gp_Ax3 Other,
const Standard_Real  LinearTolerance,
const Standard_Real  AngularTolerance 
) const

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

◆ IsCoplanar() [2/2]

Standard_Boolean gp_Ax3::IsCoplanar ( const gp_Ax1 A1,
const Standard_Real  LinearTolerance,
const Standard_Real  AngularTolerance 
) const

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

◆ Location()

const gp_Pnt& gp_Ax3::Location ( ) const

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

◆ Mirror() [1/3]

void gp_Ax3::Mirror ( const gp_Pnt P)

◆ Mirror() [2/3]

void gp_Ax3::Mirror ( const gp_Ax1 A1)

◆ Mirror() [3/3]

void gp_Ax3::Mirror ( const gp_Ax2 A2)

◆ Mirrored() [1/3]

gp_Ax3 gp_Ax3::Mirrored ( const gp_Pnt 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/3]

gp_Ax3 gp_Ax3::Mirrored ( const gp_Ax1 A1) 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.

◆ Mirrored() [3/3]

gp_Ax3 gp_Ax3::Mirrored ( const gp_Ax2 A2) const

Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <A2> 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.

◆ Rotate()

void gp_Ax3::Rotate ( const gp_Ax1 A1,
const Standard_Real  Ang 
)

◆ Rotated()

gp_Ax3 gp_Ax3::Rotated ( const gp_Ax1 A1,
const Standard_Real  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 gp_Ax3::Scale ( const gp_Pnt P,
const Standard_Real  S 
)

◆ Scaled()

gp_Ax3 gp_Ax3::Scaled ( const gp_Pnt P,
const Standard_Real  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 gp_Ax3::SetAxis ( const gp_Ax1 A1)

Assigns the origin and "main Direction" of the axis A1 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 A1.
  • The orientation of this coordinate system (right-handed or left-handed) is not modified. Raises ConstructionError if the "Direction" of <A1> 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 V)

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" = V ^ (previous "X Direction" ^ V).
  • The orientation of this coordinate system (left- or right-handed) is not modified. Raises ConstructionError if <V< and the previous "XDirection" are parallel because it is impossible to calculate the new "XDirection" and the new "YDirection".

◆ SetLocation()

void gp_Ax3::SetLocation ( const gp_Pnt P)

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

◆ SetXDirection()

void gp_Ax3::SetXDirection ( const gp_Dir Vx)

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

◆ SetYDirection()

void gp_Ax3::SetYDirection ( const gp_Dir Vy)

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

◆ Transform()

void gp_Ax3::Transform ( const gp_Trsf T)

◆ Transformed()

gp_Ax3 gp_Ax3::Transformed ( const gp_Trsf 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 gp_Ax3::Translate ( const gp_Vec V)

◆ Translate() [2/2]

void gp_Ax3::Translate ( const gp_Pnt P1,
const gp_Pnt P2 
)

◆ Translated() [1/2]

gp_Ax3 gp_Ax3::Translated ( const gp_Vec 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]

gp_Ax3 gp_Ax3::Translated ( const gp_Pnt P1,
const gp_Pnt P2 
) const

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

◆ XDirection()

const gp_Dir& gp_Ax3::XDirection ( ) const

Returns the "XDirection" of <me>.

◆ XReverse()

void gp_Ax3::XReverse ( )

Reverses the X direction of <me>.

◆ YDirection()

const gp_Dir& gp_Ax3::YDirection ( ) const

Returns the "YDirection" of <me>.

◆ YReverse()

void gp_Ax3::YReverse ( )

Reverses the Y direction of <me>.

◆ ZReverse()

void gp_Ax3::ZReverse ( )

Reverses the Z direction of <me>.


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