Integration of OCCT 6.5.0 from SVN
[occt.git] / src / GeomFill / GeomFill_LocationLaw.cdl
1 -- File:        GeomFill_LocationLaw.cdl
2 -- Created:     Thu Nov 20 17:53:46 1997
3 -- Author:      Philippe MANGIN
4 --              <pmn@sgi29>
5 ---Copyright:    Matra Datavision 1997
6
7
8 deferred  class LocationLaw from GeomFill inherits TShared from MMgt 
9
10         ---Purpose: To define location  law in Sweeping location is --
11         --          defined   by an  Matrix  M and  an Vector  V,  and
12         --          transform an point P in MP+V.          
13                   
14
15 uses  
16     HCurve from  Adaptor3d,
17     Mat  from  gp, 
18     Vec  from  gp, 
19     Pnt  from  gp, 
20     Shape  from  GeomAbs,
21     Array1OfReal   from TColStd,
22     Array1OfPnt2d  from TColgp, 
23     Array1OfVec2d  from TColgp, 
24     PipeError      from GeomFill,   
25     Shape          from GeomAbs 
26         
27 raises   
28     NotImplemented,  OutOfRange
29
30 is   
31    SetCurve(me : mutable;  C  :  HCurve  from  Adaptor3d) 
32    is  deferred; 
33
34    GetCurve(me)   
35    returns HCurve  from  Adaptor3d  
36     ---C++: return const &      
37    is  deferred;
38    
39    SetTrsf(me  :  mutable;  Transfo  :  Mat  from  gp) 
40    ---Purpose:  Set a transformation Matrix like   the law M(t) become
41    --          Mat * M(t)         
42    is  deferred;    
43
44    Copy(me)   
45     returns  LocationLaw  from  GeomFill          
46     is  deferred;
47    
48 -- 
49 --========== To compute Location and derivatives Location
50 --              
51               
52    D0(me : mutable; 
53       Param: Real;
54       M    : out  Mat  from  gp; 
55       V    : out  Vec  from  gp)
56       ---Purpose: compute Location        
57    returns Boolean  is  deferred; 
58     
59    D0(me : mutable; 
60       Param: Real;
61       M    : out  Mat  from  gp; 
62       V    : out  Vec  from  gp;
63       Poles2d  : out Array1OfPnt2d from TColgp)
64       ---Purpose: compute Location and 2d points        
65    returns Boolean  is  deferred;
66         
67    D1(me : mutable;
68       Param: Real;
69       M    : out  Mat  from  gp; 
70       V    : out  Vec  from  gp; 
71       DM   : out  Mat  from  gp; 
72       DV   : out  Vec  from  gp;             
73       Poles2d  : out Array1OfPnt2d from TColgp;
74       DPoles2d : out Array1OfVec2d from TColgp)
75       ---Purpose: compute location 2d  points and  associated
76       --          first derivatives.         
77       --  Warning : It used only for C1 or C2 aproximation
78    returns Boolean  
79    raises  NotImplemented 
80    is  virtual; 
81    
82    D2(me : mutable;
83       Param: Real;
84       M    : out  Mat  from  gp; 
85       V    : out  Vec  from  gp; 
86       DM   : out  Mat  from  gp; 
87       DV   : out  Vec  from  gp;  
88       D2M  : out  Mat  from  gp; 
89       D2V  : out  Vec  from  gp; 
90       Poles2d   : out Array1OfPnt2d from TColgp;
91       DPoles2d  : out Array1OfVec2d from TColgp;
92       D2Poles2d : out Array1OfVec2d from TColgp)      
93       ---Purpose: compute location 2d  points and associated
94       --          first and seconde  derivatives.
95       --  Warning : It used only for C2 aproximation
96    returns Boolean
97    raises  NotImplemented  
98    is  virtual;
99     
100 -- 
101 --   ================== General Information On The Function  ==================
102 --                                         
103    Nb2dCurves(me)     
104      ---Purpose:   get the number of  2d  curves (Restrictions  +  Traces)
105      --            to approximate.
106    returns Integer  is static; 
107     
108    HasFirstRestriction(me) 
109     ---Purpose: Say if the first restriction is defined in this class.
110     --           If it  is true the  first element  of poles array   in
111     --          D0,D1,D2... Correspond to this restriction.
112     --  Returns Standard_False (default implementation) 
113    returns  Boolean 
114    is  virtual;
115     
116    HasLastRestriction(me) 
117     ---Purpose: Say if the last restriction is defined in this class.
118     --           If it is  true the  last element  of poles array in
119     --          D0,D1,D2... Correspond to this restriction.
120     --          Returns Standard_False (default implementation)   
121    returns  Boolean
122    is  virtual;
123     
124    TraceNumber(me) 
125    ---Purpose: Give the number of trace (Curves 2d wich are not restriction)
126    --          Returns 0 (default implementation)   
127    returns  Integer 
128    is  virtual;   
129
130    ErrorStatus(me)   
131    ---Purpose:Give a status to the Law              
132    --          Returns PipeOk (default implementation) 
133    returns  PipeError  from  GeomFill 
134    is  virtual;
135     
136 --
137 --  =================== Management  of  continuity  ===================
138 --                 
139     NbIntervals(me; S : Shape from GeomAbs) 
140         ---Purpose: Returns  the number  of  intervals for  continuity
141         --          <S>. 
142         --          May be one if Continuity(me) >= <S>
143    returns Integer  is  deferred;
144
145    Intervals(me; T : in out Array1OfReal from TColStd; 
146                  S : Shape from GeomAbs)
147         ---Purpose: Stores in <T> the  parameters bounding the intervals
148         --          of continuity <S>.
149         --          
150         --          The array must provide  enough room to  accomodate
151         --          for the parameters. i.e. T.Length() > NbIntervals()
152     raises
153         OutOfRange from Standard 
154     is deferred;  
155      
156         
157    SetInterval(me: mutable; First, Last: Real from Standard)    
158         ---Purpose: Sets the bounds of the parametric interval on 
159         --          the function
160         --          This determines the derivatives in these values if the
161         --          function is not Cn.
162         is deferred; 
163    
164     GetInterval(me; First, Last: out  Real from Standard)    
165         ---Purpose: Gets the bounds of the parametric interval on 
166         --          the function
167         is deferred;  
168          
169     GetDomain(me; First, Last: out  Real from Standard)  
170         ---Purpose: Gets the bounds of the function parametric domain.
171         --  Warning: This domain it is  not modified by the
172         --          SetValue method         
173         is  deferred;
174     
175 --  ===================  To help   computation of  Tolerance   ===============
176 --  
177 --  Evaluation of error,  in  2d space,  or  on composed function,  is
178 --  difficult.  The  following methods can  help the  approximation to
179 --  make good evaluation and use good tolerances.
180 --      
181 --      It is not necessary for the following informations to be very
182 --      precise. A fast evaluation is sufficient.
183      
184    Resolution(me;   
185               Index       :  Integer  from  Standard;
186               Tol         : Real from Standard;   
187               TolU,  TolV :  out Real  from Standard)    
188     ---Purpose: Returns the resolutions in the  sub-space 2d <Index>
189     --          This information is usfull to find an good tolerance in
190     --          2d approximation.              
191     ---Warning: Used only if Nb2dCurve > 0          
192   raises  NotImplemented   
193   is virtual;
194                
195   SetTolerance(me :  mutable; Tol3d, Tol2d : Real)
196         ---Purpose: Is usefull, if (me) have to run numerical
197         --          algorithm to perform D0, D1 or D2        
198         -- The default implementation make nothing.
199   is  virtual;  
200    
201   GetMaximalNorm(me  :  mutable)
202     ---Purpose:  Get the maximum Norm  of the matrix-location part.  It
203     --           is usful to find an good Tolerance to approx M(t).  
204   returns Real
205   is  deferred;  
206    
207   GetAverageLaw(me  :  mutable;   
208                 AM: out Mat  from  gp;   
209                 AV: out Vec  from  gp) 
210      ---Purpose: Get average value of M(t) and V(t) it is usfull to 
211      --          make fast approximation of rational surfaces.        
212   is  deferred; 
213
214 -- 
215 -- To find elementary sweep
216 -- 
217  
218   IsTranslation(me;  Error  :  out  Real)  
219   ---Purpose: Say if the Location  Law, is an translation of  Location
220    -- The default implementation is " returns False ". 
221   returns  Boolean
222   is  virtual;
223      
224   IsRotation(me;  Error  :  out  Real) 
225    ---Purpose: Say if the Location  Law, is a rotation of Location
226     -- The default implementation is " returns False ".  
227   returns  Boolean 
228   is  virtual; 
229    
230      
231   Rotation(me; Center  :  out  Pnt  from  gp) 
232   raises  NotImplemented 
233   is  virtual; 
234
235 end LocationLaw;
236
237
238
239
240