Salome HOME
42eb89e86e5e1c94ceb9afcede91548f84f63650
[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     PrepareHistory (me:out) 
103         ---Purpose:  Prepare information for history support  
104         is redefined protected;  
105         
106     ClearInternals(me:out) 
107         ---Purpose:  Clears internal fields     
108         is virtual protected;  
109       
110     Prepare(me:out)  
111         ---Purpose:  Provides preparing actions  
112         is virtual protected;   
113          
114     PostTreat(me:out)  
115         ---Purpose:  Provides post-tratment actions  
116         is virtual protected;
117      
118     AddShape1 (me:out;  
119             theShape: Shape from TopoDS) 
120         ---Purpose:  Append the argument theShape to  
121         --           typified lists of arguments myShapes1   
122         is protected; 
123  
124     BuildResult(me:out; 
125             theType: ShapeEnum from TopAbs) 
126         ---Purpose: Build the resulting shapes of type theType      
127         is virtual protected;  
128         
129     --  Vertices 
130     FillImagesVertices(me:out)  
131         ---Purpose: Fill Images for vertices   
132         is protected; 
133          
134     --  Edges 
135     FillImagesEdges(me:out) 
136         ---Purpose: Fill Images for edges  
137         is protected; 
138     -- 
139     --  Faces 
140     FillImagesFaces(me:out)  
141         ---Purpose: Fill Images for faces 
142         is protected; 
143  
144     FillIn2DParts(me:out)  
145         ---Purpose: For each interferred face find split edges 
146         --          that are in 2-D domain of the face           
147         is protected; 
148           
149     BuildSplitFaces(me:out)  
150         ---Purpose: Build draft faces    
151         is protected; 
152          
153     FillSameDomainFaces(me:out)  
154         ---Purpose: Among draft faces find same domain faces 
155         is protected; 
156  
157     FillImagesFaces1(me:out) 
158         ---Purpose: Fill Images for faces  
159         --          taking into account same domain faces        
160         is protected;  
161         
162     FillInternalVertices(me:out)  
163         ---Purpose: Update Images for faces by  
164         --          internal vertices    
165         is protected;  
166     -- 
167     --  Wires, Shells, Compsolids, Compounds
168     FillImagesContainers(me:out; 
169             theType:ShapeEnum from TopAbs) 
170         ---Purpose:  Fill Images for Wires, Shells, Compsolids, Compounds        
171         is protected;   
172     -- 
173     --  Solids  
174     FillImagesSolids(me:out)  
175         ---Purpose:  Fill Images for solids
176         is protected;  
177          
178     FillIn3DParts(me:out) 
179         ---Purpose: For each interferred solid find split faces 
180         --          that are in 3-D domain of the solid   
181         is protected; 
182  
183     BuildSplitSolids(me:out) 
184         ---Purpose: Build draft solids   
185         is protected; 
186          
187     FillInternalShapes(me:out)  
188         ---Purpose:  Update draft solids by 
189         --           internal shells, edges, vertices                                
190         is protected;  
191          
192     BuildDraftSolid(me:out; 
193             theSolid: Shape from TopoDS; 
194             theDraftSolid: out Shape from TopoDS; 
195             theInternalFaces: out ListOfShape from TopTools)  
196         ---Purpose:  Build solid theDraftSolid that consists of  
197         --           non-internal split faces of the solid   
198         --           theSolid.  
199         --           All splits of internal faces of 
200         --           theSolid are in the list: theInternalFaces          
201         is protected;   
202     -- 
203     --  debug  methods  
204     --
205     AddCompound (me:out;  
206             theShape: Shape from TopoDS); 
207         ---Purpose:  Adds arguments of the operation as  
208         --           shapes of upper level of container shape theShape            
209     Shapes1(me; 
210             theType: Integer from Standard) 
211         ---Purpose: Returns list of arguments of type theType                
212         returns ListOfShape from TopTools; 
213     ---C++: return const & 
214      
215     Images(me)  
216         ---Purpose: Returns image shapes    
217         returns Image from BRepAlgo; 
218     ---C++: return const &  
219
220     InParts(me; 
221             theShape:Shape from TopoDS)  
222         ---Purpose: Returns split-parts of shapes that have  
223         --          state IN for the domain of shape theShape            
224         returns ListOfShape from TopTools; 
225     ---C++: return const &  
226  
227     -- =====================================================
228  
229 fields 
230     myDSFiller        : PDSFiller from NMTTools is protected;  
231     myShapes          : ListOfShape from TopTools is protected; 
232     -- Common usage 
233     myNbTypes         : Integer from Standard is protected; 
234     myMapFence        : MapOfShape from TopTools is protected;        
235     myShapes1         : ListOfShape from TopTools[9] is protected; 
236     myImages          : Image from BRepAlgo is protected;  
237     myInParts         : IndexedDataMapOfShapeListOfShape from TopTools is protected; 
238      
239     -- Faces
240     mySplitFaces      : Image from BRepAlgo is protected;  
241     mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected;
242     --  solids 
243     myDraftSolids     : IndexedDataMapOfShapeShape from TopTools is protected; 
244     
245     --     
246 end Builder;
247