AnyCAD Rapid SDK
2020
The Rapid CAD SDK

Public Member Functions  
synchronized void  delete () 
GDir2d ()  
GDir2d (GVec2d V)  
GDir2d (GXY Coord)  
GDir2d (double Xv, double Yv)  
void  SetCoord (int Index, double Xi) 
void  SetCoord (double Xv, double Yv) 
void  SetX (double X) 
void  SetY (double Y) 
void  SetXY (GXY Coord) 
double  Coord (int Index) 
void  Coord (double[] Xv, double[] Yv) 
double  X () 
double  Y () 
GXY  XY () 
boolean  IsEqual (GDir2d Other, double AngularTolerance) 
boolean  IsNormal (GDir2d Other, double AngularTolerance) 
boolean  IsOpposite (GDir2d Other, double AngularTolerance) 
boolean  IsParallel (GDir2d Other, double AngularTolerance) 
double  Angle (GDir2d Other) 
double  Crossed (GDir2d Right) 
double  Dot (GDir2d Other) 
void  Reverse () 
GDir2d  Reversed () 
void  Mirror (GDir2d V) 
GDir2d  Mirrored (GDir2d V) 
void  Mirror (GAx2d A) 
GDir2d  Mirrored (GAx2d A) 
void  Rotate (double Ang) 
GDir2d  Rotated (double Ang) 
void  Transform (GTrsf2d T) 
GDir2d  Transformed (GTrsf2d T) 
Protected Member Functions  
GDir2d (long cPtr, boolean cMemoryOwn)  
void  finalize () 
Static Protected Member Functions  
static long  getCPtr (GDir2d obj) 
Protected Attributes  
transient boolean  swigCMemOwn 
Describes a unit vector in the plane (2D space). This unit vector is also called "Direction". See Also gce_MakeDir2d which provides functions for more complex unit vector constructions Geom2d_Direction which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors
GDir2d.GDir2d  (  ) 
Creates a direction corresponding to X axis.
GDir2d.GDir2d  (  GVec2d  V  ) 
Normalizes the vector V and creates a Direction. Raises ConstructionError if V.Magnitude() <= Resolution from gp.
GDir2d.GDir2d  (  GXY  Coord  ) 
Creates a Direction from a doublet of coordinates. Raises ConstructionError if Coord.Modulus() <= Resolution from gp.
GDir2d.GDir2d  (  double  Xv, 
double  Yv  
) 
Creates a Direction with its 2 cartesian coordinates. Raises ConstructionError if Sqrt(Xv*Xv + Yv*Yv) <= Resolution from gp.
double GDir2d.Angle  (  GDir2d  Other  ) 
Computes the angular value in radians between <me> and <Other>. Returns the angle in the range [PI, PI].
double GDir2d.Coord  (  int  Index  ) 
For this unit vector returns the coordinate of range Index : Index = 1 => X is returned Index = 2 => Y is returned Raises OutOfRange if Index != {1, 2}.
void GDir2d.Coord  (  double[]  Xv, 
double[]  Yv  
) 
For this unit vector returns its two coordinates Xv and Yv. Raises OutOfRange if Index != {1, 2}.
double GDir2d.Crossed  (  GDir2d  Right  ) 
Computes the cross product between two directions.
double GDir2d.Dot  (  GDir2d  Other  ) 
Computes the scalar product
boolean GDir2d.IsEqual  (  GDir2d  Other, 
double  AngularTolerance  
) 
Returns True if the two vectors have the same direction i.e. the angle between this unit vector and the unit vector Other is less than or equal to AngularTolerance.
boolean GDir2d.IsNormal  (  GDir2d  Other, 
double  AngularTolerance  
) 
Returns True if the angle between this unit vector and the unit vector Other is equal to Pi/2 or Pi/2 (normal) i.e. Abs(Abs(<me>.Angle(Other))  PI/2.) <= AngularTolerance
boolean GDir2d.IsOpposite  (  GDir2d  Other, 
double  AngularTolerance  
) 
Returns True if the angle between this unit vector and the unit vector Other is equal to Pi or Pi (opposite). i.e. PI  Abs(<me>.Angle(Other)) <= AngularTolerance
boolean GDir2d.IsParallel  (  GDir2d  Other, 
double  AngularTolerance  
) 
returns true if if the angle between this unit vector and unit vector Other is equal to 0, Pi or Pi. i.e. Abs(Angle(<me>, Other)) <= AngularTolerance or PI  Abs(Angle(<me>, Other)) <= AngularTolerance
Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.
Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.
GDir2d GDir2d.Reversed  (  ) 
Reverses the orientation of a direction
GDir2d GDir2d.Rotated  (  double  Ang  ) 
Rotates a direction. Ang is the angular value of the rotation in radians.
void GDir2d.SetCoord  (  int  Index, 
double  Xi  
) 
For this unit vector, assigns: the value Xi to:  the X coordinate if Index is 1, or  the Y coordinate if Index is 2, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if Index is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  Sqrt(Xv*Xv + Yv*Yv), or  the modulus of the number pair formed by the new value Xi and the other coordinate of this vector that was not directly modified. Raises OutOfRange if Index != {1, 2}.
void GDir2d.SetCoord  (  double  Xv, 
double  Yv  
) 
For this unit vector, assigns:  the values Xv and Yv to its two coordinates, Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if Index is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  Sqrt(Xv*Xv + Yv*Yv), or  the modulus of the number pair formed by the new value Xi and the other coordinate of this vector that was not directly modified. Raises OutOfRange if Index != {1, 2}.
void GDir2d.SetX  (  double  X  ) 
Assigns the given value to the X coordinate of this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  the modulus of Coord, or  the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified.
void GDir2d.SetXY  (  GXY  Coord  ) 
Assigns:  the two coordinates of Coord to this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  the modulus of Coord, or  the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified.
void GDir2d.SetY  (  double  Y  ) 
Assigns the given value to the Y coordinate of this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  the modulus of Coord, or  the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified.
Transforms a direction with the "Trsf" T. Warnings : If the scale factor of the "Trsf" T is negative then the direction <me> is reversed.
double GDir2d.X  (  ) 
For this unit vector, returns its X coordinate.
GXY GDir2d.XY  (  ) 
For this unit vector, returns its two coordinates as a number pair. Comparison between Directions The precision value is an input data.
double GDir2d.Y  (  ) 
For this unit vector, returns its Y coordinate.