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