1 -- Created on: 1991-02-26
2 -- Created by: Isabelle GRIGNON
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
18 ---Purpose: This package calculates the distances between
19 -- points, curves and surfaces.
20 -- In general case, the algorithm to find the
21 -- distances is a minimization algorithm of a function
22 -- of variables: F(X). It is stopped when:
23 -- for X1=X+Dx, F(X) and F(X1) are the same.
24 -- The value of Dx can be calculated for all the
28 -- All methods of all classes will be public.
48 enumeration ExtFlag is ExtFlag_MIN, ExtFlag_MAX, ExtFlag_MINMAX;
50 enumeration ExtAlgo is ExtAlgo_Grad, ExtAlgo_Tree;
52 enumeration ElementType is Node, UIsoEdge, VIsoEdge, Face;
61 -----------------------------------
62 -- Treatement of elementary curves
63 -- and surfaces extremas:
64 -----------------------------------
76 -----------------------------------------------
77 -- generic classes for POINT-CURVE extremas:
78 -----------------------------------------------
79 private generic class FuncExtPC, SeqPC;
80 generic class GenExtPC, PCF;
81 generic class GenLocateExtPC, PCLocF;
83 -------------------------------------------------
84 -- classes for POINT-SURFACE extremas:
85 -------------------------------------------------
86 private class FuncExtPS;
89 imported HUBTreeOfSphere;
91 ----------------------------------------------
92 -- generic classes for CURVE-CURVE extremas:
93 ----------------------------------------------
94 private generic class FuncExtCC, SeqPOnC;
95 generic class GenExtCC, CCF;
96 generic class GenLocateExtCC, CCLocF;
97 generic class CurveCache;
100 ----------------------------------------------
101 -- classes for CURVE-SURFACE extremas:
102 ----------------------------------------------
103 private class FuncExtCS;
105 class GenLocateExtCS;
107 ----------------------------------------------
108 -- classes for SURFACE-SURFACE extremas:
109 ----------------------------------------------
110 private class FuncExtSS;
112 class GenLocateExtSS;
114 --------------------------------------------------
115 -- the following classes switches the curve or
116 -- surface types for approximate elementary curves.
117 -- the tools are the tools from Adaptor3d.
118 --------------------------------------------------
120 generic class GExtPC, EPC;
121 generic class GLocateExtPC, ELPC, LocEPC;
130 class CCache instantiates CurveCache from Extrema
131 (Curve from Adaptor3d,
133 HArray1OfPnt from TColgp);
135 class ECC instantiates GenExtCC from Extrema
136 (Curve from Adaptor3d,
137 CurveTool from Extrema,
138 Curve from Adaptor3d,
139 CurveTool from Extrema,
141 HArray1OfPnt from TColgp,
142 POnCurv from Extrema,
148 class LCCache instantiates CurveCache from Extrema
149 (Curve from Adaptor3d,
151 HArray1OfPnt from TColgp);
153 class ELCC instantiates GenExtCC from Extrema
154 (Curve from Adaptor3d,
155 CurveTool from Extrema,
156 Curve from Adaptor3d,
157 CurveTool from Extrema,
158 LCCache from Extrema,
159 HArray1OfPnt from TColgp,
160 POnCurv from Extrema,
164 class LocECC instantiates GenLocateExtCC from Extrema
165 (Curve from Adaptor3d,
166 CurveTool from Extrema,
167 Curve from Adaptor3d,
168 CurveTool from Extrema,
169 POnCurv from Extrema,
176 class CCache2d instantiates CurveCache from Extrema
177 (Curve2d from Adaptor2d,
179 HArray1OfPnt2d from TColgp);
181 class ECC2d instantiates GenExtCC from Extrema
182 (Curve2d from Adaptor2d,
183 Curve2dTool from Extrema,
184 Curve2d from Adaptor2d,
185 Curve2dTool from Extrema,
186 CCache2d from Extrema,
187 HArray1OfPnt2d from TColgp,
188 POnCurv2d from Extrema,
194 class LCCache2d instantiates CurveCache from Extrema
195 (Curve2d from Adaptor2d,
197 HArray1OfPnt2d from TColgp);
199 class ELCC2d instantiates GenExtCC from Extrema
200 (Curve2d from Adaptor2d,
201 Curve2dTool from Extrema,
202 Curve2d from Adaptor2d,
203 Curve2dTool from Extrema,
204 LCCache2d from Extrema,
205 HArray1OfPnt2d from TColgp,
206 POnCurv2d from Extrema,
210 class LocECC2d instantiates GenLocateExtCC from Extrema
211 (Curve2d from Adaptor2d,
212 Curve2dTool from Extrema,
213 Curve2d from Adaptor2d,
214 Curve2dTool from Extrema,
215 POnCurv2d from Extrema,
226 -----------------------------------------------
227 -- the following class is used to locate
228 -- a first evaluation of the possible extremas.
229 -----------------------------------------------
230 generic class CurveLocator;
233 --------------------------------------
234 --- instantiations of generic classes:
235 --------------------------------------
236 class POnCurv instantiates Point from Extrema(Pnt from gp);
237 class POnCurv2d instantiates Point from Extrema(Pnt2d from gp);
239 class Array1OfPOnCurv instantiates
240 Array1 from TCollection(POnCurv);
242 class Array2OfPOnCurv instantiates
243 Array2 from TCollection(POnCurv);
245 class Array1OfPOnCurv2d instantiates
246 Array1 from TCollection(POnCurv2d);
248 class Array2OfPOnCurv2d instantiates
249 Array2 from TCollection(POnCurv2d);
251 class Array1OfPOnSurf instantiates
252 Array1 from TCollection(POnSurf);
254 class Array2OfPOnSurf instantiates
255 Array2 from TCollection(POnSurf);
257 class Array2OfPOnSurfParams instantiates
258 Array2 from TCollection(POnSurfParams);
261 class HArray1OfPOnCurv instantiates
262 HArray1 from TCollection(POnCurv, Array1OfPOnCurv);
264 class HArray2OfPOnCurv instantiates
265 HArray2 from TCollection(POnCurv, Array2OfPOnCurv);
267 class HArray1OfPOnCurv2d instantiates
268 HArray1 from TCollection(POnCurv2d,Array1OfPOnCurv2d);
270 class HArray2OfPOnCurv2d instantiates
271 HArray2 from TCollection(POnCurv2d,Array2OfPOnCurv2d);
274 class HArray1OfPOnSurf instantiates
275 HArray1 from TCollection(POnSurf, Array1OfPOnSurf);
277 class HArray2OfPOnSurf instantiates
278 HArray2 from TCollection(POnSurf, Array2OfPOnSurf);
280 class HArray2OfPOnSurfParams instantiates
281 HArray2 from TCollection(POnSurfParams, Array2OfPOnSurfParams);
284 class SequenceOfPOnCurv instantiates
285 Sequence from TCollection(POnCurv);
287 class SequenceOfPOnCurv2d instantiates
288 Sequence from TCollection(POnCurv2d);
290 class SequenceOfPOnSurf instantiates
291 Sequence from TCollection(POnSurf);
295 --- 3d instantiations:
296 class ExtPC instantiates GExtPC from Extrema
297 (Curve from Adaptor3d,
298 CurveTool from Extrema,
299 ExtPElC from Extrema,
302 POnCurv from Extrema,
303 SequenceOfPOnCurv from Extrema);
306 class LocateExtPC instantiates GLocateExtPC from Extrema
307 (Curve from Adaptor3d,
308 CurveTool from Extrema,
309 ExtPElC from Extrema,
312 POnCurv from Extrema,
313 SequenceOfPOnCurv from Extrema);
315 --- 2d instantiations:
316 class ExtPC2d instantiates GExtPC from Extrema
317 (Curve2d from Adaptor2d,
318 Curve2dTool from Extrema,
319 ExtPElC2d from Extrema,
322 POnCurv2d from Extrema,
323 SequenceOfPOnCurv2d from Extrema);
326 class LocateExtPC2d instantiates GLocateExtPC from Extrema
327 (Curve2d from Adaptor2d,
328 Curve2dTool from Extrema,
329 ExtPElC2d from Extrema,
332 POnCurv2d from Extrema,
333 SequenceOfPOnCurv2d from Extrema);