AnyCAD Rapid SDK  2020
The Rapid CAD SDK
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GAx2 Class Reference

Public Member Functions

synchronized void delete ()
 
 GAx2 ()
 
 GAx2 (GPnt P, GDir N, GDir Vx)
 
 GAx2 (GPnt P, GDir V)
 
void SetAxis (GAx1 A1)
 
void SetDirection (GDir V)
 
void SetLocation (GPnt P)
 
void SetXDirection (GDir Vx)
 
void SetYDirection (GDir Vy)
 
double Angle (GAx2 Other)
 
GAx1 Axis ()
 
GDir Direction ()
 
GPnt Location ()
 
GDir XDirection ()
 
GDir YDirection ()
 
boolean IsCoplanar (GAx2 Other, double LinearTolerance, double AngularTolerance)
 
boolean IsCoplanar (GAx1 A1, double LinearTolerance, double AngularTolerance)
 
void Mirror (GPnt P)
 
GAx2 Mirrored (GPnt P)
 
void Mirror (GAx1 A1)
 
GAx2 Mirrored (GAx1 A1)
 
void Mirror (GAx2 A2)
 
GAx2 Mirrored (GAx2 A2)
 
void Rotate (GAx1 A1, double Ang)
 
GAx2 Rotated (GAx1 A1, double Ang)
 
void Scale (GPnt P, double S)
 
GAx2 Scaled (GPnt P, double S)
 
void Transform (GTrsf T)
 
GAx2 Transformed (GTrsf T)
 
void Translate (GVec V)
 
GAx2 Translated (GVec V)
 
void Translate (GPnt P1, GPnt P2)
 
GAx2 Translated (GPnt P1, GPnt P2)
 

Protected Member Functions

 GAx2 (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 

Static Protected Member Functions

static long getCPtr (GAx2 obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

Describes a right-handed coordinate system in 3D space. A coordinate system is defined by: - its origin (also referred to as its "Location point"), and - three orthogonal unit vectors, termed respectively the "X 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 Direction" or the "Y Direction", "Direction" is not modified. The "main Direction" is also the "Z Direction". Since an Ax2 coordinate system is right-handed, its "main Direction" is always equal to the cross product of its "X Direction" and "Y Direction". (To define a left-handed coordinate system, use gp_Ax3.) 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 two axes", or - to define geometric transformations. Note: we refer to the "X Axis", "Y Axis" and "Z Axis", respectively, as to 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".

Constructor & Destructor Documentation

GAx2.GAx2 ( )

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

GAx2.GAx2 ( GPnt  P,
GDir  N,
GDir  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).

GAx2.GAx2 ( GPnt  P,
GDir  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

double GAx2.Angle ( GAx2  Other)

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.

GAx1 GAx2.Axis ( )

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

GDir GAx2.Direction ( )

Returns the main direction of <me>.

boolean GAx2.IsCoplanar ( GAx1  A1,
double  LinearTolerance,
double  AngularTolerance 
)

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.

GPnt GAx2.Location ( )

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

void GAx2.Mirror ( GPnt  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 GAx2.Mirror ( GAx1  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 GAx2.Mirror ( GAx2  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.

GAx2 GAx2.Mirrored ( GPnt  P)

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.

GAx2 GAx2.Mirrored ( GAx1  A1)

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.

GAx2 GAx2.Mirrored ( GAx2  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 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.

GAx2 GAx2.Rotated ( GAx1  A1,
double  Ang 
)

Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.

GAx2 GAx2.Scaled ( GPnt  P,
double  S 
)

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 GAx2.SetAxis ( GAx1  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 GAx2.SetDirection ( GDir  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 GAx2.SetLocation ( GPnt  P)

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

void GAx2.SetXDirection ( GDir  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 GAx2.SetYDirection ( GDir  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.

GAx2 GAx2.Transformed ( GTrsf  T)

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.

GAx2 GAx2.Translated ( GVec  V)

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

GAx2 GAx2.Translated ( GPnt  P1,
GPnt  P2 
)

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

GDir GAx2.XDirection ( )

Returns the "XDirection" of <me>.

GDir GAx2.YDirection ( )

Returns the "YDirection" of <me>.