b311480e |
1 | -- Created on: 1993-12-13 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | -- Modified: Fri Jul 10 11:23:35 1998 |
18 | -- JCT : Add SpApprox in Perform |
7fd59977 |
19 | |
20 | |
21 | |
22 | generic class AppSurf from AppBlend |
23 | (TheSectionGenerator as any; |
24 | TheLine as Transient) |
25 | inherits Approx from AppBlend |
26 | |
27 | ---Purpose: Bspline approximation of a surface. |
28 | |
29 | uses Array2OfPnt from TColgp, |
30 | HArray2OfPnt from TColgp, |
31 | Array2OfReal from TColStd, |
32 | HArray2OfReal from TColStd, |
33 | Array1OfReal from TColStd, |
34 | HArray1OfReal from TColStd, |
35 | Array1OfInteger from TColStd, |
36 | HArray1OfInteger from TColStd, |
37 | Array1OfPnt2d from TColgp, |
38 | SequenceOfArray1OfPnt2d from TColgp, |
39 | ParametrizationType from Approx, |
40 | Shape from GeomAbs |
41 | |
42 | |
43 | raises NotDone from StdFail, |
44 | DomainError from Standard, |
45 | OutOfRange from Standard |
46 | |
47 | is |
48 | |
49 | |
50 | Create |
51 | |
52 | returns AppSurf from AppBlend; |
53 | |
54 | |
55 | Create(Degmin,Degmax: Integer from Standard; |
56 | Tol3d,Tol2d : Real from Standard; |
57 | NbIt: Integer from Standard; |
58 | KnownParameters : Boolean from Standard = Standard_False) |
59 | |
60 | returns AppSurf from AppBlend; |
61 | |
62 | |
63 | Init(me: in out; Degmin,Degmax: Integer from Standard; |
64 | Tol3d,Tol2d : Real from Standard; |
65 | NbIt: Integer from Standard; |
66 | KnownParameters : Boolean from Standard = Standard_False) |
67 | |
68 | is static; |
69 | |
70 | SetParType(me: in out; ParType : ParametrizationType from Approx) |
71 | ---Purpose: Define the type of parametrization used in the approximation |
72 | is static; |
73 | |
74 | |
75 | SetContinuity(me: in out; C : Shape from GeomAbs) |
76 | ---Purpose: Define the Continuity used in the approximation |
77 | is static; |
78 | |
79 | |
80 | SetCriteriumWeight(me : in out; |
81 | W1, W2, W3 : Real) |
82 | ---Purpose: define the Weights associed to the criterium used in |
83 | -- the optimization. |
84 | -- |
85 | raises DomainError -- if Wi <= 0 |
86 | is static; |
87 | |
88 | |
89 | ParType(me) |
90 | ---Purpose: returns the type of parametrization used in the approximation |
91 | returns ParametrizationType from Approx |
92 | is static; |
93 | |
94 | |
95 | Continuity(me) |
96 | ---Purpose: returns the Continuity used in the approximation |
97 | returns Shape from GeomAbs |
98 | is static; |
99 | |
100 | |
101 | CriteriumWeight(me ; |
102 | W1, W2, W3 : out Real) |
103 | ---Purpose: returns the Weights (as percent) associed to the criterium used in |
104 | -- the optimization. |
105 | is static; |
106 | |
107 | Perform(me: in out; Lin: TheLine; |
108 | SecGen: in out TheSectionGenerator; |
109 | SpApprox : Boolean from Standard = Standard_False) |
110 | |
111 | is static; |
112 | |
113 | PerformSmoothing(me: in out; Lin: TheLine; |
114 | SecGen: in out TheSectionGenerator) |
115 | |
116 | is static; |
117 | |
118 | |
119 | Perform(me: in out; Lin: TheLine; |
120 | SecGen: in out TheSectionGenerator; |
121 | NbMaxP: Integer from Standard) |
122 | |
123 | is static; |
124 | |
125 | |
126 | InternalPerform(me: in out; Lin: TheLine; |
127 | SecGen: in out TheSectionGenerator; |
128 | SpApprox : Boolean from Standard; |
129 | UseVariational: Boolean from Standard) |
130 | |
131 | is static private; |
132 | |
133 | IsDone(me) |
134 | |
135 | returns Boolean from Standard |
136 | ---C++: inline |
137 | |
138 | is static; |
139 | |
140 | |
141 | SurfShape(me; UDegree,VDegree : out Integer from Standard; |
142 | NbUPoles,NbVPoles: out Integer from Standard; |
143 | NbUKnots,NbVKnots: out Integer from Standard) |
144 | raises NotDone from StdFail |
145 | is static; |
146 | |
147 | |
148 | Surface(me; TPoles : out Array2OfPnt from TColgp; |
149 | TWeights : out Array2OfReal from TColStd; |
150 | TUKnots,TVKnots : out Array1OfReal from TColStd; |
151 | TUMults,TVMults : out Array1OfInteger from TColStd) |
152 | raises NotDone from StdFail |
153 | is static; |
154 | |
155 | |
156 | UDegree(me) |
157 | |
158 | returns Integer from Standard |
159 | ---C++: inline |
160 | |
161 | raises NotDone from StdFail |
162 | is static; |
163 | |
164 | |
165 | VDegree(me) |
166 | |
167 | returns Integer from Standard |
168 | ---C++: inline |
169 | |
170 | raises NotDone from StdFail |
171 | is static; |
172 | |
173 | |
174 | SurfPoles(me) |
175 | |
176 | returns Array2OfPnt from TColgp |
177 | ---C++: inline |
178 | ---C++: return const& |
179 | |
180 | raises NotDone from StdFail |
181 | is static; |
182 | |
183 | |
184 | SurfWeights(me) |
185 | |
186 | returns Array2OfReal from TColStd |
187 | ---C++: inline |
188 | ---C++: return const& |
189 | |
190 | raises NotDone from StdFail |
191 | is static; |
192 | |
193 | |
194 | SurfUKnots(me) |
195 | |
196 | returns Array1OfReal from TColStd |
197 | ---C++: inline |
198 | ---C++: return const& |
199 | |
200 | raises NotDone from StdFail |
201 | is static; |
202 | |
203 | |
204 | SurfVKnots(me) |
205 | |
206 | returns Array1OfReal from TColStd |
207 | ---C++: inline |
208 | ---C++: return const& |
209 | |
210 | raises NotDone from StdFail |
211 | is static; |
212 | |
213 | |
214 | SurfUMults(me) |
215 | |
216 | returns Array1OfInteger from TColStd |
217 | ---C++: inline |
218 | ---C++: return const& |
219 | |
220 | raises NotDone from StdFail |
221 | is static; |
222 | |
223 | |
224 | SurfVMults(me) |
225 | |
226 | returns Array1OfInteger from TColStd |
227 | ---C++: inline |
228 | ---C++: return const& |
229 | |
230 | raises NotDone from StdFail |
231 | is static; |
232 | |
233 | |
234 | NbCurves2d(me) |
235 | |
236 | returns Integer from Standard |
237 | ---C++: inline |
238 | |
239 | raises NotDone from StdFail |
240 | is static; |
241 | |
242 | |
243 | Curves2dShape(me; Degree,NbPoles,NbKnots: out Integer from Standard) |
244 | |
245 | raises NotDone from StdFail, |
246 | DomainError from Standard |
247 | |
248 | is static; |
249 | |
250 | |
251 | Curve2d(me; Index: Integer from Standard; |
252 | TPoles : out Array1OfPnt2d from TColgp; |
253 | TKnots : out Array1OfReal from TColStd; |
254 | TMults : out Array1OfInteger from TColStd) |
255 | |
256 | raises NotDone from StdFail, |
257 | OutOfRange from Standard, |
258 | DomainError from Standard |
259 | |
260 | is static; |
261 | |
262 | |
263 | Curves2dDegree(me) |
264 | |
265 | returns Integer from Standard |
266 | ---C++: inline |
267 | |
268 | raises NotDone from StdFail, |
269 | DomainError from Standard |
270 | is static; |
271 | |
272 | |
273 | Curve2dPoles(me; Index: Integer from Standard) |
274 | |
275 | returns Array1OfPnt2d from TColgp |
276 | ---C++: inline |
277 | ---C++: return const& |
278 | |
279 | raises NotDone from StdFail, |
280 | OutOfRange from Standard, |
281 | DomainError from Standard |
282 | is static; |
283 | |
284 | |
285 | Curves2dKnots(me) |
286 | |
287 | returns Array1OfReal from TColStd |
288 | ---C++: inline |
289 | ---C++: return const& |
290 | |
291 | raises NotDone from StdFail, |
292 | DomainError from Standard |
293 | is static; |
294 | |
295 | |
296 | Curves2dMults(me) |
297 | |
298 | returns Array1OfInteger from TColStd |
299 | ---C++: inline |
300 | ---C++: return const& |
301 | |
302 | raises NotDone from StdFail, |
303 | DomainError from Standard |
304 | is static; |
305 | |
306 | |
307 | TolReached(me; Tol3d, Tol2d : out Real from Standard) |
308 | ---C++: inline |
309 | raises NotDone from StdFail |
310 | is static; |
311 | |
312 | TolCurveOnSurf(me; Index : Integer from Standard) |
313 | returns Real from Standard |
314 | raises NotDone from StdFail |
315 | is static; |
316 | |
317 | |
318 | fields |
319 | |
320 | done : Boolean from Standard; |
321 | dmin : Integer from Standard; |
322 | dmax : Integer from Standard; |
323 | tol3d : Real from Standard; |
324 | tol2d : Real from Standard; |
325 | nbit : Integer from Standard; |
326 | udeg : Integer from Standard; |
327 | vdeg : Integer from Standard; |
328 | knownp : Boolean from Standard; |
329 | tabPoles : HArray2OfPnt from TColgp; |
330 | tabWeights : HArray2OfReal from TColStd; |
331 | tabUKnots : HArray1OfReal from TColStd; |
332 | tabVKnots : HArray1OfReal from TColStd; |
333 | tabUMults : HArray1OfInteger from TColStd; |
334 | tabVMults : HArray1OfInteger from TColStd; |
335 | seqPoles2d : SequenceOfArray1OfPnt2d from TColgp; |
336 | tol3dreached : Real from Standard; |
337 | tol2dreached : Real from Standard; |
338 | paramtype : ParametrizationType from Approx; |
339 | continuity : Shape from GeomAbs; |
340 | critweights : Real[3]; |
341 | |
342 | end AppSurf; |