Integration of OCCT 6.5.0 from SVN
[occt.git] / src / gce / gce_MakeDir2d.cdl
1 -- File:        MakeDir2d.cdl
2 -- Created:     Wed Aug 26 14:30:57 1992
3 -- Author:      Remi GILET
4 --              <reg@topsn3>
5 ---Copyright:    Matra Datavision 1992
6
7 class MakeDir2d from gce inherits Root from gce
8
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).
15
16 uses Pnt2d from gp,
17      Vec2d from gp,
18      Dir2d from gp,
19      XY    from gp,
20      Real  from Standard
21
22 raises NotDone from StdFail
23
24 is
25
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.
29
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.
34
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 ) 
38     --            <= Resolution
39
40 Create(P1     :     Pnt2d from gp;
41        P2     :     Pnt2d from gp) returns MakeDir2d;
42     ---Purpose : Make a Dir2d from gp <TheDir> passing through 2 
43     --           Pnt <P1>,<P2>.
44     --           Status is "ConfusedPoints" if <P1> and <P2> are confused.
45     -- Warning
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).
54         
55 Value(me) returns Dir2d from gp
56     raises NotDone
57     is static;
58      ---C++: return const&
59      ---Purpose: Returns the constructed unit vector.
60      -- Exceptions StdFail_NotDone if no unit vector is constructed.
61
62 Operator(me) returns Dir2d from gp
63     is static;
64     ---C++: return const&
65     ---C++: alias "Standard_EXPORT operator gp_Dir2d() const;"
66
67 fields
68
69     TheDir2d : Dir2d from gp;
70     --The solution from gp.
71     
72 end MakeDir2d;