f6f4b2ad41b1446000caa6114888f75de266bfec
[occt.git] / src / BRepAlgoAPI / BRepAlgoAPI_BooleanOperation.cdl
1 -- File:        BRepAlgoAPI_BooleanOperation.cdl
2 -- Created:     Thu Oct 14 18:14:43 1993
3 -- Author:      Remi LEQUETTE
4 -- modified by  Peter KURNEV   Tue Mar  5 14:01:51 2002
5 ---Copyright:    Matra Datavision 1993
6
7 deferred class BooleanOperation from BRepAlgoAPI
8     inherits MakeShape from BRepBuilderAPI
9
10         ---Purpose: The abstract class BooleanOperation is the root
11         -- class of Boolean Operations (see Overview).
12         -- Boolean Operations algorithm is divided onto two parts.
13         -- -      The first one is computing interference between arguments.
14         -- -      The second one is building the result of operation.
15         -- The BooleanOperation class provides execution of both parts
16         -- of the Boolean Operations algorithm. The second part
17         -- (building the result) depends on given type of the Boolean
18         -- Operation (see Constructor).
19   
20 uses
21
22     Shape       from TopoDS,
23     ListOfShape from TopTools,
24     Operation   from BOP,  
25     PBuilder    from BOP,            
26     HistoryCollector from BOP,
27     PDSFiller from BOPTools, 
28     DSFiller from BOPTools, 
29     DataMapOfIntegerListOfShape  from  TopTools, 
30     DataMapOfIntegerShape  from  TopTools,
31     DataMapOfShapeShape  from  TopTools 
32     
33 is
34
35     Initialize (S1 :Shape from TopoDS; 
36                 S2 :Shape from TopoDS; 
37                 anOperation:Operation from BOP);
38         ---Purpose: Prepares the operations for S1 and S2.
39      
40     Initialize (S1   :Shape from TopoDS; 
41                 S2   :Shape from TopoDS; 
42                 aDSF :DSFiller from BOPTools;                                                                
43                 anOperation:Operation from BOP); 
44         ---Purpose: Prepares the operations for S1 and S2.
45
46     SetOperation (me:out; 
47             anOp:  Operation from BOP); 
48         ---Purpose:  Sets the type of Boolean operation to perform      
49         ---          It can be BOP_SECTION 
50         ---                    BOP_COMMON 
51         ---                    BOP_FUSE 
52         ---                    BOP_CUT 
53         ---                    BOP_CUT21 
54         --- 
55          
56
57     Build  (me:out) 
58         is redefined virtual; 
59         ---Purpose: Provides the algorithm of Boolean Operations
60         -- -      Filling interference Data Structure (if it is necessary)
61         -- -      Building the result of the operation.
62     
63     Shape1(me)  
64         returns Shape from TopoDS 
65         is static;
66         ---Purpose: Returns the first shape involved in this Boolean operation.
67         ---C++: return const &
68
69     Shape2(me)  
70         returns Shape from TopoDS 
71         is static;
72         ---Purpose: Returns the second shape involved in this Boolean operation.
73         ---C++: return const &
74      
75     Operation  (me) 
76         returns Operation from BOP;
77         ---Purpose: Returns the type of Boolean Operation that has been performed.  
78          
79     FuseEdges(me)  returns  Boolean  from  Standard;
80         ---Purpose: Returns the flag of edge refining
81      
82     RefineEdges(me:out);
83         ---Purpose: Fuse C1 edges
84
85     PrepareFiller(me:out) 
86         returns Boolean from Standard 
87         is  protected;   
88          
89  
90         ---Category: Querying
91     BuilderCanWork(me)  
92         returns Boolean from Standard;
93
94     ErrorStatus(me) 
95         returns Integer from Standard; 
96         ---Purpose:  Returns the error status of operation.  
97         --- 0 - Ok
98         --- 1 - The Object is created but Nothing is Done 
99         --- 2 - Null source shapes is not allowed
100         --- 3 - Check types of the arguments
101         --- 4 - Can not allocate memory for the DSFiller
102         --- 5 - The Builder can not work with such types of arguments
103         --- 6 - Unknown operation is not allowed 
104         --- 7 - Can not allocate memory for the Builder
105         --  > 100 - See the Builder's  ErrorStatus
106
107     Modified (me: in out;  
108             aS : Shape from TopoDS) 
109         returns ListOfShape from TopTools
110         is redefined virtual;
111         ---Purpose: Returns the list  of shapes modified from the shape <S>. 
112         ---C++: return const & 
113
114     IsDeleted (me: in out;  
115             aS : Shape from TopoDS)
116         returns Boolean
117         is redefined virtual;
118         ---Purpose: Returns true if the shape S has been deleted. The
119         -- result shape of the operation does not contain the shape S.
120         
121     Modified2 (me: in out;  
122                 aS : Shape from TopoDS) 
123         returns ListOfShape from TopTools
124         is virtual;
125         ---Purpose: Returns the list  of shapes modified from the shape <S>.
126         ---         For use in BRepNaming.
127         ---C++: return const & 
128         ---Level: Public
129
130     Generated (me: in out; S : Shape from TopoDS)
131         returns ListOfShape from TopTools
132         is redefined virtual;
133         ---Purpose: Returns the list  of shapes generated from the shape <S>.
134         ---         For use in BRepNaming.
135         ---C++:  return const &
136     
137     HasModified (me)
138         returns Boolean from Standard
139         is virtual;
140         ---Purpose: Returns true if there is at least one modified shape.
141         ---         For use in BRepNaming.
142
143     HasGenerated (me)
144         returns Boolean from Standard
145         is virtual;
146         ---Purpose: Returns true if there is at least one generated shape.
147         ---         For use in BRepNaming.
148
149     HasDeleted (me)
150         returns Boolean from Standard
151         is virtual;
152         ---Purpose: Returns true if there is at least one deleted shape.
153         ---         For use in BRepNaming.
154
155     Destroy (me: in out); 
156     ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation(){Destroy();}" 
157      
158     --modified by NIZNHY-PKV Wed Mar 20 10:29:30 2002  f
159     
160     SectionEdges (me:  in  out)  
161         returns ListOfShape from TopTools;    
162         --- Purpose: Returns a list of section edges.
163         -- The edges represent the result of intersection between arguments of
164         -- Boolean Operation. They are computed during operation execution.
165         ---C++:  return const &  
166     --modified by NIZNHY-PKV Wed Mar 20 10:29:35 2002  t
167
168     RefinedList (me:  in  out; theL : ListOfShape from TopTools)  
169         returns ListOfShape from TopTools
170         is private;
171         ---Purpose: Returns the list  of shapes generated from the shape <S>.
172         ---         For use in BRepNaming.
173         ---C++:  return const &
174
175 fields
176     myS1             : Shape from TopoDS       is protected;
177     myS2             : Shape from TopoDS       is protected;
178     myBuilderCanWork : Boolean from Standard   is protected;   
179     myOperation      : Operation from BOP      is protected;  
180     myErrorStatus    : Integer from Standard   is protected;         
181     myDSFiller       : PDSFiller from BOPTools is protected; 
182     myBuilder        : PBuilder  from BOP      is protected;
183
184     myHistory        : HistoryCollector from BOP is protected;
185
186     myEntryType      : Integer     from Standard;   
187
188     --    for  edge  refiner
189     myFuseEdges      : Boolean  from  Standard ; 
190     myModifFaces     : DataMapOfShapeShape  from  TopTools;   
191     myEdgeMap        : DataMapOfShapeShape  from  TopTools;
192     
193 end BooleanOperation;
194