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
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.
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 generic class ExtPSOfRev;
63 -----------------------------------
64 -- Treatement of elementary curves
65 -- and surfaces extremas:
66 -----------------------------------
78 -----------------------------------------------
79 -- generic classes for POINT-CURVE extremas:
80 -----------------------------------------------
81 private generic class FuncExtPC, SeqPC;
82 generic class GenExtPC, PCF;
83 generic class GenLocateExtPC, PCLocF;
85 -------------------------------------------------
86 -- classes for POINT-SURFACE extremas:
87 -------------------------------------------------
88 private class FuncExtPS;
91 imported HUBTreeOfSphere;
93 ----------------------------------------------
94 -- generic classes for CURVE-CURVE extremas:
95 ----------------------------------------------
96 private generic class FuncExtCC, SeqPOnC;
97 generic class GenExtCC, CCF;
98 generic class GenLocateExtCC, CCLocF;
99 generic class CurveCache;
102 ----------------------------------------------
103 -- classes for CURVE-SURFACE extremas:
104 ----------------------------------------------
105 private class FuncExtCS;
107 class GenLocateExtCS;
109 ----------------------------------------------
110 -- classes for SURFACE-SURFACE extremas:
111 ----------------------------------------------
112 private class FuncExtSS;
114 class GenLocateExtSS;
116 --------------------------------------------------
117 -- the following classes switches the curve or
118 -- surface types for approximate elementary curves.
119 -- the tools are the tools from Adaptor3d.
120 --------------------------------------------------
122 generic class GExtPC, EPC;
123 generic class GLocateExtPC, ELPC, LocEPC;
130 generic class GExtCC, CCache, ECC;
131 generic class GLocateExtCC, LCCache, ELCC, LocECC;
133 generic class GExtCC2d, CCache2d, ECC2d;
134 generic class GLocateExtCC2d, LCCache2d, ELCC2d, LocECC2d;
143 -----------------------------------------------
144 -- the following class is used to locate
145 -- a first evaluation of the possible extremas.
146 -----------------------------------------------
147 generic class CurveLocator;
150 --------------------------------------
151 --- instantiations of generic classes:
152 --------------------------------------
153 class POnCurv instantiates Point from Extrema(Pnt from gp);
154 class POnCurv2d instantiates Point from Extrema(Pnt2d from gp);
156 class Array1OfPOnCurv instantiates
157 Array1 from TCollection(POnCurv);
159 class Array2OfPOnCurv instantiates
160 Array2 from TCollection(POnCurv);
162 class Array1OfPOnCurv2d instantiates
163 Array1 from TCollection(POnCurv2d);
165 class Array2OfPOnCurv2d instantiates
166 Array2 from TCollection(POnCurv2d);
168 class Array1OfPOnSurf instantiates
169 Array1 from TCollection(POnSurf);
171 class Array2OfPOnSurf instantiates
172 Array2 from TCollection(POnSurf);
174 class Array2OfPOnSurfParams instantiates
175 Array2 from TCollection(POnSurfParams);
178 class HArray1OfPOnCurv instantiates
179 HArray1 from TCollection(POnCurv, Array1OfPOnCurv);
181 class HArray2OfPOnCurv instantiates
182 HArray2 from TCollection(POnCurv, Array2OfPOnCurv);
184 class HArray1OfPOnCurv2d instantiates
185 HArray1 from TCollection(POnCurv2d,Array1OfPOnCurv2d);
187 class HArray2OfPOnCurv2d instantiates
188 HArray2 from TCollection(POnCurv2d,Array2OfPOnCurv2d);
191 class HArray1OfPOnSurf instantiates
192 HArray1 from TCollection(POnSurf, Array1OfPOnSurf);
194 class HArray2OfPOnSurf instantiates
195 HArray2 from TCollection(POnSurf, Array2OfPOnSurf);
197 class HArray2OfPOnSurfParams instantiates
198 HArray2 from TCollection(POnSurfParams, Array2OfPOnSurfParams);
201 class SequenceOfPOnCurv instantiates
202 Sequence from TCollection(POnCurv);
204 class SequenceOfPOnCurv2d instantiates
205 Sequence from TCollection(POnCurv2d);
207 class SequenceOfPOnSurf instantiates
208 Sequence from TCollection(POnSurf);
212 --- 3d instantiations:
213 class ExtPC instantiates GExtPC from Extrema
214 (Curve from Adaptor3d,
215 CurveTool from Extrema,
216 ExtPElC from Extrema,
219 POnCurv from Extrema,
220 SequenceOfPOnCurv from Extrema);
223 class LocateExtPC instantiates GLocateExtPC from Extrema
224 (Curve from Adaptor3d,
225 CurveTool from Extrema,
226 ExtPElC from Extrema,
229 POnCurv from Extrema,
230 SequenceOfPOnCurv from Extrema);
233 class ExtCC instantiates GExtCC from Extrema
234 (Curve from Adaptor3d,
235 CurveTool from Extrema,
236 Curve from Adaptor3d,
237 CurveTool from Extrema);
239 class LocateExtCC instantiates GLocateExtCC from Extrema
240 (Curve from Adaptor3d,
241 CurveTool from Extrema,
242 Curve from Adaptor3d,
243 CurveTool from Extrema);
246 --- 2d instantiations:
247 class ExtPC2d instantiates GExtPC from Extrema
248 (Curve2d from Adaptor2d,
249 Curve2dTool from Extrema,
250 ExtPElC2d from Extrema,
253 POnCurv2d from Extrema,
254 SequenceOfPOnCurv2d from Extrema);
257 class LocateExtPC2d instantiates GLocateExtPC from Extrema
258 (Curve2d from Adaptor2d,
259 Curve2dTool from Extrema,
260 ExtPElC2d from Extrema,
263 POnCurv2d from Extrema,
264 SequenceOfPOnCurv2d from Extrema);
267 class ExtCC2d instantiates GExtCC2d from Extrema
268 (Curve2d from Adaptor2d,
269 Curve2dTool from Extrema,
270 Curve2d from Adaptor2d,
271 Curve2dTool from Extrema);
273 class LocateExtCC2d instantiates GLocateExtCC2d from Extrema
274 (Curve2d from Adaptor2d,
275 Curve2dTool from Extrema,
276 Curve2d from Adaptor2d,
277 Curve2dTool from Extrema);