Test for 0022778: Bug in BRepMesh
[occt.git] / src / BRepBlend / BRepBlend_SurfRstEvolRad.cdl
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
5 --
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.
10 --
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.
13 --
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.
20
21
22 class SurfRstEvolRad from BRepBlend
23 inherits SurfRstFunction from Blend
24
25         ---Purpose: 
26
27 uses Vector          from math,
28      Matrix          from math,
29      Ax1             from gp,
30      Vec             from gp,
31      Vec2d           from gp,
32      Pnt             from gp,
33      Pnt2d           from gp,
34      Circ            from gp,
35      Array1OfPnt     from TColgp,
36      Array1OfVec     from TColgp,
37      Array1OfPnt2d   from TColgp,
38      Array1OfVec2d   from TColgp,
39      Array1OfReal    from TColStd,
40      Array1OfInteger from TColStd,
41      Shape           from GeomAbs,
42      Point           from Blend,
43      SectionShape    from BlendFunc,
44      HSurface        from Adaptor3d,
45      HCurve          from Adaptor3d,
46      HCurve2d        from Adaptor2d,
47      CurveOnSurface  from Adaptor3d,
48      ParameterisationType from Convert,
49      Function from Law
50
51 is
52
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;
59
60     NbVariables(me)
61     ---Purpose: Returns 3.
62     returns Integer from Standard;
63
64     NbEquations(me)
65     ---Purpose: Returns 3.
66     returns Integer from Standard;
67
68     Value(me: in out; X: Vector; F: out Vector)
69     ---Purpose: computes the values <F> of the Functions for the 
70     --          variable <X>.
71     --          Returns True if the computation was done successfully, 
72     --          False otherwise.
73     returns Boolean from Standard;
74     
75     Derivatives(me: in out; X: Vector; D: out Matrix)
76     ---Purpose: returns the values <D> of the derivatives for the 
77     --          variable <X>.
78     --          Returns True if the computation was done successfully, 
79     --          False otherwise.
80     returns Boolean from Standard;
81     
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, 
86     --          False otherwise.
87     returns Boolean from Standard;
88
89     Set(me      : in out; 
90         SurfRef : HSurface from Adaptor3d;
91         RstRef  : HCurve2d from Adaptor2d);
92            
93     Set(me: in out; Param: Real from Standard);
94
95     Set(me: in out; First, Last: Real from Standard);
96     ---Purpose: Sets the bounds of the parametric interval on 
97     --          the guide line.
98     --          This determines the derivatives in these values if the
99     --          function is not Cn.
100
101     GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard);
102
103     GetBounds(me; InfBound,SupBound: out Vector from math);
104
105     IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
106     returns Boolean from Standard;
107
108     GetMinimalDistance(me) 
109         ---Purpose: Returns   the    minimal  Distance  beetween   two
110         --          extremitys of calculed sections.          
111     returns  Real  from  Standard 
112     is  redefined;
113
114 --- TheFollowing methods are called only when 
115 --  IsSolution returns Standard_True.
116
117     PointOnS(me)
118     ---C++: return const&
119     returns Pnt from gp;
120
121     PointOnRst(me)
122     ---C++: return const&
123     returns Pnt from gp;
124
125     Pnt2dOnS(me)
126     ---Purpose: Returns U,V coordinates of the point on the surface.
127     ---C++: return const&
128     returns Pnt2d from gp;
129
130     Pnt2dOnRst(me)
131     ---Purpose: Returns  U,V coordinates of the point  on the curve on
132     --          surface.
133     ---C++: return const&
134     returns Pnt2d from gp;
135
136     ParameterOnRst(me)
137     ---Purpose: Returns parameter of the point on the curve.
138     returns Real from Standard;
139
140     IsTangencyPoint(me)
141     returns Boolean from Standard;
142
143     TangentOnS(me)
144     ---C++: return const&
145     returns Vec from gp;
146
147     Tangent2dOnS(me)
148     ---C++: return const&
149     returns Vec2d from gp;
150
151     TangentOnRst(me)
152     ---C++: return const&
153     returns Vec from gp;
154
155     Tangent2dOnRst(me)
156     ---C++: return const&
157     returns Vec2d from gp;
158
159     Decroch(me; 
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
164     --          grand  sens.    
165     ---Purpose: Permet  d ' implementer   un   critere  de  decrochage
166     --          specifique a la fonction.
167     returns Boolean from Standard
168     is static;
169
170 -- methodes hors template (en plus du create)
171
172     Set(me     : in out; 
173         Choix  : Integer from Standard)
174     is static;
175
176     Set(me: in out; TypeSection: SectionShape from BlendFunc)
177     ---Purpose: Sets  the  type  of   section generation   for the
178     --          approximations. 
179     is static;
180
181     Section(me        : in out; 
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)
186     is static;
187
188 -- Methods for the approximation
189 -- 
190     IsRational(me) returns Boolean
191     ---Purpose: Returns  if the section is rationnal
192     is static;
193
194     GetSectionSize(me) returns Real
195     ---Purpose:  Returns the length of the maximum section
196     is static;
197     
198     GetMinimalWeight(me; Weigths  : out Array1OfReal  from TColStd)
199     ---Purpose: Compute the minimal value of weight for each poles
200     --          of all sections.
201     is static;
202
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>
206     is static;
207     
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()
214     is static;
215
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)
221     is static;
222
223     GetTolerance(me; 
224                  BoundTol, SurfTol, AngleTol : Real;
225                  Tol3d : out Vector;
226                  Tol1D : out Vector )
227     ---Purpose: Returns the tolerance to reach in approximation
228     --          to respecte
229     --          BoundTol error at the Boundary
230     --          AngleTol tangent error at the Boundary
231     --          SurfTol error inside the surface.
232     is static;
233
234     Knots(me: in out; TKnots: out Array1OfReal from TColStd)
235     is static;
236
237     Mults(me: in out; TMults: out Array1OfInteger from TColStd)
238     is static;
239
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
250     is static;
251
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
266     is static;
267
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)
273     is static;
274
275     Resolution(me; 
276                IC2d : Integer from Standard;
277                Tol  : Real from Standard;
278                TolU, TolV : out Real from Standard);
279
280 fields
281
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;
288     pts      : Pnt                  from gp;
289     ptrst    : Pnt                  from gp;
290     pt2ds    : Pnt2d                from gp;
291     pt2drst  : Pnt2d                from gp;
292     prmrst   : Real                 from Standard;
293     istangent: Boolean              from Standard;
294     tgs      : Vec                  from gp;
295     tg2ds    : Vec2d                from gp;
296     tgrst    : Vec                  from gp;
297     tg2drst  : Vec2d                from gp;
298
299     ray      : Real                 from Standard;
300     dray      : Real                 from Standard;
301     choix    : Integer              from Standard;
302     ptgui    : Pnt                  from gp;
303     d1gui    : Vec                  from gp;
304     d2gui    : Vec                  from gp;
305     nplan    : Vec                  from gp;
306     normtg   : Real                 from Standard;
307     theD     : Real                 from Standard;
308        
309     surfref  : HSurface             from Adaptor3d;
310     rstref   : HCurve2d             from Adaptor2d;
311
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;
320   
321 end SurfRstEvolRad;