Open CASCADE Technology 7.8.0
|
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). | |
gp_Ax2 (const gp_Pnt &P, const gp_Dir &N, const gp_Dir &Vx) | |
Creates an axis placement with an origin P such that: | |
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). | |
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. | |
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. | |
void | SetLocation (const gp_Pnt &theP) |
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 <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 | SetYDirection (const gp_Dir &theVy) |
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. | |
Standard_Real | Angle (const gp_Ax2 &theOther) const |
Computes the angular value, in radians, between the main direction of <me> and the main direction of <theOther>. Returns the angle between 0 and PI in radians. | |
const gp_Ax1 & | Axis () const |
Returns the main axis of <me>. It is the "Location" point and the main "Direction". | |
const gp_Dir & | Direction () const |
Returns the main direction of <me>. | |
const gp_Pnt & | Location () const |
Returns the "Location" point (origin) of <me>. | |
const gp_Dir & | XDirection () const |
Returns the "XDirection" of <me>. | |
const gp_Dir & | YDirection () const |
Returns the "YDirection" of <me>. | |
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. | |
void | Mirror (const gp_Pnt &P) |
Performs a symmetrical transformation of this coordinate system with respect to: | |
gp_Ax2 | Mirrored (const gp_Pnt &P) const |
Performs a symmetrical transformation of this coordinate system with respect to: | |
void | Mirror (const gp_Ax1 &A1) |
Performs a symmetrical transformation of this coordinate system with respect to: | |
gp_Ax2 | Mirrored (const gp_Ax1 &A1) const |
Performs a symmetrical transformation of this coordinate system with respect to: | |
void | Mirror (const gp_Ax2 &A2) |
Performs a symmetrical transformation of this coordinate system with respect to: | |
gp_Ax2 | Mirrored (const gp_Ax2 &A2) const |
Performs a symmetrical transformation of this coordinate system with respect to: | |
void | Rotate (const gp_Ax1 &theA1, const Standard_Real theAng) |
gp_Ax2 | Rotated (const gp_Ax1 &theA1, const Standard_Real 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 Standard_Real theS) |
gp_Ax2 | Scaled (const gp_Pnt &theP, const Standard_Real theS) const |
Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings : If the scale | |
void | Transform (const gp_Trsf &theT) |
gp_Ax2 | 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. | |
void | Translate (const gp_Vec &theV) |
gp_Ax2 | Translated (const gp_Vec &theV) const |
Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude. | |
void | Translate (const gp_Pnt &theP1, const gp_Pnt &theP2) |
gp_Ax2 | Translated (const gp_Pnt &theP1, const gp_Pnt &theP2) const |
Translates an axis placement from the point <theP1> to the point <theP2>. | |
void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
Dumps the content of me into the stream. | |
Standard_Boolean | InitFromJson (const Standard_SStream &theSStream, Standard_Integer &theStreamPos) |
Inits the content of me from the stream. | |
Describes a right-handed coordinate system in 3D space. A coordinate system is defined by:
|
inline |
Creates an object corresponding to the reference coordinate system (OXYZ).
Creates an axis placement with an origin P such that:
Creates - a coordinate system with an origin P, where V gives the "main Direction" (here, "X Direction" and "Y Direction" are defined automatically).
|
inline |
Computes the angular value, in radians, between the main direction of <me> and the main direction of <theOther>. Returns the angle between 0 and PI in radians.
Returns the main axis of <me>. It is the "Location" point and the main "Direction".
void gp_Ax2::DumpJson | ( | Standard_OStream & | theOStream, |
Standard_Integer | theDepth = -1 |
||
) | const |
Dumps the content of me into the stream.
Standard_Boolean gp_Ax2::InitFromJson | ( | const Standard_SStream & | theSStream, |
Standard_Integer & | theStreamPos | ||
) |
Inits the content of me from the stream.
|
inline |
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.
|
inline |
Performs a symmetrical transformation of this coordinate system with respect to:
Performs a symmetrical transformation of this coordinate system with respect to:
Performs a symmetrical transformation of this coordinate system with respect to:
Performs a symmetrical transformation of this coordinate system with respect to:
Performs a symmetrical transformation of this coordinate system with respect to:
Performs a symmetrical transformation of this coordinate system with respect to:
|
inline |
|
inline |
Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.
|
inline |
|
inline |
Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings : If the scale 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.
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.
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.
Changes the "Location" point (origin) of <me>.
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.
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.
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.
Translates an axis placement from the point <theP1> to the point <theP2>.
Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.