1 -- Created on: 1997-07-28
2 -- Created by: Jerome LEMONIER
3 -- Copyright (c) 1997-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.
17 class SurfRstEvolRad from BRepBlend
18 inherits SurfRstFunction from Blend
22 uses Vector from math,
30 Array1OfPnt from TColgp,
31 Array1OfVec from TColgp,
32 Array1OfPnt2d from TColgp,
33 Array1OfVec2d from TColgp,
34 Array1OfReal from TColStd,
35 Array1OfInteger from TColStd,
38 SectionShape from BlendFunc,
39 HSurface from Adaptor3d,
40 HCurve from Adaptor3d,
41 HCurve2d from Adaptor2d,
42 CurveOnSurface from Adaptor3d,
43 ParameterisationType from Convert,
48 Create(Surf : HSurface from Adaptor3d;
49 SurfRst : HSurface from Adaptor3d;
50 Rst : HCurve2d from Adaptor2d;
51 CGuide : HCurve from Adaptor3d;
52 Evol : Function from Law)
53 returns SurfRstEvolRad from BRepBlend;
56 ---Purpose: Returns 3.
57 returns Integer from Standard;
60 ---Purpose: Returns 3.
61 returns Integer from Standard;
63 Value(me: in out; X: Vector; F: out Vector)
64 ---Purpose: computes the values <F> of the Functions for the
66 -- Returns True if the computation was done successfully,
68 returns Boolean from Standard;
70 Derivatives(me: in out; X: Vector; D: out Matrix)
71 ---Purpose: returns the values <D> of the derivatives for the
73 -- Returns True if the computation was done successfully,
75 returns Boolean from Standard;
77 Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
78 ---Purpose: returns the values <F> of the functions and the derivatives
79 -- <D> for the variable <X>.
80 -- Returns True if the computation was done successfully,
82 returns Boolean from Standard;
85 SurfRef : HSurface from Adaptor3d;
86 RstRef : HCurve2d from Adaptor2d);
88 Set(me: in out; Param: Real from Standard);
90 Set(me: in out; First, Last: Real from Standard);
91 ---Purpose: Sets the bounds of the parametric interval on
93 -- This determines the derivatives in these values if the
94 -- function is not Cn.
96 GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard);
98 GetBounds(me; InfBound,SupBound: out Vector from math);
100 IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
101 returns Boolean from Standard;
103 GetMinimalDistance(me)
104 ---Purpose: Returns the minimal Distance beetween two
105 -- extremitys of calculed sections.
106 returns Real from Standard
109 --- TheFollowing methods are called only when
110 -- IsSolution returns Standard_True.
113 ---C++: return const&
117 ---C++: return const&
121 ---Purpose: Returns U,V coordinates of the point on the surface.
122 ---C++: return const&
123 returns Pnt2d from gp;
126 ---Purpose: Returns U,V coordinates of the point on the curve on
128 ---C++: return const&
129 returns Pnt2d from gp;
132 ---Purpose: Returns parameter of the point on the curve.
133 returns Real from Standard;
136 returns Boolean from Standard;
139 ---C++: return const&
143 ---C++: return const&
144 returns Vec2d from gp;
147 ---C++: return const&
151 ---C++: return const&
152 returns Vec2d from gp;
155 Sol : Vector from math;
156 NS,TgS : out Vec from gp)
157 ---Warning: Peut etre appele sans appel prealable a issolution
158 -- mais les valeurs calculees risquent de ne pas avoir
160 ---Purpose: Permet d ' implementer un critere de decrochage
161 -- specifique a la fonction.
162 returns Boolean from Standard
165 -- methodes hors template (en plus du create)
168 Choix : Integer from Standard)
171 Set(me: in out; TypeSection: SectionShape from BlendFunc)
172 ---Purpose: Sets the type of section generation for the
177 Param : Real from Standard;
178 U,V,W : Real from Standard;
179 Pdeb,Pfin : out Real from Standard;
180 C : out Circ from gp)
183 -- Methods for the approximation
185 IsRational(me) returns Boolean
186 ---Purpose: Returns if the section is rationnal
189 GetSectionSize(me) returns Real
190 ---Purpose: Returns the length of the maximum section
193 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
194 ---Purpose: Compute the minimal value of weight for each poles
198 NbIntervals(me; S : Shape from GeomAbs) returns Integer
199 ---Purpose: Returns the number of intervals for continuity
200 -- <S>. May be one if Continuity(me) >= <S>
203 Intervals(me; T : in out Array1OfReal from TColStd;
204 S : Shape from GeomAbs)
205 ---Purpose: Stores in <T> the parameters bounding the intervals
206 -- of continuity <S>.
207 -- The array must provide enough room to accomodate
208 -- for the parameters. i.e. T.Length() > NbIntervals()
211 GetShape(me : in out;
212 NbPoles : out Integer from Standard;
213 NbKnots : out Integer from Standard;
214 Degree : out Integer from Standard;
215 NbPoles2d : out Integer from Standard)
219 BoundTol, SurfTol, AngleTol : Real;
222 ---Purpose: Returns the tolerance to reach in approximation
224 -- BoundTol error at the Boundary
225 -- AngleTol tangent error at the Boundary
226 -- SurfTol error inside the surface.
229 Knots(me: in out; TKnots: out Array1OfReal from TColStd)
232 Mults(me: in out; TMults: out Array1OfInteger from TColStd)
235 Section(me : in out ;
236 P : Point from Blend;
237 Poles : out Array1OfPnt from TColgp;
238 DPoles : out Array1OfVec from TColgp;
239 Poles2d : out Array1OfPnt2d from TColgp;
240 DPoles2d : out Array1OfVec2d from TColgp;
241 Weigths : out Array1OfReal from TColStd;
242 DWeigths : out Array1OfReal from TColStd)
243 ---Purpose: Used for the first and last section
244 returns Boolean from Standard
247 Section(me: in out; P: Point from Blend;
248 Poles : out Array1OfPnt from TColgp;
249 DPoles : out Array1OfVec from TColgp;
250 D2Poles : out Array1OfVec from TColgp;
251 Poles2d : out Array1OfPnt2d from TColgp;
252 DPoles2d : out Array1OfVec2d from TColgp;
253 D2Poles2d : out Array1OfVec2d from TColgp;
254 Weigths : out Array1OfReal from TColStd;
255 DWeigths : out Array1OfReal from TColStd;
256 D2Weigths : out Array1OfReal from TColStd)
257 ---Purpose: Used for the first and last section
258 -- The method returns Standard_True if the derivatives
259 -- are computed, otherwise it returns Standard_False.
260 returns Boolean from Standard
263 Section(me : in out ;
264 P : Point from Blend;
265 Poles : out Array1OfPnt from TColgp;
266 Poles2d : out Array1OfPnt2d from TColgp;
267 Weigths : out Array1OfReal from TColStd)
271 IC2d : Integer from Standard;
272 Tol : Real from Standard;
273 TolU, TolV : out Real from Standard);
277 surf : HSurface from Adaptor3d;
278 surfrst : HSurface from Adaptor3d;
279 rst : HCurve2d from Adaptor2d;
280 cons : CurveOnSurface from Adaptor3d;
281 guide : HCurve from Adaptor3d;
282 tguide : HCurve from Adaptor3d;
285 pt2ds : Pnt2d from gp;
286 pt2drst : Pnt2d from gp;
287 prmrst : Real from Standard;
288 istangent: Boolean from Standard;
290 tg2ds : Vec2d from gp;
292 tg2drst : Vec2d from gp;
294 ray : Real from Standard;
295 dray : Real from Standard;
296 choix : Integer from Standard;
301 normtg : Real from Standard;
302 theD : Real from Standard;
304 surfref : HSurface from Adaptor3d;
305 rstref : HCurve2d from Adaptor2d;
307 maxang : Real from Standard;
308 minang : Real from Standard;
309 distmin : Real from Standard;
310 mySShape : SectionShape from BlendFunc;
311 myTConv : ParameterisationType from Convert;
312 tevol : Function from Law ;
313 fevol : Function from Law ;
314 sg1 : Real from Standard;