2 -- Created: Wed Aug 26 14:30:57 1992
5 ---Copyright: Matra Datavision 1992
7 class MakeDir2d from gce inherits Root from gce
9 ---Purpose : This class implements the following algorithms used
10 -- to create a Dir2d from gp.
11 -- * Create a Dir2d with 2 points.
12 -- * Create a Dir2d with a Vec2d.
13 -- * Create a Dir2d with a XY from gp.
14 -- * Create a Dir2d with a 2 Reals (Coordinates).
22 raises NotDone from StdFail
26 Create (V : Vec2d from gp) returns MakeDir2d;
27 --- Purpose : Normalizes the vector V and creates a direction.
28 -- Status is "NullVector" if V.Magnitude() <= Resolution.
30 Create (Coord : XY from gp) returns MakeDir2d;
31 --- Purpose : Creates a direction from a triplet of coordinates.
32 -- Status is "NullVector" if Coord.Modulus() <=
33 -- Resolution from gp.
35 Create ( Xv, Yv : Real from Standard) returns MakeDir2d;
36 --- Purpose : Creates a direction with its 3 cartesian coordinates.
37 -- Status is "NullVector" if Sqrt(Xv*Xv + Yv*Yv )
40 Create(P1 : Pnt2d from gp;
41 P2 : Pnt2d from gp) returns MakeDir2d;
42 ---Purpose : Make a Dir2d from gp <TheDir> passing through 2
44 -- Status is "ConfusedPoints" if <P1> and <P2> are confused.
46 -- If an error occurs (that is, when IsDone returns
47 -- false), the Status function returns:
48 -- - gce_ConfusedPoints if points P1 and P2 are coincident, or
49 -- - gce_NullVector if one of the following is less
50 -- than or equal to gp::Resolution():
51 -- - the magnitude of vector V,
52 -- - the modulus of Coord,
53 -- - Sqrt(Xv*Xv + Yv*Yv).
55 Value(me) returns Dir2d from gp
59 ---Purpose: Returns the constructed unit vector.
60 -- Exceptions StdFail_NotDone if no unit vector is constructed.
62 Operator(me) returns Dir2d from gp
65 ---C++: alias "Standard_EXPORT operator gp_Dir2d() const;"
69 TheDir2d : Dir2d from gp;
70 --The solution from gp.