e29a61c303f48615d4e75cb82f0c1902fbeba13f
[occt.git] / src / IntPatch / IntPatch_Intersection.cdl
1 -- Created on: 1993-01-21
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 under
9 -- the terms of the GNU Lesser General Public License 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 class Intersection from IntPatch
18
19   ---Purpose: This class provides a generic algorithm to intersect
20         --          2 surfaces.
21
22 uses
23      HVertex         from Adaptor3d,
24      HCurve2d        from Adaptor2d,
25      HSurface        from Adaptor3d,
26      Point           from IntPatch,
27      SequenceOfPoint from IntPatch,
28      TopolTool       from Adaptor3d,
29      SequenceOfLine  from IntPatch,
30      Line            from IntPatch,
31      SurfaceType     from GeomAbs,
32      ListOfPntOn2S   from IntSurf
33  
34 raises NotDone           from StdFail,
35        OutOfRange        from Standard,
36        DomainError       from Standard,
37        ConstructionError from Standard
38
39 is
40     Create
41     
42         returns Intersection from IntPatch;
43
44
45     Create (S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
46             S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
47             TolArc,TolTang: Real from Standard)
48             
49       returns Intersection from IntPatch
50             raises ConstructionError from Standard;
51
52     Create (S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
53             TolArc,TolTang: Real from Standard)
54             
55       returns Intersection from IntPatch
56       raises ConstructionError from Standard;
57
58
59     SetTolerances(me       : in out;
60                   TolArc   : Real from Standard;
61                   TolTang  : Real from Standard;
62                   UVMaxStep: Real from Standard;
63                   Fleche   : Real from Standard)
64                   
65       ---Purpose: Set the tolerances used by the algorithms:
66       --          --- Implicit   - Parametric  
67       --          --- Parametric - Parametric 
68       --          --- Implicit   - Implicit 
69       --         
70       --          TolArc   is  used  to   compute  the intersections
71       --          between the restrictions   of  a  surface   and  a
72       --          walking line.
73       --          
74       --          TolTang is used to compute the points on a walking
75       --          line, and in geometric algorithms.
76       --          
77       --          Fleche  is  a  parameter   used in    the  walking
78       --          algorithms to provide small curvatures on a line.
79       --          
80       --          UVMaxStep is  a  parameter   used in  the  walking
81       --          algorithms  to    compute the  distance between to
82       --          points in their respective parametrtic spaces.
83       --
84       
85       is static;
86
87     Perform (me: in out;
88              S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
89              S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
90              TolArc,TolTang: Real from Standard;
91              isGeomInt : Boolean from Standard = Standard_True)              
92
93       raises ConstructionError from Standard    
94       is static;
95     
96       --amv
97     Perform ( me: in out;
98               S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
99               S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
100               TolArc,TolTang: Real from Standard;
101               LOfPnts: in out ListOfPntOn2S from IntSurf;
102               RestrictLine: Boolean from Standard = Standard_True;
103               isGeomInt : Boolean from Standard = Standard_True)
104               
105       ---Purpose: If isGeomInt == Standard_False, then method 
106       --          Param-Param intersection will be used.
107       
108       raises ConstructionError from Standard
109       is static;
110
111     Perform ( me: in out;
112               S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
113               S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
114               U1,V1,U2,V2 : Real from Standard;
115               TolArc,TolTang: Real from Standard)
116               
117       raises ConstructionError from Standard
118       is static;
119
120     Perform (me: in out;
121              S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
122              TolArc,TolTang: Real from Standard)
123       
124       raises ConstructionError from Standard
125       is static;
126   
127     ParamParamPerfom( me: in out;
128                       S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
129                       S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
130                       TolArc,TolTang: Real from Standard;
131                       LOfPnts: in out ListOfPntOn2S from IntSurf;
132                       RestrictLine: Boolean from Standard;
133                       typs1, typs2: SurfaceType from GeomAbs)
134
135       is private;
136       
137     GeomGeomPerfom( me: in out;
138                     S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
139                     S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
140                     TolArc,TolTang: Real from Standard;
141                     LOfPnts: in out ListOfPntOn2S from IntSurf;
142                     RestrictLine: Boolean from Standard;
143                     typs1, typs2: SurfaceType from GeomAbs)
144
145       is private;
146       
147     GeomGeomPerfomTrimSurf( me: in out;
148                             S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
149                             S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
150                             TolArc,TolTang: Real from Standard;
151                             LOfPnts: in out ListOfPntOn2S from IntSurf;
152                             RestrictLine: Boolean from Standard;
153                             typs1, typs2: SurfaceType from GeomAbs)
154
155       is private;
156                     
157     GeomParamPerfom(me: in out;
158                     S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
159                     S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d;
160                     isNotAnalitical: Boolean from Standard;
161                     typs1, typs2: SurfaceType from GeomAbs)
162       
163       is private;
164       
165     IsDone(me)
166     
167         ---Purpose: Returns True if the calculus was succesfull.
168
169         returns Boolean from Standard
170       ---C++: inline
171       
172         is static;
173
174
175     IsEmpty(me)
176       ---Purpose: Returns true if the is no intersection.
177       ---C++: inline
178       returns Boolean from Standard
179       raises NotDone from StdFail
180       is static;
181
182
183     TangentFaces(me)
184       ---Purpose: Returns True if the two patches are considered as
185       --          entierly tangent, i-e every restriction arc of one
186       --          patch is inside the geometric base of the other patch.
187       ---C++: inline
188       
189       returns Boolean from Standard
190       raises NotDone from StdFail
191       is static;
192       
193     OppositeFaces(me)
194       ---Purpose: Returns True when the TangentFaces returns True and the
195       --          normal vectors evaluated at a point on the first and the
196       --          second surface are opposite. 
197       --          The exception DomainError is raised if TangentFaces
198       --          returns False.
199       ---C++: inline
200
201         returns Boolean from Standard
202       raises  NotDone     from StdFail,
203               DomainError from Standard
204       is static;
205
206
207     NbPnts(me)
208       ---Purpose: Returns the number of "single" points.
209       ---C++: inline
210
211         returns Integer from Standard
212         raises NotDone from StdFail
213         is static;
214
215
216     Point(me; Index: Integer from Standard)
217     
218         ---Purpose: Returns the point of range Index.
219         --          An exception is raised if Index<=0 or Index>NbPnt.
220       ---C++: return const&
221       ---C++: inline
222
223         returns Point from IntPatch
224         raises  NotDone    from StdFail,
225               OutOfRange from Standard
226
227         is static;
228
229
230     NbLines(me)
231       ---Purpose: Returns the number of intersection lines.
232       ---C++: inline
233       
234       returns Integer from Standard
235       raises NotDone from StdFail
236       is static;
237       
238     Line(me; Index: Integer from Standard)
239       ---Purpose: Returns the line of range Index.
240         --          An exception is raised if Index<=0 or Index>NbLine.
241       ---C++: return const&
242       ---C++: inline
243
244         returns Line from IntPatch
245         raises  NotDone    from StdFail,
246               OutOfRange from Standard
247               
248       is static;
249       
250     SequenceOfLine(me)
251       ---C++: return const&
252       
253       returns SequenceOfLine from IntPatch
254       raises NotDone    from StdFail
255       is static;
256         
257     Dump(me; Mode : Integer from Standard;
258              S1   : HSurface from Adaptor3d; D1: TopolTool from Adaptor3d;
259              S2   : HSurface from Adaptor3d; D2: TopolTool from Adaptor3d) 
260         ---Purpose: Dump of each result line. 
261         ---         Mode for more accurate dumps. 
262         --          
263         is static;
264
265 fields
266
267     done       : Boolean         from Standard;
268     empt       : Boolean         from Standard;
269     tgte       : Boolean         from Standard;
270     oppo       : Boolean         from Standard;
271     spnt       : SequenceOfPoint from IntPatch;
272     slin       : SequenceOfLine  from IntPatch;
273     myTolArc   : Real from Standard;
274     myTolTang  : Real from Standard;
275     myUVMaxStep: Real from Standard;
276     myFleche   : Real from Standard;
277     myIsStartPnt: Boolean from Standard;
278     myU1Start  : Real from Standard;
279     myV1Start  : Real from Standard;
280     myU2Start  : Real from Standard;
281     myV2Start  : Real from Standard;
282
283 end Intersection;