0023024: Update headers of OCCT files
[occt.git] / src / IntImp / IntImp_Int2S.cdl
1 -- Created on: 1991-04-30
2 -- Created by: Isabelle GRIGNON
3 -- Copyright (c) 1991-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
23 generic class Int2S from IntImp
24     (ThePSurface     as any;
25      ThePSurfaceTool as any)  -- as PSurfaceTool from IntImp (ThePSurface)
26
27         
28         ---Purpose: Determination of the intersection between 2 surfaces
29         --          from an point close to the solution.
30
31
32 uses Array1OfReal       from TColStd,
33      ConstIsoparametric from IntImp,
34      PntOn2S            from IntSurf,
35      Dir                from gp,
36      Dir2d              from gp,
37      FunctionSetRoot    from math
38
39 raises NotDone             from StdFail,
40        DomainError         from Standard,
41        ConstructionError   from Standard,
42        UndefinedDerivative from StdFail
43
44              
45     class TheFunction instantiates ZerParFunc from IntImp
46          (ThePSurface, ThePSurfaceTool);
47
48
49 is
50
51     Create 
52         ---Purpose: Raises Construction Error
53     
54         returns Int2S from IntImp;
55
56     Create( Param: Array1OfReal from TColStd;
57             S1,S2: ThePSurface;
58             TolTangency: Real)
59             
60         ---Purpose: compute the solution point with the close point
61
62         returns Int2S from IntImp;
63
64
65     Create( S1,S2: ThePSurface;
66             TolTangency: Real from Standard)
67             
68         ---Purpose: initialize the parameters to compute the solution point
69         --          it 's possible to write to optimize:
70         --            IntImp_Int2S inter(S1,S2,Func,TolTangency);
71         --            math_FunctionSetRoot rsnld(inter.Function());
72         --            while ...{
73         --               Param(1)=...
74         --               Param(2)=...
75         --               param(3)=...
76         --               inter.Perform(Param,rsnld);
77         --            }   
78
79         returns Int2S from IntImp;
80
81
82     Perform(me : in out; Param : Array1OfReal from TColStd;
83                          Rsnld : in out FunctionSetRoot from math)
84     
85      ---Purpose: returns the best constant isoparametric to find
86      --          the next intersection's point +stores the solution
87      --          point (the solution point is found with the close point
88      --          to intersect the isoparametric with the other patch;
89      --          the choice of the isoparametic is calculated)
90
91         returns ConstIsoparametric from IntImp
92         
93         is static;
94
95
96     Perform(me : in out;
97             Param : Array1OfReal from TColStd;
98             Rsnld : in out FunctionSetRoot from math;
99             ChoixIso :  ConstIsoparametric from IntImp)
100             
101      ---Purpose: returns the best constant isoparametric to find
102      --          the next intersection's point +stores the solution
103      --          point (the solution point is found with the close point
104      --          to intersect the isoparametric with the other patch;
105      --          the choice of the isoparametic is given by ChoixIso) 
106
107         returns ConstIsoparametric from IntImp
108         
109         is static;
110
111
112     IsDone(me)
113     
114         ---Purpose: Returns TRUE if the creation completed without failure.
115
116         returns Boolean from Standard
117         ---C++: inline
118
119         is static;
120
121
122     IsEmpty(me)
123     
124         ---Purpose: Returns TRUE when there is no solution to the problem.
125
126         returns Boolean from Standard
127         ---C++: inline
128
129         raises NotDone from StdFail
130         is static;
131
132     
133     Point(me)
134     
135         ---Purpose: Returns the intersection point.
136
137         returns PntOn2S from IntSurf
138         ---C++: return const&
139         ---C++: inline
140
141         raises NotDone     from StdFail,
142                DomainError from Standard
143         --          The exception NotDone is raised if IsDone is false.
144         --          The exception DomainError is raised if IsEmpty is true.
145         
146         is static;
147
148
149     IsTangent(me)
150     
151         ---Purpose: Returns True if the surfaces are tangent at the
152         --          intersection point.
153     
154         returns Boolean from Standard
155         ---C++: inline
156
157         raises NotDone     from StdFail,
158                DomainError from Standard
159         --          The exception NotDone is raised if IsDone is false.
160         --          The exception DomainError is raised if IsEmpty is true.
161         
162         is static;
163
164
165     Direction(me)
166
167         ---Purpose: Returns the tangent at the intersection line.
168
169         returns Dir from gp
170         ---C++: return const&
171         ---C++: inline
172
173         raises NotDone             from StdFail,
174                DomainError         from Standard,
175                UndefinedDerivative from StdFail
176         --          The exception NotDone is raised if IsDone is false.
177         --          The exception DomainError is raised if IsEmpty is true.
178         --          The exception UndefinedDerivative is raised if IsTangent
179         --          returns True.
180
181         is static;
182
183
184     DirectionOnS1(me)
185
186         ---Purpose: Returns the tangent at the intersection line in the
187         --          parametric space of the first surface.
188
189         returns Dir2d from gp
190         ---C++: return const&
191         ---C++: inline
192
193         raises NotDone             from StdFail,
194                DomainError         from Standard,
195                UndefinedDerivative from StdFail
196         --          The exception NotDone is raised if IsDone is false.
197         --          The exception DomainError is raised if IsEmpty is true.
198         --          The exception UndefinedDerivative is raised if IsTangent
199         --          returns True.
200
201         is static;
202
203
204     DirectionOnS2(me)
205
206         ---Purpose: Returns the tangent at the intersection line in the
207         --          parametric space of the second surface.
208
209         returns Dir2d from gp
210         ---C++: return const&
211         ---C++: inline
212
213         raises NotDone             from StdFail,
214                DomainError         from Standard,
215                UndefinedDerivative from StdFail
216         --          The exception NotDone is raised if IsDone is false.
217         --          The exception DomainError is raised if IsEmpty is true.
218         --          The exception UndefinedDerivative is raised if IsTangent
219         --          returns True.
220
221         is static;
222
223
224     Function(me: in out)
225         ---Purpose: return the math function which 
226         --          is used to compute the intersection
227
228         returns TheFunction
229         ---C++: return &
230         ---C++: inline
231
232         is static;
233     
234
235 fields
236
237     done         : Boolean from Standard;
238     empty        : Boolean from Standard;
239     pint         : PntOn2S from IntSurf;
240     tangent      : Boolean from Standard;
241     d3d          : Dir     from gp;
242     d2d1         : Dir2d   from gp;
243     d2d2         : Dir2d   from gp;
244     myZerParFunc : TheFunction;
245     tol          : Real    from Standard;
246     
247     ua0,va0,ua1,va1 : Real from Standard; -- surf1 
248     ub0,vb0,ub1,vb1 : Real from Standard; -- surf2  
249     ures1,ures2,vres1,vres2 : Real from Standard; -- U et V Resolution
250
251 end Int2S;