Commit | Line | Data |
---|---|---|
b311480e | 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 | ||
7fd59977 | 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, | |
92d1589b A |
48 | Geom2d, |
49 | Bnd | |
7fd59977 | 50 | |
51 | is | |
52 | ||
92d1589b A |
53 | enumeration ExtFlag is ExtFlag_MIN, ExtFlag_MAX, ExtFlag_MINMAX; |
54 | ||
55 | enumeration ExtAlgo is ExtAlgo_Grad, ExtAlgo_Tree; | |
56 | ||
7fd59977 | 57 | class CurveTool; |
58 | class Curve2dTool; | |
59 | ||
60 | generic class Point; | |
61 | class POnSurf; | |
62 | ||
63 | generic class ExtPSOfRev; | |
64 | ||
65 | ----------------------------------- | |
66 | -- Treatement of elementary curves | |
67 | -- and surfaces extremas: | |
68 | ----------------------------------- | |
69 | class ExtPElC; | |
70 | class ExtPElC2d; | |
71 | class ExtPElS; | |
72 | class ExtPExtS; | |
73 | class ExtPRevS; | |
74 | class ExtElC; | |
75 | class ExtElC2d; | |
76 | ||
77 | class ExtElCS; | |
78 | class ExtElSS; | |
79 | ||
80 | ----------------------------------------------- | |
81 | -- generic classes for POINT-CURVE extremas: | |
82 | ----------------------------------------------- | |
83 | private generic class FuncExtPC, SeqPC; | |
84 | generic class GenExtPC, PCF; | |
85 | generic class GenLocateExtPC, PCLocF; | |
86 | ||
87 | ------------------------------------------------- | |
88 | -- classes for POINT-SURFACE extremas: | |
89 | ------------------------------------------------- | |
90 | private class FuncExtPS; | |
91 | class GenExtPS; | |
92 | class GenLocateExtPS; | |
92d1589b | 93 | imported HUBTreeOfSphere; |
7fd59977 | 94 | |
95 | ---------------------------------------------- | |
96 | -- generic classes for CURVE-CURVE extremas: | |
97 | ---------------------------------------------- | |
98 | private generic class FuncExtCC, SeqPOnC; | |
99 | generic class GenExtCC, CCF; | |
100 | generic class GenLocateExtCC, CCLocF; | |
101 | generic class CurveCache; | |
102 | ||
103 | ||
104 | ---------------------------------------------- | |
105 | -- classes for CURVE-SURFACE extremas: | |
106 | ---------------------------------------------- | |
107 | private class FuncExtCS; | |
108 | class GenExtCS; | |
109 | class GenLocateExtCS; | |
110 | ||
111 | ---------------------------------------------- | |
112 | -- classes for SURFACE-SURFACE extremas: | |
113 | ---------------------------------------------- | |
114 | private class FuncExtSS; | |
115 | class GenExtSS; | |
116 | class GenLocateExtSS; | |
117 | ||
118 | -------------------------------------------------- | |
119 | -- the following classes switches the curve or | |
120 | -- surface types for approximate elementary curves. | |
121 | -- the tools are the tools from Adaptor3d. | |
122 | -------------------------------------------------- | |
123 | -- Point-Curve: | |
124 | generic class GExtPC, EPC; | |
125 | generic class GLocateExtPC, ELPC, LocEPC; | |
126 | ||
127 | -- Point-Surface: | |
128 | class ExtPS; | |
129 | ||
130 | -- Curve-Curve: | |
131 | -- 3d: | |
132 | generic class GExtCC, CCache, ECC; | |
133 | generic class GLocateExtCC, LCCache, ELCC, LocECC; | |
134 | -- 2d: | |
135 | generic class GExtCC2d, CCache2d, ECC2d; | |
136 | generic class GLocateExtCC2d, LCCache2d, ELCC2d, LocECC2d; | |
137 | ||
138 | -- Curve-Surface: | |
139 | class ExtCS; | |
140 | ||
141 | -- Surface-Surface: | |
142 | class ExtSS; | |
143 | ||
144 | ||
145 | ----------------------------------------------- | |
146 | -- the following class is used to locate | |
147 | -- a first evaluation of the possible extremas. | |
148 | ----------------------------------------------- | |
149 | generic class CurveLocator; | |
150 | ||
151 | ||
152 | -------------------------------------- | |
153 | --- instantiations of generic classes: | |
154 | -------------------------------------- | |
155 | class POnCurv instantiates Point from Extrema(Pnt from gp); | |
156 | class POnCurv2d instantiates Point from Extrema(Pnt2d from gp); | |
157 | ||
158 | class Array1OfPOnCurv instantiates | |
159 | Array1 from TCollection(POnCurv); | |
160 | ||
161 | class Array2OfPOnCurv instantiates | |
162 | Array2 from TCollection(POnCurv); | |
163 | ||
164 | class Array1OfPOnCurv2d instantiates | |
165 | Array1 from TCollection(POnCurv2d); | |
166 | ||
167 | class Array2OfPOnCurv2d instantiates | |
168 | Array2 from TCollection(POnCurv2d); | |
169 | ||
170 | class Array1OfPOnSurf instantiates | |
171 | Array1 from TCollection(POnSurf); | |
172 | ||
173 | class Array2OfPOnSurf instantiates | |
174 | Array2 from TCollection(POnSurf); | |
175 | ||
176 | ||
177 | class HArray1OfPOnCurv instantiates | |
178 | HArray1 from TCollection(POnCurv, Array1OfPOnCurv); | |
179 | ||
180 | class HArray2OfPOnCurv instantiates | |
181 | HArray2 from TCollection(POnCurv, Array2OfPOnCurv); | |
182 | ||
183 | class HArray1OfPOnCurv2d instantiates | |
184 | HArray1 from TCollection(POnCurv2d,Array1OfPOnCurv2d); | |
185 | ||
186 | class HArray2OfPOnCurv2d instantiates | |
187 | HArray2 from TCollection(POnCurv2d,Array2OfPOnCurv2d); | |
188 | ||
189 | ||
190 | class HArray1OfPOnSurf instantiates | |
191 | HArray1 from TCollection(POnSurf, Array1OfPOnSurf); | |
192 | ||
193 | class HArray2OfPOnSurf instantiates | |
194 | HArray2 from TCollection(POnSurf, Array2OfPOnSurf); | |
195 | ||
196 | ||
197 | class SequenceOfPOnCurv instantiates | |
198 | Sequence from TCollection(POnCurv); | |
199 | ||
200 | class SequenceOfPOnCurv2d instantiates | |
201 | Sequence from TCollection(POnCurv2d); | |
202 | ||
203 | class SequenceOfPOnSurf instantiates | |
204 | Sequence from TCollection(POnSurf); | |
205 | ||
206 | ||
207 | ||
208 | --- 3d instantiations: | |
209 | class ExtPC instantiates GExtPC from Extrema | |
210 | (Curve from Adaptor3d, | |
211 | CurveTool from Extrema, | |
212 | ExtPElC from Extrema, | |
213 | Pnt from gp, | |
214 | Vec from gp, | |
215 | POnCurv from Extrema, | |
216 | SequenceOfPOnCurv from Extrema); | |
217 | ||
218 | ||
219 | class LocateExtPC instantiates GLocateExtPC from Extrema | |
220 | (Curve from Adaptor3d, | |
221 | CurveTool from Extrema, | |
222 | ExtPElC from Extrema, | |
223 | Pnt from gp, | |
224 | Vec from gp, | |
225 | POnCurv from Extrema, | |
226 | SequenceOfPOnCurv from Extrema); | |
227 | ||
228 | ||
229 | class ExtCC instantiates GExtCC from Extrema | |
230 | (Curve from Adaptor3d, | |
231 | CurveTool from Extrema, | |
232 | Curve from Adaptor3d, | |
233 | CurveTool from Extrema); | |
234 | ||
235 | class LocateExtCC instantiates GLocateExtCC from Extrema | |
236 | (Curve from Adaptor3d, | |
237 | CurveTool from Extrema, | |
238 | Curve from Adaptor3d, | |
239 | CurveTool from Extrema); | |
240 | ||
241 | ||
242 | --- 2d instantiations: | |
243 | class ExtPC2d instantiates GExtPC from Extrema | |
244 | (Curve2d from Adaptor2d, | |
245 | Curve2dTool from Extrema, | |
246 | ExtPElC2d from Extrema, | |
247 | Pnt2d from gp, | |
248 | Vec2d from gp, | |
249 | POnCurv2d from Extrema, | |
250 | SequenceOfPOnCurv2d from Extrema); | |
251 | ||
252 | ||
253 | class LocateExtPC2d instantiates GLocateExtPC from Extrema | |
254 | (Curve2d from Adaptor2d, | |
255 | Curve2dTool from Extrema, | |
256 | ExtPElC2d from Extrema, | |
257 | Pnt2d from gp, | |
258 | Vec2d from gp, | |
259 | POnCurv2d from Extrema, | |
260 | SequenceOfPOnCurv2d from Extrema); | |
261 | ||
262 | ||
263 | class ExtCC2d instantiates GExtCC2d from Extrema | |
264 | (Curve2d from Adaptor2d, | |
265 | Curve2dTool from Extrema, | |
266 | Curve2d from Adaptor2d, | |
267 | Curve2dTool from Extrema); | |
268 | ||
269 | class LocateExtCC2d instantiates GLocateExtCC2d from Extrema | |
270 | (Curve2d from Adaptor2d, | |
271 | Curve2dTool from Extrema, | |
272 | Curve2d from Adaptor2d, | |
273 | Curve2dTool from Extrema); | |
274 | ||
275 | ||
276 | ||
277 | ||
278 | end Extrema; |