Salome HOME
NPAL15230: Too much memory allocation.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Builder.cdl
1 -- Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 -- 
4 -- This library is free software; you can redistribute it and/or
5 -- modify it under the terms of the GNU Lesser General Public
6 -- License as published by the Free Software Foundation; either 
7 -- version 2.1 of the License.
8 -- 
9 -- This library is distributed in the hope that it will be useful 
10 -- but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 -- Lesser General Public License for more details.
13 --
14 -- You should have received a copy of the GNU Lesser General Public  
15 -- License along with this library; if not, write to the Free Software 
16 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 --
18 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 --  
20 -- File:        GEOMAlgo_Builder.cdl
21 -- Created:     
22 -- Author:      Peter KURNEV
23
24
25 class Builder from GEOMAlgo 
26         inherits BuilderShape from GEOMAlgo 
27         
28         ---Purpose:   
29
30 uses  
31     ShapeEnum from TopAbs,
32     Shape     from TopoDS, 
33      
34     ListOfShape                      from TopTools, 
35     IndexedDataMapOfShapeListOfShape from TopTools, 
36     IndexedDataMapOfShapeShape       from TopTools,   
37     MapOfShape                       from TopTools,
38     Image     from BRepAlgo, 
39     
40     DSFiller  from NMTTools,
41     PDSFiller from NMTTools
42     
43 --raises
44
45 is
46  
47     Create 
48         ---Purpose:  Empty constructor     
49         returns Builder from GEOMAlgo;  
50     ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Builder();" 
51
52     Perform(me:out) 
53         ---Purpose:  Performs calculations     
54         is redefined; 
55          
56     PerformWithFiller(me:out; 
57         theDSF: DSFiller from NMTTools) 
58         ---Purpose:  Performs calculations using prepared DSFiller 
59         --           object theDSF               
60         is virtual;
61    
62     AddShape (me:out;  
63             theShape: Shape from TopoDS) 
64         ---Purpose:  Adds argument theShape of the operation                         
65         is virtual;
66
67     Clear(me:out) 
68         ---Purpose:  Clears internal fields and arguments             
69         is virtual;  
70     
71     Shapes(me) 
72         ---Purpose:  Returns the arguments of the operation       
73         returns ListOfShape from TopTools;  
74     ---C++: return const &   
75     --
76     --  History  support 
77     --
78     Generated (me:out;  
79             theS : Shape from TopoDS)
80         ---Purpose: Returns the  list of shapes generated from the
81         --          shape theS. 
82         returns ListOfShape from TopTools
83         is redefined;
84         ---C++: return const & 
85
86     Modified (me:out;  
87             theS : Shape from TopoDS)
88         ---Purpose: Returns the list of shapes modified from the shape
89         --          theS. 
90         returns ListOfShape from TopTools
91         is redefined;
92         ---C++: return const &  
93
94     IsDeleted (me:out;  
95             theS : Shape from TopoDS) 
96         ---Purpose: Returns true if the shape theS has been deleted.
97         returns Boolean from Standard  
98         is redefined; 
99     -- 
100     --    protected methods  
101     --  
102     -- 
103     PerformInternal(me:out; 
104         theDSF: DSFiller from NMTTools) 
105         ---Purpose:  Performs calculations using prepared DSFiller 
106         --           object theDSF               
107         is protected; 
108     --
109     PrepareHistory (me:out) 
110         ---Purpose:  Prepare information for history support  
111         is redefined protected;  
112         
113     ClearInternals(me:out) 
114         ---Purpose:  Clears internal fields     
115         is virtual protected;  
116       
117     Prepare(me:out)  
118         ---Purpose:  Provides preparing actions  
119         is virtual protected;   
120          
121     PostTreat(me:out)  
122         ---Purpose:  Provides post-tratment actions  
123         is virtual protected;
124      
125     AddShape1 (me:out;  
126             theShape: Shape from TopoDS) 
127         ---Purpose:  Append the argument theShape to  
128         --           typified lists of arguments myShapes1   
129         is protected; 
130  
131     BuildResult(me:out; 
132             theType: ShapeEnum from TopAbs) 
133         ---Purpose: Build the resulting shapes of type theType      
134         is virtual protected;  
135         
136     --  Vertices 
137     FillImagesVertices(me:out)  
138         ---Purpose: Fill Images for vertices   
139         is protected; 
140          
141     --  Edges 
142     FillImagesEdges(me:out) 
143         ---Purpose: Fill Images for edges  
144         is protected; 
145     -- 
146     --  Faces 
147     FillImagesFaces(me:out)  
148         ---Purpose: Fill Images for faces 
149         is protected; 
150  
151     FillIn2DParts(me:out)  
152         ---Purpose: For each interferred face find split edges 
153         --          that are in 2-D domain of the face           
154         is protected; 
155           
156     BuildSplitFaces(me:out)  
157         ---Purpose: Build draft faces    
158         is protected; 
159          
160     FillSameDomainFaces(me:out)  
161         ---Purpose: Among draft faces find same domain faces 
162         is protected; 
163  
164     FillImagesFaces1(me:out) 
165         ---Purpose: Fill Images for faces  
166         --          taking into account same domain faces        
167         is protected;  
168         
169     FillInternalVertices(me:out)  
170         ---Purpose: Update Images for faces by  
171         --          internal vertices    
172         is protected;  
173     -- 
174     --  Wires, Shells, Compsolids, Compounds
175     FillImagesContainers(me:out; 
176             theType:ShapeEnum from TopAbs) 
177         ---Purpose:  Fill Images for Wires, Shells, Compsolids, Compounds        
178         is protected;   
179     -- 
180     --  Solids  
181     FillImagesSolids(me:out)  
182         ---Purpose:  Fill Images for solids
183         is protected;  
184          
185     FillIn3DParts(me:out) 
186         ---Purpose: For each interferred solid find split faces 
187         --          that are in 3-D domain of the solid   
188         is protected; 
189  
190     BuildSplitSolids(me:out) 
191         ---Purpose: Build draft solids   
192         is protected; 
193          
194     FillInternalShapes(me:out)  
195         ---Purpose:  Update draft solids by 
196         --           internal shells, edges, vertices                                
197         is protected;  
198          
199     BuildDraftSolid(me:out; 
200             theSolid: Shape from TopoDS; 
201             theDraftSolid: out Shape from TopoDS; 
202             theInternalFaces: out ListOfShape from TopTools)  
203         ---Purpose:  Build solid theDraftSolid that consists of  
204         --           non-internal split faces of the solid   
205         --           theSolid.  
206         --           All splits of internal faces of 
207         --           theSolid are in the list: theInternalFaces          
208         is protected;   
209     -- 
210     --  debug  methods  
211     --
212     AddCompound (me:out;  
213             theShape: Shape from TopoDS); 
214         ---Purpose:  Adds arguments of the operation as  
215         --           shapes of upper level of container shape theShape            
216     Shapes1(me; 
217             theType: Integer from Standard) 
218         ---Purpose: Returns list of arguments of type theType                
219         returns ListOfShape from TopTools; 
220     ---C++: return const & 
221      
222     Images(me)  
223         ---Purpose: Returns image shapes    
224         returns Image from BRepAlgo; 
225     ---C++: return const &  
226
227     InParts(me; 
228             theShape:Shape from TopoDS)  
229         ---Purpose: Returns split-parts of shapes that have  
230         --          state IN for the domain of shape theShape            
231         returns ListOfShape from TopTools; 
232     ---C++: return const &  
233  
234     -- =====================================================
235  
236 fields 
237     myDSFiller        : PDSFiller from NMTTools is protected;  
238     myShapes          : ListOfShape from TopTools is protected; 
239     -- Common usage 
240     myNbTypes         : Integer from Standard is protected; 
241     myMapFence        : MapOfShape from TopTools is protected;        
242     myShapes1         : ListOfShape from TopTools[9] is protected; 
243     myImages          : Image from BRepAlgo is protected;  
244     myInParts         : IndexedDataMapOfShapeListOfShape from TopTools is protected; 
245      
246     -- Faces
247     mySplitFaces      : Image from BRepAlgo is protected;  
248     mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected;
249     --  solids 
250     myDraftSolids     : IndexedDataMapOfShapeShape from TopTools is protected; 
251     myEntryPoint      : Integer from Standard is protected;    
252     --     
253 end Builder;
254