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