0024428: Implementation of LGPL license
[occt.git] / src / Contap / Contap_SurfFunction.cdl
1 -- Created on: 1993-06-03
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 generic class SurfFunction from Contap 
18     (TheSurface as any;
19      TheSurfaceTool as any;
20      TheSurfProps   as any; -- as SurfProps from Contap(TheSurface,
21                             --                          TheSurfaceTool)
22      TheContTool    as any)
23
24 inherits FunctionSetWithDerivatives from math                          
25     
26         ---Purpose: This class describes the function on a parametric surface.
27         --          the form of the function is F(u,v) = 0 where u and v are
28         --          the parameteric coordinates of a point on the surface,
29         --          to compute the contours of the surface.
30
31 uses Vector    from math,
32      Matrix    from math,
33      Pnt       from gp,
34      Vec       from gp,
35      Dir       from gp,
36      Dir2d     from gp,
37      TFunction from Contap
38
39
40 raises UndefinedDerivative from StdFail
41
42 is
43
44     Create
45     
46         returns SurfFunction from Contap;
47
48
49     Set(me: in out; S: TheSurface)
50
51         is static;
52
53
54     Set(me: in out; Eye: Pnt from gp)
55     
56         ---C++: inline
57         is static;
58
59
60     Set(me: in out; Dir: Dir from gp)
61     
62         ---C++: inline
63         is static;
64
65
66     Set(me: in out; Dir: Dir from gp; Angle: Real from Standard)
67     
68         ---C++: inline
69         is static;
70
71
72     Set(me: in out; Eye: Pnt from gp; Angle: Real from Standard)
73     
74         ---C++: inline
75         is static;
76
77
78     Set(me: in out; Tolerance: Real from Standard)
79     
80         ---C++: inline
81         is static;
82
83
84     NbVariables(me)
85
86         ---Purpose: This method has to return 2.
87         returns Integer from Standard;
88
89
90     NbEquations(me)
91
92         ---Purpose: This method has to return 1.
93         returns Integer from Standard;
94
95
96     Value(me : in out; X : Vector from math;
97                        F : out Vector from math)
98
99         ---Purpose: The dimension of F is 1.
100
101         returns Boolean from Standard;
102
103
104     Derivatives(me : in out; X : Vector from math;
105                              D : out Matrix from math)
106
107         ---Purpose: The dimension of D is (1,2).
108
109         returns Boolean from Standard;
110
111
112     Values(me : in out; X : Vector from math;
113                         F : out Vector from math;
114                         D : out Matrix from math)
115
116         returns Boolean from Standard;
117
118
119     Root(me)
120
121         ---Purpose: Root is the value of the function at the solution.
122         --          It is a vector of dimension 1, i-e a real.
123
124         returns Real from Standard
125         ---C++: inline
126         is static;
127
128
129     Tolerance(me)
130     
131         ---Purpose: Returns the value Tol so that if Abs(Func.Root())<Tol
132         --          the function is considered null.
133         --          
134         ---C++: inline
135     
136         returns Real from Standard
137         is static;
138
139
140     Point(me)
141
142         ---Purpose: Returns the value of the solution point on the surface.
143
144         returns Pnt from gp
145         ---C++: return const&
146         ---C++: inline
147         is static;
148     
149
150     IsTangent(me : in out)
151
152         returns Boolean from Standard 
153         is static;
154     
155
156     Direction3d(me: in out)
157
158         returns Vec from gp
159         ---C++: return const&
160         ---C++: inline
161         raises UndefinedDerivative from StdFail
162         is static;
163     
164
165     Direction2d(me: in out)
166
167         returns Dir2d from gp
168         ---C++: return const&
169         ---C++: inline
170         raises UndefinedDerivative from StdFail
171         is static;
172
173
174     FunctionType(me)
175     
176         returns TFunction from Contap
177         ---C++: inline
178         is static;
179
180
181     Eye(me)
182     
183         returns Pnt from gp
184         ---C++: return const&
185         ---C++: inline
186         is static;
187
188
189     Direction(me)
190     
191         returns Dir from gp
192         ---C++: return const&
193         ---C++: inline
194         is static;
195
196
197     Angle(me)
198     
199         returns Real from Standard
200         ---C++: inline
201         is static;
202
203
204     Surface(me)
205     
206         returns any TheSurface
207         ---C++: return const&
208         ---C++: inline
209         is static;
210         
211
212
213 fields
214
215     mySurf   : TheSurface;
216     myMean   : Real      from Standard;
217     myType   : TFunction from Contap;
218     myDir    : Dir       from gp;
219     myEye    : Pnt       from gp;
220     myAng    : Real      from Standard;
221     myCosAng : Real      from Standard;
222     tol      : Real      from Standard;
223
224     solpt  : Pnt   from gp;
225     valf   : Real  from Standard;
226     Usol   : Real  from Standard;
227     Vsol   : Real  from Standard;
228     Fpu    : Real  from Standard;
229     Fpv    : Real  from Standard;
230     d2d    : Dir2d from gp;
231     d3d    : Vec   from gp;
232     
233     tangent   : Boolean from Standard;
234     computed  : Boolean from Standard;
235     derived   : Boolean from Standard;
236
237 end SurfFunction;