1 -- Created on: 1993-12-13
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1993-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.
17 -- Modified: Fri Jul 10 11:23:35 1998
18 -- JCT : Add SpApprox in Perform
22 generic class AppSurf from AppBlend
23 (TheSectionGenerator as any;
25 inherits Approx from AppBlend
27 ---Purpose: Bspline approximation of a surface.
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,
43 raises NotDone from StdFail,
44 DomainError from Standard,
45 OutOfRange from Standard
52 returns AppSurf from AppBlend;
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)
60 returns AppSurf from AppBlend;
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)
70 SetParType(me: in out; ParType : ParametrizationType from Approx)
71 ---Purpose: Define the type of parametrization used in the approximation
75 SetContinuity(me: in out; C : Shape from GeomAbs)
76 ---Purpose: Define the Continuity used in the approximation
80 SetCriteriumWeight(me : in out;
82 ---Purpose: define the Weights associed to the criterium used in
85 raises DomainError -- if Wi <= 0
90 ---Purpose: returns the type of parametrization used in the approximation
91 returns ParametrizationType from Approx
96 ---Purpose: returns the Continuity used in the approximation
97 returns Shape from GeomAbs
102 W1, W2, W3 : out Real)
103 ---Purpose: returns the Weights (as percent) associed to the criterium used in
107 Perform(me: in out; Lin: TheLine;
108 SecGen: in out TheSectionGenerator;
109 SpApprox : Boolean from Standard = Standard_False)
113 PerformSmoothing(me: in out; Lin: TheLine;
114 SecGen: in out TheSectionGenerator)
119 Perform(me: in out; Lin: TheLine;
120 SecGen: in out TheSectionGenerator;
121 NbMaxP: Integer from Standard)
126 InternalPerform(me: in out; Lin: TheLine;
127 SecGen: in out TheSectionGenerator;
128 SpApprox : Boolean from Standard;
129 UseVariational: Boolean from Standard)
135 returns Boolean from Standard
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
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
158 returns Integer from Standard
161 raises NotDone from StdFail
167 returns Integer from Standard
170 raises NotDone from StdFail
176 returns Array2OfPnt from TColgp
178 ---C++: return const&
180 raises NotDone from StdFail
186 returns Array2OfReal from TColStd
188 ---C++: return const&
190 raises NotDone from StdFail
196 returns Array1OfReal from TColStd
198 ---C++: return const&
200 raises NotDone from StdFail
206 returns Array1OfReal from TColStd
208 ---C++: return const&
210 raises NotDone from StdFail
216 returns Array1OfInteger from TColStd
218 ---C++: return const&
220 raises NotDone from StdFail
226 returns Array1OfInteger from TColStd
228 ---C++: return const&
230 raises NotDone from StdFail
236 returns Integer from Standard
239 raises NotDone from StdFail
243 Curves2dShape(me; Degree,NbPoles,NbKnots: out Integer from Standard)
245 raises NotDone from StdFail,
246 DomainError from Standard
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)
256 raises NotDone from StdFail,
257 OutOfRange from Standard,
258 DomainError from Standard
265 returns Integer from Standard
268 raises NotDone from StdFail,
269 DomainError from Standard
273 Curve2dPoles(me; Index: Integer from Standard)
275 returns Array1OfPnt2d from TColgp
277 ---C++: return const&
279 raises NotDone from StdFail,
280 OutOfRange from Standard,
281 DomainError from Standard
287 returns Array1OfReal from TColStd
289 ---C++: return const&
291 raises NotDone from StdFail,
292 DomainError from Standard
298 returns Array1OfInteger from TColStd
300 ---C++: return const&
302 raises NotDone from StdFail,
303 DomainError from Standard
307 TolReached(me; Tol3d, Tol2d : out Real from Standard)
309 raises NotDone from StdFail
312 TolCurveOnSurf(me; Index : Integer from Standard)
313 returns Real from Standard
314 raises NotDone from StdFail
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];