0024138: Exception during projection of the point on the face
[occt.git] / src / Extrema / Extrema.cdl
1 -- Created on: 1991-02-26
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 package Extrema 
23     ---Purpose: This package calculates the distances between
24     --          points, curves and surfaces.
25     --          In general case, the algorithm to find the 
26     --          distances is a minimization algorithm of a function
27     --          of variables: F(X). It is stopped when:
28     --            for X1=X+Dx, F(X) and F(X1) are the same.
29     --          The value of Dx can be calculated for all the 
30     --          algorithms.
31
32     ---Level : Public. 
33     --  All methods of all  classes will be public.
34
35
36 uses
37     gp,
38     math,
39     TColStd,
40     TColgp,
41     StdFail,
42     Standard,
43     TCollection,
44     GeomAbs,
45     Adaptor3d,
46     Adaptor2d,
47     Geom,
48     Geom2d,
49         Bnd
50
51 is
52
53     enumeration ExtFlag is ExtFlag_MIN, ExtFlag_MAX, ExtFlag_MINMAX;
54
55     enumeration ExtAlgo is ExtAlgo_Grad, ExtAlgo_Tree;
56     
57     enumeration ElementType is Node, UIsoEdge, VIsoEdge, Face;
58
59     class CurveTool;
60     class Curve2dTool;
61
62     generic class Point;
63     class POnSurf;
64     class POnSurfParams;
65
66     generic class ExtPSOfRev;
67     
68     -----------------------------------
69     -- Treatement of elementary curves 
70     --  and surfaces extremas:
71     -----------------------------------
72     class ExtPElC;
73     class ExtPElC2d;
74     class ExtPElS;
75     class ExtPExtS;
76     class ExtPRevS;
77     class ExtElC;
78     class ExtElC2d;
79
80     class ExtElCS;
81     class ExtElSS;
82     
83     -----------------------------------------------
84     --  generic classes for  POINT-CURVE  extremas:
85     -----------------------------------------------
86     private generic class FuncExtPC, SeqPC;
87     generic class GenExtPC, PCF;
88     generic class GenLocateExtPC, PCLocF;
89
90     -------------------------------------------------
91     --  classes for  POINT-SURFACE  extremas:
92     -------------------------------------------------
93     private class FuncExtPS;
94     class GenExtPS;
95     class GenLocateExtPS; 
96     imported HUBTreeOfSphere;
97     
98     ----------------------------------------------
99     --  generic classes for  CURVE-CURVE extremas:
100     ----------------------------------------------
101     private generic class FuncExtCC, SeqPOnC;
102     generic class GenExtCC, CCF;
103     generic class GenLocateExtCC, CCLocF;
104     generic class CurveCache;
105     
106     
107     ----------------------------------------------
108     --  classes for  CURVE-SURFACE extremas:
109     ----------------------------------------------
110     private class FuncExtCS;
111     class GenExtCS;    
112     class GenLocateExtCS;
113     
114     ----------------------------------------------
115     --  classes for  SURFACE-SURFACE extremas:
116     ----------------------------------------------
117     private class FuncExtSS;
118     class GenExtSS;
119     class GenLocateExtSS;
120     
121     --------------------------------------------------
122     -- the following classes switches the curve or 
123     -- surface types for approximate elementary curves.
124     -- the tools are the tools from Adaptor3d.
125     --------------------------------------------------
126     --  Point-Curve:                                  
127     generic class GExtPC, EPC;
128     generic class GLocateExtPC, ELPC, LocEPC;
129     
130     --  Point-Surface:                                  
131     class ExtPS;
132     
133     --  Curve-Curve:                                  
134     --  3d:
135     generic class GExtCC, CCache, ECC;
136     generic class GLocateExtCC, LCCache, ELCC, LocECC;
137     -- 2d:
138     generic class GExtCC2d, CCache2d, ECC2d;
139     generic class GLocateExtCC2d, LCCache2d, ELCC2d, LocECC2d;
140     
141     --  Curve-Surface:                                  
142     class ExtCS;
143
144     --  Surface-Surface:                                  
145     class ExtSS;
146
147
148     -----------------------------------------------
149     -- the following class is used to locate
150     -- a first evaluation of the possible extremas. 
151     -----------------------------------------------
152     generic class CurveLocator;
153       
154       
155     --------------------------------------
156     --- instantiations of generic classes:
157     --------------------------------------
158     class POnCurv instantiates Point from Extrema(Pnt from gp);
159     class POnCurv2d instantiates Point from Extrema(Pnt2d from gp);
160     
161     class Array1OfPOnCurv     instantiates 
162         Array1 from TCollection(POnCurv);
163         
164     class Array2OfPOnCurv     instantiates 
165         Array2 from TCollection(POnCurv);
166         
167     class Array1OfPOnCurv2d   instantiates 
168         Array1 from TCollection(POnCurv2d);
169         
170     class Array2OfPOnCurv2d   instantiates 
171         Array2 from TCollection(POnCurv2d);
172         
173     class Array1OfPOnSurf     instantiates 
174         Array1 from TCollection(POnSurf);
175         
176     class Array2OfPOnSurf     instantiates 
177         Array2 from TCollection(POnSurf);
178         
179     class Array2OfPOnSurfParams instantiates 
180         Array2 from TCollection(POnSurfParams);
181         
182
183     class HArray1OfPOnCurv    instantiates 
184         HArray1 from TCollection(POnCurv, Array1OfPOnCurv);
185         
186     class HArray2OfPOnCurv    instantiates 
187         HArray2 from TCollection(POnCurv, Array2OfPOnCurv);
188         
189     class HArray1OfPOnCurv2d  instantiates 
190         HArray1 from TCollection(POnCurv2d,Array1OfPOnCurv2d);
191         
192     class HArray2OfPOnCurv2d  instantiates 
193         HArray2 from TCollection(POnCurv2d,Array2OfPOnCurv2d);
194         
195     
196     class HArray1OfPOnSurf    instantiates 
197         HArray1 from TCollection(POnSurf, Array1OfPOnSurf);
198         
199     class HArray2OfPOnSurf    instantiates 
200         HArray2 from TCollection(POnSurf, Array2OfPOnSurf);
201         
202     class HArray2OfPOnSurfParams instantiates 
203         HArray2 from TCollection(POnSurfParams, Array2OfPOnSurfParams);
204         
205
206     class SequenceOfPOnCurv   instantiates 
207         Sequence from TCollection(POnCurv);
208         
209     class SequenceOfPOnCurv2d instantiates 
210         Sequence from TCollection(POnCurv2d);
211         
212     class SequenceOfPOnSurf   instantiates 
213         Sequence from TCollection(POnSurf);
214         
215
216
217          --- 3d instantiations:
218     class ExtPC instantiates GExtPC from Extrema
219         (Curve             from Adaptor3d,
220          CurveTool         from Extrema,
221          ExtPElC           from Extrema,
222          Pnt               from gp,
223          Vec               from gp,
224          POnCurv           from Extrema,
225          SequenceOfPOnCurv from Extrema);
226          
227              
228     class LocateExtPC instantiates GLocateExtPC from Extrema
229         (Curve             from Adaptor3d,
230          CurveTool         from Extrema,
231          ExtPElC           from Extrema,
232          Pnt               from gp,
233          Vec               from gp,
234          POnCurv           from Extrema,
235          SequenceOfPOnCurv from Extrema);
236   
237
238     class ExtCC instantiates GExtCC from Extrema
239         (Curve             from Adaptor3d, 
240          CurveTool         from Extrema,
241          Curve             from Adaptor3d, 
242          CurveTool         from Extrema);
243
244     class LocateExtCC instantiates GLocateExtCC from Extrema
245         (Curve             from Adaptor3d, 
246          CurveTool         from Extrema,
247          Curve             from Adaptor3d, 
248          CurveTool         from Extrema);
249
250
251          --- 2d instantiations:
252     class ExtPC2d instantiates GExtPC from Extrema
253         (Curve2d             from Adaptor2d,
254          Curve2dTool         from Extrema,
255          ExtPElC2d           from Extrema,
256          Pnt2d               from gp,
257          Vec2d               from gp,
258          POnCurv2d           from Extrema,
259          SequenceOfPOnCurv2d from Extrema);
260          
261          
262     class LocateExtPC2d instantiates GLocateExtPC from Extrema
263         (Curve2d             from Adaptor2d,
264          Curve2dTool         from Extrema,
265          ExtPElC2d           from Extrema,
266          Pnt2d               from gp,
267          Vec2d               from gp,
268          POnCurv2d           from Extrema,
269          SequenceOfPOnCurv2d from Extrema);
270   
271
272     class ExtCC2d instantiates GExtCC2d from Extrema
273         (Curve2d             from Adaptor2d, 
274          Curve2dTool         from Extrema,
275          Curve2d             from Adaptor2d, 
276          Curve2dTool         from Extrema);
277
278     class LocateExtCC2d instantiates GLocateExtCC2d from Extrema
279         (Curve2d             from Adaptor2d, 
280          Curve2dTool         from Extrema,
281          Curve2d             from Adaptor2d, 
282          Curve2dTool         from Extrema);
283
284
285
286
287 end Extrema;