0023024: Update headers of OCCT files
[occt.git] / src / gce / gce_MakeDir.cdl
1 -- Created on: 1992-08-26
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class MakeDir from gce inherits Root from gce
23
24     ---Purpose : This class implements the following algorithms used 
25     --           to create a Dir from gp.
26     --           * Create a Dir parallel to another and passing 
27     --             through a point.
28     --           * Create a Dir passing through 2 points.
29     --           * Create a Dir from its axis (Ax1 from gp).
30     --           * Create a Dir from a point and a direction.
31
32 uses Pnt  from gp,
33      Dir  from gp,
34      Vec  from gp,
35      XYZ  from gp,
36      Real from Standard
37
38 raises NotDone from StdFail
39
40 is
41
42 Create (V : Vec)  returns MakeDir;
43     --- Purpose : Normalizes the vector V and creates a direction.
44     --            Status is "NullVector" if V.Magnitude() <= Resolution.
45
46 Create (Coord : XYZ)   returns MakeDir;
47     --- Purpose : Creates a direction from a triplet of coordinates.
48     --            Status is "NullVector" if Coord.Modulus() <= 
49     --            Resolution from gp.
50
51 Create ( Xv, Yv, Zv : Real)  returns MakeDir;
52     --- Purpose : Creates a direction with its 3 cartesian coordinates.
53     --            Status is "NullVector" if Sqrt(Xv*Xv + Yv*Yv + Zv*Zv) 
54     --            <= Resolution
55
56 Create(P1     :     Pnt from gp;
57        P2     :     Pnt from gp) returns MakeDir;
58     ---Purpose : Make a Dir from gp <TheDir> passing through 2 
59     --           Pnt <P1>,<P2>.
60     --           Status is "ConfusedPoints" if <p1> and <P2> are confused.
61     -- Warning
62     -- If an error occurs (that is, when IsDone returns
63     -- false), the Status function returns:
64     -- -   gce_ConfusedPoints if points P1 and P2 are coincident, or
65     -- -   gce_NullVector if one of the following is less
66     --   than or equal to gp::Resolution():
67     --   -   the magnitude of vector V,
68     --   -   the modulus of Coord,
69     --   -   Sqrt(Xv*Xv + Yv*Yv + Zv*Zv).
70     
71 Value(me) returns Dir from gp
72     raises NotDone
73     is static;
74     ---C++: return const&
75     ---Purpose: Returns the constructed unit vector.
76     -- Exceptions StdFail_NotDone if no unit vector is constructed.
77
78 Operator(me) returns Dir from gp
79     is static;
80     ---C++: return const&
81     ---C++: alias "Standard_EXPORT operator gp_Dir() const;"
82
83 fields
84
85     TheDir : Dir from gp;
86     --The solution from gp.
87     
88 end MakeDir;