0024162: Eliminate CLang compiler warning
[occt.git] / src / GeomFill / GeomFill_CircularBlendFunc.cdl
1 -- Created on: 1997-07-11
2 -- Created by: Philippe MANGIN
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
23 private  class CircularBlendFunc from GeomFill  
24          inherits SweepFunction from  Approx 
25
26         ---Purpose:   Circular     Blend Function  to    approximate by
27         --            SweepApproximation from Approx
28
29 uses
30  HCurve            from Adaptor3d, 
31  BSplineCurve  from  Geom, 
32  ParameterisationType  from  Convert, 
33
34  Array1OfPnt       from TColgp,
35  Array1OfVec       from TColgp,
36  Array1OfPnt2d     from TColgp,
37  Array1OfVec2d     from TColgp,
38  Array1OfReal      from TColStd, 
39  Array1OfInteger   from TColStd,  
40  Shape             from GeomAbs, 
41  Pnt               from gp
42  
43 raises  OutOfRange  from  Standard
44
45 is   
46     
47   Create( Path    : HCurve from Adaptor3d;
48           Curve1  : HCurve from Adaptor3d;
49           Curve2  : HCurve from Adaptor3d;
50           Radius  : Real from Standard; 
51           Polynomial  :  Boolean  =  Standard_False)
52           ---Purpose:   Create a Blend  with a  constant  radius with 2
53           --          guide-line.   <FShape>  sets the type of  fillet
54           --           surface. The --  default value is  Convert_TgtThetaOver2 (classical --
55           --              nurbs    --   representation  of   circles).
56           --          ChFi3d_QuasiAngular  --  corresponds  to a nurbs
57           --             representation   of  circles     --     which
58           --          parameterisation  matches  the  circle  one.  --
59           --          ChFi3d_Polynomial corresponds to a polynomial --
60           --          representation of circles.
61   returns CircularBlendFunc from GeomFill;      
62 -- -- 
63 --           To compute Sections and derivatives Sections
64 -- 
65 --  
66
67    D0(me : mutable; 
68       Param: Real;
69       First, Last : Real; 
70       Poles    : out Array1OfPnt   from TColgp;
71       Poles2d  : out Array1OfPnt2d from TColgp;
72       Weigths  : out Array1OfReal  from TColStd)
73       ---Purpose: compute the section for v = param           
74    returns Boolean  is  redefined;
75         
76    D1(me : mutable;
77       Param: Real;
78       First, Last : Real; 
79       Poles    : out Array1OfPnt   from TColgp;
80       DPoles   : out Array1OfVec   from TColgp;
81       Poles2d  : out Array1OfPnt2d from TColgp;
82       DPoles2d : out Array1OfVec2d from TColgp;
83       Weigths  : out Array1OfReal  from TColStd;
84       DWeigths : out Array1OfReal  from TColStd)
85       ---Purpose: compute the first  derivative in v direction  of the
86       --           section for v =  param 
87    returns Boolean  
88    is  redefined; 
89    
90     D2(me : mutable;
91       Param: Real;
92       First, Last : Real; 
93       Poles     : out Array1OfPnt   from TColgp;
94       DPoles    : out Array1OfVec   from TColgp;
95       D2Poles   : out Array1OfVec   from TColgp;
96       Poles2d   : out Array1OfPnt2d from TColgp;
97       DPoles2d  : out Array1OfVec2d from TColgp;
98       D2Poles2d : out Array1OfVec2d from TColgp;
99       Weigths   : out Array1OfReal  from TColStd;
100       DWeigths  : out Array1OfReal  from TColStd;
101       D2Weigths : out Array1OfReal  from TColStd)      
102       ---Purpose: compute the second derivative  in v direction of the
103       --          section  for v = param  
104    returns Boolean 
105    is  redefined; 
106     
107 -- 
108 --               General Information On The Function
109 --                                         
110        
111    Nb2dCurves(me)     
112      ---Purpose: get the number of 2d curves to  approximate.
113    returns Integer  is  redefined;  
114
115    SectionShape(me; NbPoles   : out Integer from Standard;
116                     NbKnots   : out Integer from Standard;
117                     Degree    : out Integer from Standard) 
118         ---Purpose: get the format of an  section
119     is  redefined;  
120     
121     Knots(me; TKnots: out Array1OfReal from TColStd)
122         ---Purpose: get the Knots of the section 
123         is redefined;
124
125
126     Mults(me; TMults: out Array1OfInteger from TColStd)
127         ---Purpose: get the Multplicities of the section          
128         is redefined;   
129
130
131     IsRational(me)
132         ---Purpose: Returns if the section is rationnal or not         
133     returns Boolean  is redefined; 
134
135      
136      
137 --
138 --                Mangement  of  continuity
139 --                
140   
141     NbIntervals(me; S : Shape from GeomAbs) 
142         ---Purpose: Returns  the number  of  intervals for  continuity
143         --          <S>. May be one if Continuity(me) >= <S>
144    returns Integer  is  redefined;
145
146    Intervals(me; T : in out Array1OfReal from TColStd; 
147                  S : Shape from GeomAbs)
148         ---Purpose: Stores in <T> the  parameters bounding the intervals
149         --          of continuity <S>.
150         --          
151         --          The array must provide  enough room to  accomodate
152         --          for the parameters. i.e. T.Length() > NbIntervals()
153     raises
154         OutOfRange from Standard 
155     is redefined;  
156      
157         
158    SetInterval(me: mutable; First, Last: Real from Standard)    
159         ---Purpose: Sets the bounds of the parametric interval on 
160         --          the fonction
161         --          This determines the derivatives in these values if the
162         --          function is not Cn.
163         is redefined; 
164    
165
166 --
167 --                      To  help  computation  of  Tolerance
168 --
169 --      Evaluation of error, in 2d space, or  on rational function, is
170 --      dificult.  The folowing methodes can help 
171 --      
172 --      
173      
174  
175    GetTolerance(me;  
176                 BoundTol, SurfTol, AngleTol : Real;
177                 Tol3d : out Array1OfReal)
178         ---Purpose: Returns the tolerance to reach in approximation
179         --          to respecte
180         --          BoundTol error at the Boundary
181         --          AngleTol tangent error at the Boundary (in radian)
182         --          SurfTol error inside the surface.         
183   is  redefined;
184  
185   SetTolerance(me :  mutable; Tol3d,  Tol2d  :  Real) 
186         ---Purpose: Is usfull, if (me) have to  be run numerical
187         --           algorithme to perform D0, D1 or D2
188   is  redefined;
189    
190    BarycentreOfSurf(me) 
191    ---Purpose:  Get    the   barycentre of   Surface.   An   very  poor
192    --          estimation is sufficent. This information is usefull
193    --          to perform well conditionned rational approximation.        
194
195    --  Warning: Used only if <me> IsRational         
196    returns Pnt from gp      
197    is  redefined; 
198       
199         
200    MaximalSection(me) returns Real
201         ---Purpose: Returns the   length of the maximum section. This
202         --          information is usefull to perform well conditionned rational
203         --           approximation. 
204
205         --  Warning: Used only if <me> IsRational           
206    is redefined;
207     
208    GetMinimalWeight(me; Weigths  : out Array1OfReal  from TColStd)
209         ---Purpose: Compute the minimal value of weight for each poles
210         --          of all  sections.  This information is  usefull to
211         --          perform well conditionned rational approximation.      
212
213         --  Warning: Used only if <me> IsRational           
214    is redefined;   
215    
216 --             Private methods  
217     Discret(me:mutable) 
218     is  private; 
219
220 fields  
221  myBary     :  Pnt   from  gp;   
222   
223  myRadius   :  Real;
224  maxang     :  Real; 
225  minang     :  Real; 
226  distmin    :  Real;   
227  
228  myPath      : HCurve  from  Adaptor3d; 
229  myCurve1    : HCurve  from  Adaptor3d;  
230  myCurve2    : HCurve  from  Adaptor3d; 
231  myTPath    :  HCurve  from  Adaptor3d; 
232  myTCurve1  :  HCurve  from  Adaptor3d;  
233  myTCurve2  :  HCurve  from  Adaptor3d;  
234    
235  myDegree   :  Integer;  
236  myNbKnots  :  Integer; 
237  myNbPoles  :  Integer;
238  
239  myTConv    :  ParameterisationType  from  Convert; 
240  myreverse  :  Boolean; 
241
242
243 end CircularBlendFunc;