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
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.
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.
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.
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
33 -- All methods of all classes will be public.
53 enumeration ExtFlag is ExtFlag_MIN, ExtFlag_MAX, ExtFlag_MINMAX;
55 enumeration ExtAlgo is ExtAlgo_Grad, ExtAlgo_Tree;
57 enumeration ElementType is Node, UIsoEdge, VIsoEdge, Face;
66 generic class ExtPSOfRev;
68 -----------------------------------
69 -- Treatement of elementary curves
70 -- and surfaces extremas:
71 -----------------------------------
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;
90 -------------------------------------------------
91 -- classes for POINT-SURFACE extremas:
92 -------------------------------------------------
93 private class FuncExtPS;
96 imported HUBTreeOfSphere;
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;
107 ----------------------------------------------
108 -- classes for CURVE-SURFACE extremas:
109 ----------------------------------------------
110 private class FuncExtCS;
112 class GenLocateExtCS;
114 ----------------------------------------------
115 -- classes for SURFACE-SURFACE extremas:
116 ----------------------------------------------
117 private class FuncExtSS;
119 class GenLocateExtSS;
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 --------------------------------------------------
127 generic class GExtPC, EPC;
128 generic class GLocateExtPC, ELPC, LocEPC;
135 generic class GExtCC, CCache, ECC;
136 generic class GLocateExtCC, LCCache, ELCC, LocECC;
138 generic class GExtCC2d, CCache2d, ECC2d;
139 generic class GLocateExtCC2d, LCCache2d, ELCC2d, LocECC2d;
148 -----------------------------------------------
149 -- the following class is used to locate
150 -- a first evaluation of the possible extremas.
151 -----------------------------------------------
152 generic class CurveLocator;
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);
161 class Array1OfPOnCurv instantiates
162 Array1 from TCollection(POnCurv);
164 class Array2OfPOnCurv instantiates
165 Array2 from TCollection(POnCurv);
167 class Array1OfPOnCurv2d instantiates
168 Array1 from TCollection(POnCurv2d);
170 class Array2OfPOnCurv2d instantiates
171 Array2 from TCollection(POnCurv2d);
173 class Array1OfPOnSurf instantiates
174 Array1 from TCollection(POnSurf);
176 class Array2OfPOnSurf instantiates
177 Array2 from TCollection(POnSurf);
179 class Array2OfPOnSurfParams instantiates
180 Array2 from TCollection(POnSurfParams);
183 class HArray1OfPOnCurv instantiates
184 HArray1 from TCollection(POnCurv, Array1OfPOnCurv);
186 class HArray2OfPOnCurv instantiates
187 HArray2 from TCollection(POnCurv, Array2OfPOnCurv);
189 class HArray1OfPOnCurv2d instantiates
190 HArray1 from TCollection(POnCurv2d,Array1OfPOnCurv2d);
192 class HArray2OfPOnCurv2d instantiates
193 HArray2 from TCollection(POnCurv2d,Array2OfPOnCurv2d);
196 class HArray1OfPOnSurf instantiates
197 HArray1 from TCollection(POnSurf, Array1OfPOnSurf);
199 class HArray2OfPOnSurf instantiates
200 HArray2 from TCollection(POnSurf, Array2OfPOnSurf);
202 class HArray2OfPOnSurfParams instantiates
203 HArray2 from TCollection(POnSurfParams, Array2OfPOnSurfParams);
206 class SequenceOfPOnCurv instantiates
207 Sequence from TCollection(POnCurv);
209 class SequenceOfPOnCurv2d instantiates
210 Sequence from TCollection(POnCurv2d);
212 class SequenceOfPOnSurf instantiates
213 Sequence from TCollection(POnSurf);
217 --- 3d instantiations:
218 class ExtPC instantiates GExtPC from Extrema
219 (Curve from Adaptor3d,
220 CurveTool from Extrema,
221 ExtPElC from Extrema,
224 POnCurv from Extrema,
225 SequenceOfPOnCurv from Extrema);
228 class LocateExtPC instantiates GLocateExtPC from Extrema
229 (Curve from Adaptor3d,
230 CurveTool from Extrema,
231 ExtPElC from Extrema,
234 POnCurv from Extrema,
235 SequenceOfPOnCurv from Extrema);
238 class ExtCC instantiates GExtCC from Extrema
239 (Curve from Adaptor3d,
240 CurveTool from Extrema,
241 Curve from Adaptor3d,
242 CurveTool from Extrema);
244 class LocateExtCC instantiates GLocateExtCC from Extrema
245 (Curve from Adaptor3d,
246 CurveTool from Extrema,
247 Curve from Adaptor3d,
248 CurveTool from Extrema);
251 --- 2d instantiations:
252 class ExtPC2d instantiates GExtPC from Extrema
253 (Curve2d from Adaptor2d,
254 Curve2dTool from Extrema,
255 ExtPElC2d from Extrema,
258 POnCurv2d from Extrema,
259 SequenceOfPOnCurv2d from Extrema);
262 class LocateExtPC2d instantiates GLocateExtPC from Extrema
263 (Curve2d from Adaptor2d,
264 Curve2dTool from Extrema,
265 ExtPElC2d from Extrema,
268 POnCurv2d from Extrema,
269 SequenceOfPOnCurv2d from Extrema);
272 class ExtCC2d instantiates GExtCC2d from Extrema
273 (Curve2d from Adaptor2d,
274 Curve2dTool from Extrema,
275 Curve2d from Adaptor2d,
276 Curve2dTool from Extrema);
278 class LocateExtCC2d instantiates GLocateExtCC2d from Extrema
279 (Curve2d from Adaptor2d,
280 Curve2dTool from Extrema,
281 Curve2d from Adaptor2d,
282 Curve2dTool from Extrema);