AnyCAD Rapid SDK
2020
The Rapid CAD SDK
|
Public Member Functions | |
synchronized void | delete () |
GDir () | |
GDir (GVec V) | |
GDir (GXYZ Coord) | |
GDir (double Xv, double Yv, double Zv) | |
void | SetCoord (int Index, double Xi) |
void | SetCoord (double Xv, double Yv, double Zv) |
void | SetX (double X) |
void | SetY (double Y) |
void | SetZ (double Z) |
void | SetXYZ (GXYZ Coord) |
double | Coord (int Index) |
void | Coord (double[] Xv, double[] Yv, double[] Zv) |
double | X () |
double | Y () |
double | Z () |
GXYZ | XYZ () |
boolean | IsEqual (GDir Other, double AngularTolerance) |
boolean | IsNormal (GDir Other, double AngularTolerance) |
boolean | IsOpposite (GDir Other, double AngularTolerance) |
boolean | IsParallel (GDir Other, double AngularTolerance) |
double | Angle (GDir Other) |
double | AngleWithRef (GDir Other, GDir VRef) |
void | Cross (GDir Right) |
GDir | Crossed (GDir Right) |
void | CrossCross (GDir V1, GDir V2) |
GDir | CrossCrossed (GDir V1, GDir V2) |
double | Dot (GDir Other) |
double | DotCross (GDir V1, GDir V2) |
void | Reverse () |
GDir | Reversed () |
void | Mirror (GDir V) |
GDir | Mirrored (GDir V) |
void | Mirror (GAx1 A1) |
GDir | Mirrored (GAx1 A1) |
void | Mirror (GAx2 A2) |
GDir | Mirrored (GAx2 A2) |
void | Rotate (GAx1 A1, double Ang) |
GDir | Rotated (GAx1 A1, double Ang) |
void | Transform (GTrsf T) |
GDir | Transformed (GTrsf T) |
Protected Member Functions | |
GDir (long cPtr, boolean cMemoryOwn) | |
void | finalize () |
Static Protected Member Functions | |
static long | getCPtr (GDir obj) |
Protected Attributes | |
transient boolean | swigCMemOwn |
Describes a unit vector in 3D space. This unit vector is also called "Direction". See Also gce_MakeDir which provides functions for more complex unit vector constructions Geom_Direction which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors.
GDir.GDir | ( | ) |
Creates a direction corresponding to X axis.
GDir.GDir | ( | GVec | V | ) |
Normalizes the vector V and creates a direction. Raises ConstructionError if V.Magnitude() <= Resolution.
GDir.GDir | ( | GXYZ | Coord | ) |
Creates a direction from a triplet of coordinates. Raises ConstructionError if Coord.Modulus() <= Resolution from gp.
GDir.GDir | ( | double | Xv, |
double | Yv, | ||
double | Zv | ||
) |
Creates a direction with its 3 cartesian coordinates. Raises ConstructionError if Sqrt(Xv*Xv + Yv*Yv + Zv*Zv) <= Resolution Modification of the direction's coordinates If Sqrt (X*X + Y*Y + Z*Z) <= Resolution from gp where X, Y ,Z are the new coordinates it is not possible to construct the direction and the method raises the exception ConstructionError.
double GDir.Angle | ( | GDir | Other | ) |
Computes the angular value in radians between <me> and <Other>. This value is always positive in 3D space. Returns the angle in the range [0, PI]
Computes the angular value between <me> and <Other>. <VRef> is the direction of reference normal to <me> and <Other> and its orientation gives the positive sense of rotation. If the cross product <me> ^ <Other> has the same orientation as <VRef> the angular value is positive else negative. Returns the angular value in the range -PI and PI (in radians). Raises DomainError if <me> and <Other> are not parallel this exception is raised when <VRef> is in the same plane as <me> and <Other> The tolerance criterion is Resolution from package gp.
double GDir.Coord | ( | int | Index | ) |
Returns the coordinate of range Index : Index = 1 => X is returned Index = 2 => Y is returned Index = 3 => Z is returned Exceptions Standard_OutOfRange if Index is not 1, 2, or 3.
void GDir.Coord | ( | double[] | Xv, |
double[] | Yv, | ||
double[] | Zv | ||
) |
Returns for the unit vector its three coordinates Xv, Yv, and Zv.
void GDir.Cross | ( | GDir | Right | ) |
Computes the cross product between two directions Raises the exception ConstructionError if the two directions are parallel because the computed vector cannot be normalized to create a direction.
Computes the double vector product this ^ (V1 ^ V2). - CrossCrossed creates a new unit vector. Exceptions Standard_ConstructionError if: - V1 and V2 are parallel, or - this unit vector and (V1 ^ V2) are parallel. This is because, in these conditions, the computed vector is null and cannot be normalized.
Computes the triple vector product. <me> ^ (V1 ^ V2) Raises the exception ConstructionError if V1 and V2 are parallel or <me> and (V1^V2) are parallel because the computed vector can't be normalized to create a direction.
double GDir.Dot | ( | GDir | Other | ) |
Computes the scalar product
Computes the triple scalar product <me> * (V1 ^ V2). Warnings : The computed vector V1' = V1 ^ V2 is not normalized to create a unitary vector. So this method never raises an exception even if V1 and V2 are parallel.
boolean GDir.IsEqual | ( | GDir | Other, |
double | AngularTolerance | ||
) |
Returns True if the angle between the two directions is lower or equal to AngularTolerance.
boolean GDir.IsNormal | ( | GDir | Other, |
double | AngularTolerance | ||
) |
Returns True if the angle between this unit vector and the unit vector Other is equal to Pi/2 (normal).
boolean GDir.IsOpposite | ( | GDir | Other, |
double | AngularTolerance | ||
) |
Returns True if the angle between this unit vector and the unit vector Other is equal to Pi (opposite).
boolean GDir.IsParallel | ( | GDir | Other, |
double | AngularTolerance | ||
) |
Returns true if the angle between this unit vector and the unit vector Other is equal to 0 or to Pi. Note: the tolerance criterion is given by 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.
Performs the symmetrical transformation of a direction with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).
GDir GDir.Reversed | ( | ) |
Reverses the orientation of a direction geometric transformations Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.]
Rotates a direction. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
void GDir.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, or - the Z coordinate if Index is 3, 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, 2, or 3. Standard_ConstructionError if either of the following is less than or equal to gp::Resolution(): - Sqrt(Xv*Xv + Yv*Yv + Zv*Zv), or - the modulus of the number triple formed by the new value Xi and the two other coordinates of this vector that were not directly modified.
void GDir.SetCoord | ( | double | Xv, |
double | Yv, | ||
double | Zv | ||
) |
For this unit vector, assigns the values Xv, Yv and Zv to its three coordinates. Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly.
void GDir.SetX | ( | double | X | ) |
Assigns the given value to the X coordinate of this unit vector.
void GDir.SetXYZ | ( | GXYZ | Coord | ) |
Assigns the three coordinates of Coord to this unit vector.
void GDir.SetY | ( | double | Y | ) |
Assigns the given value to the Y coordinate of this unit vector.
void GDir.SetZ | ( | double | Z | ) |
Assigns the given value to the Z coordinate of this unit vector.
Transforms a direction with a "Trsf" from gp. Warnings : If the scale factor of the "Trsf" T is negative then the direction <me> is reversed.
double GDir.X | ( | ) |
Returns the X coordinate for a unit vector.
GXYZ GDir.XYZ | ( | ) |
for this unit vector, returns its three coordinates as a number triplea.
double GDir.Y | ( | ) |
Returns the Y coordinate for a unit vector.
double GDir.Z | ( | ) |
Returns the Z coordinate for a unit vector.