OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKMath
gp


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:
- its origin (also referred to as its "Location point"), and
- three orthogonal unit vectors, termed the "X <br> Direction", the "Y Direction" and the "Direction" (also
referred to as the "main Direction").
The "Direction" of the coordinate system is called its
"main Direction" because whenever this unit vector is
modified, the "X Direction" and the "Y Direction" are
recomputed. However, when we modify either the "X <br> Direction" or the "Y Direction", "Direction" is not modified.
"Direction" is also the "Z Direction".
The "main Direction" is always parallel to the cross
product of its "X Direction" and "Y Direction".
If the coordinate system is right-handed, it satisfies the equation:
"main Direction" = "X Direction" ^ "Y Direction"
and if it is left-handed, it satisfies the equation:
"main Direction" = -"X Direction" ^ "Y Direction"
A coordinate system is used:
- to describe geometric entities, in particular to position
them. The local coordinate system of a geometric
entity serves the same purpose as the STEP function
"axis placement three axes", or
- to define geometric transformations.
Note:
- We refer to the "X Axis", "Y Axis" and "Z Axis",
respectively, as the axes having:
- the origin of the coordinate system as their origin, and
- the unit vectors "X Direction", "Y Direction" and
"main Direction", respectively, as their unit vectors.
- The "Z Axis" is also the "main Axis".
- gp_Ax2 is used to define a coordinate system that must be always right-handed.
.

#include <gp_Ax3.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT gp_Ax3 ()
 Creates an indefinite coordinate system.
.
Standard_EXPORT gp_Ax3 (const gp_Ax2 &A)
 Creates a coordinate system from a right-handed
coordinate system.
.
Standard_EXPORT 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).
.
Standard_EXPORT gp_Ax3 (const gp_Pnt &P, const gp_Dir &V)
 Creates an axis placement with the "Location" point


and the normal direction <v>.
.

Standard_EXPORT void XReverse ()
 Reverses the X direction of <me>.
.
Standard_EXPORT void YReverse ()
 Reverses the Y direction of <me>.
.
Standard_EXPORT void ZReverse ()
 Reverses the Z direction of <me>.
.
Standard_EXPORT 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.
- 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".
.
Standard_EXPORT 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).
- 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".
.
Standard_EXPORT void SetLocation (const gp_Pnt &P)
 Changes the "Location" point (origin) of <me>.
.
Standard_EXPORT 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>
.
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>
.
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.
.
const gp_Ax1Axis () const
 Returns the main axis of <me>. It is the "Location" point
and the main "Direction".
.
Standard_EXPORT 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.
.
const gp_DirDirection () const
 Returns the main direction of <me>.
.
const gp_PntLocation () const
 Returns the "Location" point (origin) of <me>.
.
const gp_DirXDirection () const
 Returns the "XDirection" of <me>.
.
const gp_DirYDirection () const
 Returns the "YDirection" of <me>.
.
Standard_Boolean Direct () const
 Returns True if the coordinate system is right-handed. i.e.
XDirection().Crossed(YDirection()).Dot(Direction()) > 0
.
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).
.
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.
.
Standard_EXPORT void Mirror (const gp_Pnt &P)
Standard_EXPORT 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.
.
Standard_EXPORT void Mirror (const gp_Ax1 &A1)
Standard_EXPORT 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.
.
Standard_EXPORT void Mirror (const gp_Ax2 &A2)
Standard_EXPORT 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.
.
Standard_EXPORT void Rotate (const gp_Ax1 &A1, const Standard_Real Ang)
Standard_EXPORT 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.
.
Standard_EXPORT void Scale (const gp_Pnt &P, const Standard_Real S)
Standard_EXPORT 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.
.
Standard_EXPORT void Transform (const gp_Trsf &T)
Standard_EXPORT 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.
.
Standard_EXPORT void Translate (const gp_Vec &V)
Standard_EXPORT 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.
.
Standard_EXPORT void Translate (const gp_Pnt &P1, const gp_Pnt &P2)
Standard_EXPORT gp_Ax3 Translated (const gp_Pnt &P1, const gp_Pnt &P2) const
 Translates an axis placement from the point <p1> to the
point <p2>.
.
const gp_Ax1_CSFDB_Getgp_Ax3axis () const
const gp_Dir_CSFDB_Getgp_Ax3vydir () const
const gp_Dir_CSFDB_Getgp_Ax3vxdir () const

Private Attributes

gp_Ax1 axis
gp_Dir vydir
gp_Dir vxdir

Friends

Standard_EXPORT friend Handle_Standard_Type & gp_Ax3_Type_ ()


Constructor & Destructor Documentation

gp_Ax3::gp_Ax3  )  [inline]
 

gp_Ax3::gp_Ax3 const gp_Ax2 A  )  [inline]
 

gp_Ax3::gp_Ax3 const gp_Pnt P,
const gp_Dir N,
const gp_Dir Vx
[inline]
 

Standard_EXPORT gp_Ax3::gp_Ax3 const gp_Pnt P,
const gp_Dir V
 


Member Function Documentation

const gp_Ax1& gp_Ax3::_CSFDB_Getgp_Ax3axis  )  const [inline]
 

const gp_Dir& gp_Ax3::_CSFDB_Getgp_Ax3vxdir  )  const [inline]
 

const gp_Dir& gp_Ax3::_CSFDB_Getgp_Ax3vydir  )  const [inline]
 

Standard_Real gp_Ax3::Angle const gp_Ax3 Other  )  const [inline]
 

gp_Ax2 gp_Ax3::Ax2  )  const [inline]
 

const gp_Ax1 & gp_Ax3::Axis  )  const [inline]
 

Standard_Boolean gp_Ax3::Direct  )  const [inline]
 

const gp_Dir & gp_Ax3::Direction  )  const [inline]
 

Standard_Boolean gp_Ax3::IsCoplanar const gp_Ax1 A1,
const Standard_Real  LinearTolerance,
const Standard_Real  AngularTolerance
const [inline]
 

Standard_Boolean gp_Ax3::IsCoplanar const gp_Ax3 Other,
const Standard_Real  LinearTolerance,
const Standard_Real  AngularTolerance
const [inline]
 

const gp_Pnt & gp_Ax3::Location  )  const [inline]
 

Standard_EXPORT void gp_Ax3::Mirror const gp_Ax2 A2  ) 
 

Standard_EXPORT void gp_Ax3::Mirror const gp_Ax1 A1  ) 
 

Standard_EXPORT void gp_Ax3::Mirror const gp_Pnt P  ) 
 

Standard_EXPORT gp_Ax3 gp_Ax3::Mirrored const gp_Ax2 A2  )  const
 

Standard_EXPORT gp_Ax3 gp_Ax3::Mirrored const gp_Ax1 A1  )  const
 

Standard_EXPORT gp_Ax3 gp_Ax3::Mirrored const gp_Pnt P  )  const
 

void gp_Ax3::operator delete void *  anAddress  )  [inline]
 

void* gp_Ax3::operator new size_t  size  )  [inline]
 

void* gp_Ax3::operator new size_t  ,
void *  anAddress
[inline]
 

void gp_Ax3::Rotate const gp_Ax1 A1,
const Standard_Real  Ang
[inline]
 

gp_Ax3 gp_Ax3::Rotated const gp_Ax1 A1,
const Standard_Real  Ang
const [inline]
 

void gp_Ax3::Scale const gp_Pnt P,
const Standard_Real  S
[inline]
 

gp_Ax3 gp_Ax3::Scaled const gp_Pnt P,
const Standard_Real  S
const [inline]
 

void gp_Ax3::SetAxis const gp_Ax1 A1  )  [inline]
 

void gp_Ax3::SetDirection const gp_Dir V  )  [inline]
 

void gp_Ax3::SetLocation const gp_Pnt P  )  [inline]
 

void gp_Ax3::SetXDirection const gp_Dir Vx  )  [inline]
 

void gp_Ax3::SetYDirection const gp_Dir Vy  )  [inline]
 

void gp_Ax3::Transform const gp_Trsf T  )  [inline]
 

gp_Ax3 gp_Ax3::Transformed const gp_Trsf T  )  const [inline]
 

void gp_Ax3::Translate const gp_Pnt P1,
const gp_Pnt P2
[inline]
 

void gp_Ax3::Translate const gp_Vec V  )  [inline]
 

gp_Ax3 gp_Ax3::Translated const gp_Pnt P1,
const gp_Pnt P2
const [inline]
 

gp_Ax3 gp_Ax3::Translated const gp_Vec V  )  const [inline]
 

const gp_Dir & gp_Ax3::XDirection  )  const [inline]
 

void gp_Ax3::XReverse  )  [inline]
 

const gp_Dir & gp_Ax3::YDirection  )  const [inline]
 

void gp_Ax3::YReverse  )  [inline]
 

void gp_Ax3::ZReverse  )  [inline]
 


Friends And Related Function Documentation

Standard_EXPORT friend Handle_Standard_Type& gp_Ax3_Type_  )  [friend]
 


Field Documentation

gp_Ax1 gp_Ax3::axis [private]
 

gp_Dir gp_Ax3::vxdir [private]
 

gp_Dir gp_Ax3::vydir [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:12:40 2008 for OpenCASCADE by  doxygen 1.4.1