1 -- Created on: 1997-07-28
2 -- Created by: Jerome LEMONIER
3 -- Copyright (c) 1997-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.
22 class SurfRstEvolRad from BRepBlend
23 inherits SurfRstFunction from Blend
27 uses Vector from math,
35 Array1OfPnt from TColgp,
36 Array1OfVec from TColgp,
37 Array1OfPnt2d from TColgp,
38 Array1OfVec2d from TColgp,
39 Array1OfReal from TColStd,
40 Array1OfInteger from TColStd,
43 SectionShape from BlendFunc,
44 HSurface from Adaptor3d,
45 HCurve from Adaptor3d,
46 HCurve2d from Adaptor2d,
47 CurveOnSurface from Adaptor3d,
48 ParameterisationType from Convert,
53 Create(Surf : HSurface from Adaptor3d;
54 SurfRst : HSurface from Adaptor3d;
55 Rst : HCurve2d from Adaptor2d;
56 CGuide : HCurve from Adaptor3d;
57 Evol : Function from Law)
58 returns SurfRstEvolRad from BRepBlend;
61 ---Purpose: Returns 3.
62 returns Integer from Standard;
65 ---Purpose: Returns 3.
66 returns Integer from Standard;
68 Value(me: in out; X: Vector; F: out Vector)
69 ---Purpose: computes the values <F> of the Functions for the
71 -- Returns True if the computation was done successfully,
73 returns Boolean from Standard;
75 Derivatives(me: in out; X: Vector; D: out Matrix)
76 ---Purpose: returns the values <D> of the derivatives for the
78 -- Returns True if the computation was done successfully,
80 returns Boolean from Standard;
82 Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
83 ---Purpose: returns the values <F> of the functions and the derivatives
84 -- <D> for the variable <X>.
85 -- Returns True if the computation was done successfully,
87 returns Boolean from Standard;
90 SurfRef : HSurface from Adaptor3d;
91 RstRef : HCurve2d from Adaptor2d);
93 Set(me: in out; Param: Real from Standard);
95 Set(me: in out; First, Last: Real from Standard);
96 ---Purpose: Sets the bounds of the parametric interval on
98 -- This determines the derivatives in these values if the
99 -- function is not Cn.
101 GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard);
103 GetBounds(me; InfBound,SupBound: out Vector from math);
105 IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
106 returns Boolean from Standard;
108 GetMinimalDistance(me)
109 ---Purpose: Returns the minimal Distance beetween two
110 -- extremitys of calculed sections.
111 returns Real from Standard
114 --- TheFollowing methods are called only when
115 -- IsSolution returns Standard_True.
118 ---C++: return const&
122 ---C++: return const&
126 ---Purpose: Returns U,V coordinates of the point on the surface.
127 ---C++: return const&
128 returns Pnt2d from gp;
131 ---Purpose: Returns U,V coordinates of the point on the curve on
133 ---C++: return const&
134 returns Pnt2d from gp;
137 ---Purpose: Returns parameter of the point on the curve.
138 returns Real from Standard;
141 returns Boolean from Standard;
144 ---C++: return const&
148 ---C++: return const&
149 returns Vec2d from gp;
152 ---C++: return const&
156 ---C++: return const&
157 returns Vec2d from gp;
160 Sol : Vector from math;
161 NS,TgS : out Vec from gp)
162 ---Warning: Peut etre appele sans appel prealable a issolution
163 -- mais les valeurs calculees risquent de ne pas avoir
165 ---Purpose: Permet d ' implementer un critere de decrochage
166 -- specifique a la fonction.
167 returns Boolean from Standard
170 -- methodes hors template (en plus du create)
173 Choix : Integer from Standard)
176 Set(me: in out; TypeSection: SectionShape from BlendFunc)
177 ---Purpose: Sets the type of section generation for the
182 Param : Real from Standard;
183 U,V,W : Real from Standard;
184 Pdeb,Pfin : out Real from Standard;
185 C : out Circ from gp)
188 -- Methods for the approximation
190 IsRational(me) returns Boolean
191 ---Purpose: Returns if the section is rationnal
194 GetSectionSize(me) returns Real
195 ---Purpose: Returns the length of the maximum section
198 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
199 ---Purpose: Compute the minimal value of weight for each poles
203 NbIntervals(me; S : Shape from GeomAbs) returns Integer
204 ---Purpose: Returns the number of intervals for continuity
205 -- <S>. May be one if Continuity(me) >= <S>
208 Intervals(me; T : in out Array1OfReal from TColStd;
209 S : Shape from GeomAbs)
210 ---Purpose: Stores in <T> the parameters bounding the intervals
211 -- of continuity <S>.
212 -- The array must provide enough room to accomodate
213 -- for the parameters. i.e. T.Length() > NbIntervals()
216 GetShape(me : in out;
217 NbPoles : out Integer from Standard;
218 NbKnots : out Integer from Standard;
219 Degree : out Integer from Standard;
220 NbPoles2d : out Integer from Standard)
224 BoundTol, SurfTol, AngleTol : Real;
227 ---Purpose: Returns the tolerance to reach in approximation
229 -- BoundTol error at the Boundary
230 -- AngleTol tangent error at the Boundary
231 -- SurfTol error inside the surface.
234 Knots(me: in out; TKnots: out Array1OfReal from TColStd)
237 Mults(me: in out; TMults: out Array1OfInteger from TColStd)
240 Section(me : in out ;
241 P : Point from Blend;
242 Poles : out Array1OfPnt from TColgp;
243 DPoles : out Array1OfVec from TColgp;
244 Poles2d : out Array1OfPnt2d from TColgp;
245 DPoles2d : out Array1OfVec2d from TColgp;
246 Weigths : out Array1OfReal from TColStd;
247 DWeigths : out Array1OfReal from TColStd)
248 ---Purpose: Used for the first and last section
249 returns Boolean from Standard
252 Section(me: in out; P: Point from Blend;
253 Poles : out Array1OfPnt from TColgp;
254 DPoles : out Array1OfVec from TColgp;
255 D2Poles : out Array1OfVec from TColgp;
256 Poles2d : out Array1OfPnt2d from TColgp;
257 DPoles2d : out Array1OfVec2d from TColgp;
258 D2Poles2d : out Array1OfVec2d from TColgp;
259 Weigths : out Array1OfReal from TColStd;
260 DWeigths : out Array1OfReal from TColStd;
261 D2Weigths : out Array1OfReal from TColStd)
262 ---Purpose: Used for the first and last section
263 -- The method returns Standard_True if the derivatives
264 -- are computed, otherwise it returns Standard_False.
265 returns Boolean from Standard
268 Section(me : in out ;
269 P : Point from Blend;
270 Poles : out Array1OfPnt from TColgp;
271 Poles2d : out Array1OfPnt2d from TColgp;
272 Weigths : out Array1OfReal from TColStd)
276 IC2d : Integer from Standard;
277 Tol : Real from Standard;
278 TolU, TolV : out Real from Standard);
282 surf : HSurface from Adaptor3d;
283 surfrst : HSurface from Adaptor3d;
284 rst : HCurve2d from Adaptor2d;
285 cons : CurveOnSurface from Adaptor3d;
286 guide : HCurve from Adaptor3d;
287 tguide : HCurve from Adaptor3d;
290 pt2ds : Pnt2d from gp;
291 pt2drst : Pnt2d from gp;
292 prmrst : Real from Standard;
293 istangent: Boolean from Standard;
295 tg2ds : Vec2d from gp;
297 tg2drst : Vec2d from gp;
299 ray : Real from Standard;
300 dray : Real from Standard;
301 choix : Integer from Standard;
306 normtg : Real from Standard;
307 theD : Real from Standard;
309 surfref : HSurface from Adaptor3d;
310 rstref : HCurve2d from Adaptor2d;
312 maxang : Real from Standard;
313 minang : Real from Standard;
314 distmin : Real from Standard;
315 mySShape : SectionShape from BlendFunc;
316 myTConv : ParameterisationType from Convert;
317 tevol : Function from Law ;
318 fevol : Function from Law ;
319 sg1 : Real from Standard;