0021762: Integration of new Boolean Operation algorithm to OCCT.
[occt.git] / src / BOPDS / BOPDS_PaveBlock.cdl
1 -- Created by: Peter KURNEV
2 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
3 --
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
8 --
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 --
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
18
19 class PaveBlock from BOPDS 
20     inherits TShared from MMgt  
21     
22 ---Purpose:  
23 -- The class BOPDS_PaveBlock is to store  
24 -- the information about pave block on an edge. 
25 -- Two adjacent paves on edge make up pave block.    
26
27 uses   
28     Box from Bnd, 
29     BaseAllocator from BOPCol, 
30     MapOfInteger from BOPCol,
31     Pave from BOPDS,
32     ListOfPave from BOPDS, 
33     ListOfPaveBlock from BOPDS,
34     CommonBlock from BOPDS 
35     
36 --raises
37
38 is 
39     Create 
40     returns mutable PaveBlock from BOPDS; 
41     ---Purpose:  
42     --- Empty contructor  
43     --- 
44     Create (theAllocator: BaseAllocator from BOPCol) 
45     returns mutable PaveBlock from BOPDS; 
46     ---Purpose:  
47     ---  Contructor    
48     ---  <theAllocator> - the allocator to manage the memory     
49     --- 
50      
51     SetPave1(me:mutable; 
52         thePave:Pave from BOPDS); 
53     ---Purpose: 
54     --- Modifier   
55     --- Sets the first pave <thePave> 
56      
57     Pave1(me) 
58     returns Pave from BOPDS; 
59     ---C++: return const &     
60     ---Purpose: 
61     --- Selector 
62     --- Returns the first pave           
63      
64     SetPave2(me:mutable; 
65         thePave:Pave from BOPDS); 
66     ---Purpose: 
67     --- Modifier   
68     --- Sets the second pave <thePave>     
69      
70     Pave2(me) 
71     returns Pave from BOPDS; 
72     ---C++: return const &  
73     ---Purpose:  
74     --- Selector 
75     --- Returns the second pave 
76
77     SetEdge(me:mutable; 
78         theEdge:Integer from Standard); 
79     ---Purpose: 
80     --- Modifier   
81     --- Sets the index of edge of pave block <theEdge>      
82     Edge(me) 
83         returns Integer from Standard;  
84     ---Purpose:  
85     --- Selector 
86     --- Returns the index of edge of pave block
87  
88     HasEdge(me) 
89     returns Boolean from Standard; 
90     ---Purpose: 
91     --- Query
92     --- Returns true if the pave block has edge 
93          
94     HasEdge(me; 
95         theEdge:out Integer from Standard) 
96     returns Boolean from Standard; 
97     ---Purpose: 
98     --- Query
99     --- Returns true if the pave block has edge 
100     --- Returns the index of edge <theEdge> 
101         
102     SetOriginalEdge  (me:mutable;   
103         theEdge:Integer from Standard);  
104     ---Purpose: 
105     --- Modifier   
106     --- Sets the index of original edge  
107     --- of the pave block <theEdge>   
108          
109     OriginalEdge(me) 
110     returns Integer from Standard; 
111     ---Purpose:  
112     --- Selector 
113     --- Returns the index of original edge of pave block 
114         
115     IsSplitEdge(me) 
116     returns Boolean from Standard; 
117     ---Purpose: 
118     --- Query
119     --- Returns true if the edge is equal to the original edge   
120     --- of the pave block    
121      
122     Range(me; 
123         theT1:out Real from Standard; 
124         theT2:out Real from Standard);
125     ---Purpose:  
126     --- Selector 
127     --- Returns the parametric range <theT1,theT2>  
128     --- of the pave block  
129      
130     HasSameBounds(me; 
131         theOther: PaveBlock from BOPDS) 
132     returns Boolean from Standard; 
133     ---Purpose: 
134     --- Query
135     --- Returns true if the pave block has pave indices   
136     --- that equal to the  pave indices of the pave block   
137     --- <theOther> 
138          
139     Indices(me; 
140         theIndex1:out Integer from Standard; 
141         theIndex2:out Integer from Standard); 
142     ---Purpose: 
143     --- Selector 
144     --- Returns the pave indices  <theIndex1,theIndex2>  
145     --- of the pave block   
146         
147     -- 
148     -- extras
149     --  
150     IsToUpdate(me) 
151     returns Boolean from Standard; 
152     ---Purpose:  
153     --- Query
154     --- Returns true if the pave block contains extra paves 
155          
156     AppendExtPave(me:mutable; 
157         theLP:Pave from BOPDS);  
158     ---Purpose: 
159     --- Modifier 
160     --- Appends extra paves <theLP> 
161          
162     AppendExtPave1(me:mutable; 
163         thePave:Pave from BOPDS);  
164     ---Purpose: 
165     --- Modifier 
166     --- Appends extra pave <thePave>     
167       
168     ExtPaves(me) 
169     returns ListOfPave from BOPDS; 
170     ---C++: return const &  
171     ---Purpose: 
172     --- Selector 
173     --- Returns the  extra paves 
174     
175     ChangeExtPaves(me:mutable) 
176     returns ListOfPave from BOPDS; 
177     ---C++: return &  
178     ---Purpose: 
179     --- Selector / Modifier
180     --- Returns the extra paves 
181  
182     Update(me:mutable; 
183         theLPB  : out ListOfPaveBlock from BOPDS; 
184         theFlag : Boolean from Standard=Standard_True);
185     ---Purpose: 
186     --- Modifier  
187     --- Updates the pave block. The extra paves are used 
188     --- to create new pave blocks <theLPB>. 
189     --- <theFlag> - if true, the first pave and the second  
190     --- pave are used to produce new pave blocks. 
191          
192     ContainsParameter(me; 
193         thePrm:Real from Standard; 
194         theTol:Real from Standard) 
195     returns Boolean from Standard; 
196     ---Purpose: 
197     --- Query 
198     --- Returns true if the extra paves contain the pave 
199     --- with given value of the parameter <thePrm> 
200     ---  <theTol>  - the value of the tolerance to compare 
201          
202     -- 
203     -- common block   
204     -- 
205     SetCommonBlock(me:mutable; 
206         theCB:CommonBlock from BOPDS); 
207     ---Purpose: 
208     --- Modifier  
209     --- Sets the common block <theCB> 
210          
211     CommonBlock(me) 
212     returns CommonBlock from BOPDS;     
213     ---C++: return const & 
214     ---Purpose: 
215     --- Selector  
216     --- Returns the common block 
217          
218     IsCommonBlock(me) 
219     returns Boolean from Standard; 
220     ---Purpose: 
221     --- Query 
222     --- Returns true if the pave block is common block    
223      
224     IsCommonBlockOnEdge(me)  
225     returns Boolean from Standard;       
226     ---Purpose: 
227     --- Query 
228     --- Returns true if the pave block is common block 
229     --- that contains at least one pave block  
230          
231     RealPaveBlock(me) 
232     returns PaveBlock from BOPDS;  
233     ---C++: return const &  
234     ---Purpose: 
235     --- Selector  
236     --- Returns the real common block  
237     -- 
238     -- shrunk data   
239     -- 
240     SetShrunkData(me:mutable;  
241         theTS1:Real from Standard;
242         theTS2:Real from Standard;
243         theBox:Box from Bnd);  
244     ---Purpose: 
245     --- Modifier  
246     --- Sets the shrunk data for the pave block 
247     --- <theTS1>,  <theTS2> - shrunk range 
248     --- <theBox> - the bounding box 
249          
250     ShrunkData(me; 
251         theTS1:out Real from Standard;
252         theTS2:out Real from Standard;  
253         theBox:out Box from Bnd);
254     ---Purpose: 
255     --- Selector
256     --- Returns  the shrunk data for the pave block 
257     --- <theTS1>,  <theTS2> - shrunk range 
258     --- <theBox> - the bounding box  
259         
260     HasShrunkData(me) 
261     returns Boolean from Standard; 
262     ---Purpose: 
263     --- Query 
264     --- Returns true if the pave block contains 
265     --- the shrunk data 
266      
267     Dump(me);
268
269
270 fields 
271     --general 
272     myAllocator : BaseAllocator from BOPCol is protected; 
273     myEdge         :  Integer from Standard is protected; 
274     myOriginalEdge :  Integer from Standard is protected;
275     myPave1        :  Pave from BOPDS is protected;
276     myPave2        :  Pave from BOPDS is protected;
277     --extras 
278     myExtPaves     :  ListOfPave from BOPDS is protected; 
279     --common block 
280     myCommonBlock  :  CommonBlock from BOPDS is protected; 
281     --shrunk data  
282     myTS1          :  Real from Standard is protected;     
283     myTS2          :  Real from Standard is protected;   
284     myShrunkBox    :  Box   from Bnd is protected;  
285     --dummies
286     myPB           :  PaveBlock from  BOPDS  is protected; 
287     myMFence       :  MapOfInteger from BOPCol is protected;   
288  
289 end PaveBlock;
290