1 -- Created on: 1997-02-06
2 -- Created by: Laurent BOURESCHE
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 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 class RstRstEvolRad from BRepBlend
18 inherits RstRstFunction from Blend
21 uses Vector from math,
29 Array1OfPnt from TColgp,
30 Array1OfVec from TColgp,
31 Array1OfPnt2d from TColgp,
32 Array1OfVec2d from TColgp,
33 Array1OfReal from TColStd,
34 Array1OfInteger from TColStd,
37 SectionShape from BlendFunc,
38 HSurface from Adaptor3d,
39 HCurve from Adaptor3d,
40 HCurve2d from Adaptor2d,
41 CurveOnSurface from Adaptor3d,
42 ParameterisationType from Convert,
43 DecrochStatus from Blend,
48 Create(Surf1 : HSurface from Adaptor3d;
49 Rst1 : HCurve2d from Adaptor2d;
50 Surf2 : HSurface from Adaptor3d;
51 Rst2 : HCurve2d from Adaptor2d;
52 CGuide : HCurve from Adaptor3d;
53 Evol : Function from Law)
54 returns RstRstEvolRad from BRepBlend;
57 ---Purpose: Returns 2.
58 returns Integer from Standard;
61 ---Purpose: Returns 2.
62 returns Integer from Standard;
64 Value(me: in out; X: Vector; F: out Vector)
65 ---Purpose: computes the values <F> of the Functions for the
67 -- Returns True if the computation was done successfully,
69 returns Boolean from Standard;
71 Derivatives(me: in out; X: Vector; D: out Matrix)
72 ---Purpose: returns the values <D> of the derivatives for the
74 -- Returns True if the computation was done successfully,
76 returns Boolean from Standard;
78 Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
79 ---Purpose: returns the values <F> of the functions and the derivatives
80 -- <D> for the variable <X>.
81 -- Returns True if the computation was done successfully,
83 returns Boolean from Standard;
86 SurfRef1 : HSurface from Adaptor3d;
87 RstRef1 : HCurve2d from Adaptor2d;
88 SurfRef2 : HSurface from Adaptor3d;
89 RstRef2 : HCurve2d from Adaptor2d);
91 Set(me: in out; Param: Real from Standard);
93 Set(me: in out; First, Last: Real from Standard);
94 ---Purpose: Sets the bounds of the parametric interval on
96 -- This determines the derivatives in these values if the
97 -- function is not Cn.
99 GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard);
101 GetBounds(me; InfBound,SupBound: out Vector from math);
103 IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
104 returns Boolean from Standard;
106 GetMinimalDistance(me)
107 ---Purpose: Returns the minimal Distance beetween two
108 -- extremitys of calculed sections.
109 returns Real from Standard
112 --- TheFollowing methods are called only when
113 -- IsSolution returns Standard_True.
116 ---C++: return const&
120 ---C++: return const&
124 ---Purpose: Returns U,V coordinates of the point on the surface.
125 ---C++: return const&
126 returns Pnt2d from gp;
129 ---Purpose: Returns U,V coordinates of the point on the curve on
131 ---C++: return const&
132 returns Pnt2d from gp;
135 ---Purpose: Returns parameter of the point on the curve.
136 returns Real from Standard;
139 ---Purpose: Returns parameter of the point on the curve.
140 returns Real from Standard;
143 returns Boolean from Standard;
146 ---C++: return const&
150 ---C++: return const&
151 returns Vec2d from gp;
154 ---C++: return const&
158 ---C++: return const&
159 returns Vec2d from gp;
162 Sol : Vector from math;
163 NRst1, TgRst1 : out Vec from gp;
164 NRst2, TgRst2 : out Vec from gp)
166 ---Purpose: Enables implementation of a criterion of decrochage
167 -- specific to the function.
168 ---Warning: Can be called without previous call of issolution
169 -- but the calculated values risquent de ne pas avoir
171 returns DecrochStatus from Blend
174 -- methodes hors template (en plus du create)
177 Choix : Integer from Standard)
180 Set(me: in out; TypeSection: SectionShape from BlendFunc)
181 ---Purpose: Sets the type of section generation for the
185 CenterCircleRst1Rst2(me;
186 PtRst1 : Pnt from gp;
187 PtRst2 : Pnt from gp;
189 Center : out Pnt from gp;
190 VdMed : out Vec from gp)
191 ---Purpose: Gives the center of circle defined by PtRst1, PtRst2 and
193 returns Boolean from Standard
197 Param : Real from Standard;
198 U,V : Real from Standard;
199 Pdeb,Pfin : out Real from Standard;
200 C : out Circ from gp)
203 -- Methods for the approximation
205 IsRational(me) returns Boolean
206 ---Purpose: Returns if the section is rationnal
209 GetSectionSize(me) returns Real
210 ---Purpose: Returns the length of the maximum section
213 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
214 ---Purpose: Compute the minimal value of weight for each poles
218 NbIntervals(me; S : Shape from GeomAbs) returns Integer
219 ---Purpose: Returns the number of intervals for continuity
220 -- <S>. May be one if Continuity(me) >= <S>
223 Intervals(me; T : in out Array1OfReal from TColStd;
224 S : Shape from GeomAbs)
225 ---Purpose: Stores in <T> the parameters bounding the intervals
226 -- of continuity <S>.
227 -- The array must provide enough room to accomodate
228 -- for the parameters. i.e. T.Length() > NbIntervals()
231 GetShape(me : in out;
232 NbPoles : out Integer from Standard;
233 NbKnots : out Integer from Standard;
234 Degree : out Integer from Standard;
235 NbPoles2d : out Integer from Standard)
239 BoundTol, SurfTol, AngleTol : Real;
242 ---Purpose: Returns the tolerance to reach in approximation
244 -- BoundTol error at the Boundary
245 -- AngleTol tangent error at the Boundary
246 -- SurfTol error inside the surface.
249 Knots(me: in out; TKnots: out Array1OfReal from TColStd)
252 Mults(me: in out; TMults: out Array1OfInteger from TColStd)
255 Section(me : in out ;
256 P : Point from Blend;
257 Poles : out Array1OfPnt from TColgp;
258 DPoles : out Array1OfVec from TColgp;
259 Poles2d : out Array1OfPnt2d from TColgp;
260 DPoles2d : out Array1OfVec2d from TColgp;
261 Weigths : out Array1OfReal from TColStd;
262 DWeigths : out Array1OfReal from TColStd)
263 ---Purpose: Used for the first and last section
264 returns Boolean from Standard
267 Section(me : in out ;
268 P : Point from Blend;
269 Poles : out Array1OfPnt from TColgp;
270 Poles2d : out Array1OfPnt2d from TColgp;
271 Weigths : out Array1OfReal from TColStd)
275 Section(me: in out; P: Point from Blend;
276 Poles : out Array1OfPnt from TColgp;
277 DPoles : out Array1OfVec from TColgp;
278 D2Poles : out Array1OfVec from TColgp;
279 Poles2d : out Array1OfPnt2d from TColgp;
280 DPoles2d : out Array1OfVec2d from TColgp;
281 D2Poles2d : out Array1OfVec2d from TColgp;
282 Weigths : out Array1OfReal from TColStd;
283 DWeigths : out Array1OfReal from TColStd;
284 D2Weigths : out Array1OfReal from TColStd)
285 ---Purpose: Used for the first and last section
286 -- The method returns Standard_True if the derivatives
287 -- are computed, otherwise it returns Standard_False.
288 returns Boolean from Standard
292 IC2d : Integer from Standard;
293 Tol : Real from Standard;
294 TolU, TolV : out Real from Standard);
298 surf1 : HSurface from Adaptor3d;
299 surf2 : HSurface from Adaptor3d;
300 rst1 : HCurve2d from Adaptor2d;
301 rst2 : HCurve2d from Adaptor2d;
302 cons1 : CurveOnSurface from Adaptor3d;
303 cons2 : CurveOnSurface from Adaptor3d;
304 guide : HCurve from Adaptor3d;
305 tguide : HCurve from Adaptor3d;
306 ptrst1 : Pnt from gp;
307 ptrst2 : Pnt from gp;
308 pt2drst1 : Pnt2d from gp;
309 pt2drst2 : Pnt2d from gp;
310 prmrst1 : Real from Standard;
311 prmrst2 : Real from Standard;
312 istangent: Boolean from Standard;
313 tgrst1 : Vec from gp;
314 tg2drst1 : Vec2d from gp;
315 tgrst2 : Vec from gp;
316 tg2drst2 : Vec2d from gp;
318 ray : Real from Standard;
319 dray : Real from Standard;
320 choix : Integer from Standard;
325 normtg : Real from Standard;
326 theD : Real from Standard;
328 surfref1 : HSurface from Adaptor3d;
329 rstref1 : HCurve2d from Adaptor2d;
330 surfref2 : HSurface from Adaptor3d;
331 rstref2 : HCurve2d from Adaptor2d;
332 maxang : Real from Standard;
333 minang : Real from Standard;
334 distmin : Real from Standard;
335 mySShape : SectionShape from BlendFunc;
336 myTConv : ParameterisationType from Convert;
337 tevol : Function from Law ;
338 fevol : Function from Law ;