0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BlendFunc / BlendFunc_CSCircular.cdl
1 -- Created on: 1995-01-04
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class CSCircular from BlendFunc
18
19 inherits CSFunction from Blend
20
21         ---Purpose: 
22
23 uses Vector          from math,
24      Matrix          from math,
25      Ax1             from gp,
26      Vec             from gp,
27      Vec2d           from gp,
28      Pnt             from gp,
29      Pnt2d           from gp,
30      Circ            from gp,
31      Array1OfPnt     from TColgp,
32      Array1OfVec     from TColgp,
33      Array1OfPnt2d   from TColgp,
34      Array1OfVec2d   from TColgp,
35      Array1OfReal    from TColStd,
36      Array1OfInteger from TColStd,
37      Shape           from GeomAbs,
38      Point           from Blend,
39      SectionShape    from BlendFunc,
40      ParameterisationType from Convert,
41      HCurve          from Adaptor3d,
42      HSurface        from Adaptor3d,
43      Function        from Law
44
45 is
46
47     Create(S: HSurface from Adaptor3d; C: HCurve from Adaptor3d; CGuide: HCurve from Adaptor3d;
48            L: Function from Law)
49
50         ---Purpose: Creates a function for a circular blending between
51         --          a curve  <C> and a surface  <S>.  The direction of
52         --          the planes are given by <CGuide>.  The position of
53         --          the plane is  determined on  the  curve <C>.   <L>
54         --          defines  the change of  parameter between  <C> and
55         --          <CGuide>.  So, the planes are defined as described
56         --          below :
57         --          t is the current parameter on the guide line.
58         --          Pguide = C(L(t)); Nguide = CGuide'(t)/||CGuide'(t)||
59     
60         returns CSCircular from BlendFunc;
61         
62
63     NbVariables(me)
64     
65         returns Integer from Standard
66         is redefined;
67
68
69     NbEquations(me)
70         ---Purpose: returns the number of equations of the function (3).
71         returns Integer from Standard;
72
73     Value(me: in out; X: Vector; F: out Vector)
74         ---Purpose: computes the values <F> of the Functions for the 
75         --          variable <X>.
76         --          Returns True if the computation was done successfully, 
77         --          False otherwise.
78
79         returns Boolean from Standard;
80     
81     
82     Derivatives(me: in out; X: Vector; D: out Matrix)
83         ---Purpose: returns the values <D> of the derivatives for the 
84         --          variable <X>.
85         --          Returns True if the computation was done successfully, 
86         --          False otherwise.
87
88     returns Boolean from Standard;
89     
90     
91     Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
92         ---Purpose: returns the values <F> of the functions and the derivatives
93         --          <D> for the variable <X>.
94         --          Returns True if the computation was done successfully, 
95         --          False otherwise.
96
97     returns Boolean from Standard;
98
99
100     Set(me: in out; Param: Real from Standard)
101     
102         ;
103             
104     Set(me: in out; First, Last: Real from Standard)
105     ;
106     
107
108     GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
109     
110         ;
111
112
113     GetBounds(me; InfBound,SupBound: out Vector from math)
114     
115         ;
116
117     IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
118     
119         returns Boolean from Standard
120     
121         ;
122
123     PointOnS(me)
124     
125         returns Pnt from gp
126         ---C++: return const&
127         ;
128
129     PointOnC(me)
130     
131         returns Pnt from gp
132         ---C++: return const&
133         ;
134
135
136     Pnt2d(me)
137     
138         ---Purpose: Returns U,V coordinates of the point on the surface.
139     
140         returns Pnt2d from gp
141         ---C++: return const&
142         ;
143
144
145     ParameterOnC(me)
146     
147         ---Purpose: Returns parameter of the point on the curve.
148
149         returns Real from Standard
150         ;
151
152
153     IsTangencyPoint(me)
154     
155         returns Boolean from Standard
156         ;
157
158     TangentOnS(me)
159     
160         returns Vec from gp
161         ---C++: return const&
162         ;
163
164     Tangent2d(me)
165     
166         returns Vec2d from gp
167         ---C++: return const&
168         ;
169
170     TangentOnC(me)
171     
172         returns Vec from gp
173         ---C++: return const&
174         ;
175
176
177     Tangent(me; U,V: Real from Standard;
178                 TgS,NormS: out Vec from gp);
179     
180         ---Purpose: Returns the tangent vector at the section,
181         --          at the beginning and the end of the section, and
182         --          returns the normal (of the surface) at
183         --          these points.
184
185 -- methodes hors template (en plus du create)
186
187     Set(me: in out; Radius : Real from Standard;
188                     Choix: Integer from Standard)
189     
190         is static;
191
192
193     Set(me: in out; TypeSection: SectionShape from BlendFunc)
194         ---Purpose: Sets  the  type  of   section generation   for the
195         --          approximations. 
196         is static;
197
198
199
200     Section(me: in out; Param: Real from Standard;
201                         U,V,W: Real from Standard;
202                         Pdeb,Pfin: out Real from Standard;
203                         C: out Circ from gp)
204         
205         is static;
206
207     Section(me: in out; P: Point from Blend;
208                         Poles     : out Array1OfPnt   from TColgp;
209                         DPoles    : out Array1OfVec   from TColgp;
210                         D2Poles   : out Array1OfVec   from TColgp;
211                         Poles2d   : out Array1OfPnt2d from TColgp;
212                         DPoles2d  : out Array1OfVec2d from TColgp;
213                         D2Poles2d : out Array1OfVec2d from TColgp;
214                         Weigths   : out Array1OfReal  from TColStd;
215                         DWeigths  : out Array1OfReal  from TColStd;
216                         D2Weigths : out Array1OfReal  from TColStd)
217
218         ---Purpose: Used for the first and last section 
219         --          The method returns Standard_True if the derivatives
220         --          are computed, otherwise it returns Standard_False.
221
222         returns Boolean from Standard
223
224         is redefined;    
225
226
227     GetSection(me: in out; Param: Real from Standard;
228                            U,V,W: Real from Standard;
229                            tabP : out Array1OfPnt from TColgp;
230                            tabV : out Array1OfVec from TColgp)
231
232         returns Boolean from Standard
233         
234         is static;
235
236
237 --- Pour les approximations
238
239     IsRational(me) returns Boolean
240         ---Purpose: Returns  if the section is rationnal
241     is static;
242
243     GetSectionSize(me) returns Real
244         ---Purpose:  Returns the length of the maximum section
245     is static;
246     
247     GetMinimalWeight(me; Weigths  : out Array1OfReal  from TColStd)
248         ---Purpose: Compute the minimal value of weight for each poles
249         --          of all sections.
250     is static;
251
252     NbIntervals(me; S : Shape from GeomAbs) returns Integer
253         ---Purpose: Returns  the number  of  intervals for  continuity
254         --          <S>. May be one if Continuity(me) >= <S>
255     is static;
256     
257     Intervals(me; T : in out Array1OfReal from TColStd; 
258                   S : Shape from GeomAbs)
259         ---Purpose: Stores in <T> the  parameters bounding the intervals
260         --          of continuity <S>.
261         --          
262         --          The array must provide  enough room to  accomodate
263         --          for the parameters. i.e. T.Length() > NbIntervals()
264 --    raises
265 --      OutOfRange from Standard 
266     is static;
267
268     GetShape(me: in out;
269                  NbPoles   : out Integer from Standard;
270                  NbKnots   : out Integer from Standard;
271                  Degree    : out Integer from Standard;
272                  NbPoles2d : out Integer from Standard)
273
274         is static;
275         
276     GetTolerance(me; 
277                  BoundTol, SurfTol, AngleTol : Real;
278                  Tol3d : out Vector;
279                  Tol1D : out Vector )
280         ---Purpose: Returns the tolerance to reach in approximation
281         --          to respecte
282         --          BoundTol error at the Boundary
283         --          AngleTol tangent error at the Boundary
284         --          SurfTol error inside the surface.
285         is static;
286
287     Knots(me: in out; TKnots: out Array1OfReal from TColStd)
288     
289         is static;
290
291
292     Mults(me: in out; TMults: out Array1OfInteger from TColStd)
293     
294         is static;
295
296
297     Section(me: in out ; P: Point from Blend;
298                          Poles    : out Array1OfPnt   from TColgp;
299                          DPoles   : out Array1OfVec   from TColgp;
300                          Poles2d  : out Array1OfPnt2d from TColgp;
301                          DPoles2d : out Array1OfVec2d from TColgp;
302                          Weigths  : out Array1OfReal  from TColStd;
303                          DWeigths : out Array1OfReal  from TColStd)
304
305         ---Purpose: Used for the first and last section 
306
307         returns Boolean from Standard
308
309         is static;
310
311
312     Section(me: in out ; P: Point from Blend;
313                          Poles    : out Array1OfPnt   from TColgp;
314                          Poles2d  : out Array1OfPnt2d from TColgp;
315                          Weigths  : out Array1OfReal  from TColStd)
316
317
318         is static;
319
320     Resolution(me; 
321                IC2d : Integer from Standard;
322                Tol  : Real from Standard;
323                TolU, TolV : out Real from Standard);
324
325 fields
326     surf     : HSurface from Adaptor3d;
327     curv     : HCurve from Adaptor3d;
328     guide    : HCurve from Adaptor3d;
329     law      : Function from Law;
330
331     pts      : Pnt     from gp;
332     ptc      : Pnt     from gp;
333     pt2d     : Pnt2d   from gp;
334     prmc     : Real    from Standard;
335     dprmc    : Real    from Standard;
336     istangent: Boolean from Standard;
337     tgs      : Vec     from gp;
338     tg2d     : Vec2d   from gp;
339     tgc      : Vec     from gp;
340
341     ray      : Real    from Standard;
342     choix    : Integer from Standard;
343     d1gui    : Vec     from gp;
344     d2gui    : Vec     from gp;
345     nplan    : Vec     from gp;
346     normtg   : Real    from Standard;
347
348     maxang   : Real    from Standard;
349     minang   : Real    from Standard;    
350     mySShape : SectionShape from BlendFunc;
351     myTConv  : ParameterisationType from Convert;
352
353 end CSCircular;