Open CASCADE Technology  7.1.0.beta
Public Member Functions

gp_Ax2 Class Reference

Describes a right-handed coordinate system in 3D space. A coordinate system is defined by: More...

#include <gp_Ax2.hxx>

Public Member Functions

 gp_Ax2 ()
 Creates an object corresponding to the reference coordinate system (OXYZ). More...
 
 gp_Ax2 (const gp_Pnt &P, const gp_Dir &N, const gp_Dir &Vx)
 Creates an axis placement with an origin P such that: More...
 
 gp_Ax2 (const gp_Pnt &P, const gp_Dir &V)
 Creates - a coordinate system with an origin P, where V gives the "main Direction" (here, "X Direction" and "Y Direction" are defined automatically). 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: The new "X Direction" is computed as follows: new "X Direction" = V1 ^(previous "X Direction" ^ V) where V is the "Direction" of A1. Exceptions Standard_ConstructionError if A1 is parallel to the "X Direction" of this coordinate system. More...
 
void 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) Exceptions Standard_ConstructionError if V is parallel to the "X Direction" of this coordinate system. 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). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system. 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). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system. More...
 
Standard_Real Angle (const gp_Ax2 &Other) const
 Computes the angular value, in radians, 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...
 
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 IsCoplanar (const gp_Ax2 &Other, const Standard_Real LinearTolerance, const Standard_Real AngularTolerance) const
 
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 main direction of <me> and the direction of A1 are normal. Note: the tolerance criterion for angular equality is given by AngularTolerance. More...
 
void Mirror (const gp_Pnt &P)
 Performs a symmetrical transformation of this coordinate system with respect to: More...
 
gp_Ax2 Mirrored (const gp_Pnt &P) const
 Performs a symmetrical transformation of this coordinate system with respect to: More...
 
void Mirror (const gp_Ax1 &A1)
 Performs a symmetrical transformation of this coordinate system with respect to: More...
 
gp_Ax2 Mirrored (const gp_Ax1 &A1) const
 Performs a symmetrical transformation of this coordinate system with respect to: More...
 
void Mirror (const gp_Ax2 &A2)
 Performs a symmetrical transformation of this coordinate system with respect to: More...
 
gp_Ax2 Mirrored (const gp_Ax2 &A2) const
 Performs a symmetrical transformation of this coordinate system with respect to: More...
 
void Rotate (const gp_Ax1 &A1, const Standard_Real Ang)
 
gp_Ax2 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_Ax2 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_Ax2 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_Ax2 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_Ax2 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 right-handed coordinate system in 3D space. A coordinate system is defined by:

Constructor & Destructor Documentation

gp_Ax2::gp_Ax2 ( )

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

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

Creates an axis placement with an origin P such that:

  • N is the Direction, and
  • the "X Direction" is normal to N, in the plane defined by the vectors (N, Vx): "X Direction" = (N ^ Vx) ^ N, Exception: raises ConstructionError if N and Vx are parallel (same or opposite orientation).
gp_Ax2::gp_Ax2 ( const gp_Pnt P,
const gp_Dir V 
)

Creates - a coordinate system with an origin P, where V gives the "main Direction" (here, "X Direction" and "Y Direction" are defined automatically).

Member Function Documentation

Standard_Real gp_Ax2::Angle ( const gp_Ax2 Other) const

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

const gp_Ax1& gp_Ax2::Axis ( ) const

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

const gp_Dir& gp_Ax2::Direction ( ) const

Returns the main direction of <me>.

Standard_Boolean gp_Ax2::IsCoplanar ( const gp_Ax2 Other,
const Standard_Real  LinearTolerance,
const Standard_Real  AngularTolerance 
) const
Standard_Boolean gp_Ax2::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 main direction of <me> and the direction of A1 are normal. Note: the tolerance criterion for angular equality is given by AngularTolerance.

const gp_Pnt& gp_Ax2::Location ( ) const

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

void gp_Ax2::Mirror ( const gp_Pnt P)

Performs a symmetrical transformation of this coordinate system with respect to:

  • the point P, and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
  • the main direction of the coordinate system is not changed, and
  • the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
  • the transformation is applied to the "X Direction" and the "Y Direction", then
  • the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
void gp_Ax2::Mirror ( const gp_Ax1 A1)

Performs a symmetrical transformation of this coordinate system with respect to:

  • the axis A1, and assigns the result to this coordinate systeme. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
  • the main direction of the coordinate system is not changed, and
  • the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
  • the transformation is applied to the "X Direction" and the "Y Direction", then
  • the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
void gp_Ax2::Mirror ( const gp_Ax2 A2)

Performs a symmetrical transformation of this coordinate system with respect to:

  • the plane defined by the origin, "X Direction" and "Y Direction" of coordinate system A2 and assigns the result to this coordinate systeme. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
  • the main direction of the coordinate system is not changed, and
  • the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
  • the transformation is applied to the "X Direction" and the "Y Direction", then
  • the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
gp_Ax2 gp_Ax2::Mirrored ( const gp_Pnt P) const

Performs a symmetrical transformation of this coordinate system with respect to:

  • the point P, and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
  • the main direction of the coordinate system is not changed, and
  • the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
  • the transformation is applied to the "X Direction" and the "Y Direction", then
  • the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
gp_Ax2 gp_Ax2::Mirrored ( const gp_Ax1 A1) const

Performs a symmetrical transformation of this coordinate system with respect to:

  • the axis A1, and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
  • the main direction of the coordinate system is not changed, and
  • the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
  • the transformation is applied to the "X Direction" and the "Y Direction", then
  • the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
gp_Ax2 gp_Ax2::Mirrored ( const gp_Ax2 A2) const

Performs a symmetrical transformation of this coordinate system with respect to:

  • the plane defined by the origin, "X Direction" and "Y Direction" of coordinate system A2 and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
  • the main direction of the coordinate system is not changed, and
  • the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
  • the transformation is applied to the "X Direction" and the "Y Direction", then
  • the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
void gp_Ax2::Rotate ( const gp_Ax1 A1,
const Standard_Real  Ang 
)
gp_Ax2 gp_Ax2::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.

void gp_Ax2::Scale ( const gp_Pnt P,
const Standard_Real  S 
)
gp_Ax2 gp_Ax2::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.

void gp_Ax2::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. Exceptions Standard_ConstructionError if A1 is parallel to the "X Direction" of this coordinate system.

void gp_Ax2::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) Exceptions Standard_ConstructionError if V is parallel to the "X Direction" of this coordinate system.

void gp_Ax2::SetLocation ( const gp_Pnt P)

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

void gp_Ax2::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). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system.

void gp_Ax2::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). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system.

void gp_Ax2::Transform ( const gp_Trsf T)
gp_Ax2 gp_Ax2::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.

void gp_Ax2::Translate ( const gp_Vec V)
void gp_Ax2::Translate ( const gp_Pnt P1,
const gp_Pnt P2 
)
gp_Ax2 gp_Ax2::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.

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

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

const gp_Dir& gp_Ax2::XDirection ( ) const

Returns the "XDirection" of <me>.

const gp_Dir& gp_Ax2::YDirection ( ) const

Returns the "YDirection" of <me>.


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