1 -- Created on: 1993-10-14
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
21 -- modified by Peter KURNEV Tue Mar 5 14:01:51 2002
22 -- modified by Eugeny MALTCHIKOV Wed Jul 04 11:13:01 2012
25 deferred class BooleanOperation from BRepAlgoAPI
26 inherits MakeShape from BRepBuilderAPI
28 ---Purpose: The abstract class BooleanOperation is the root
29 -- class of Boolean Operations (see Overview).
30 -- Boolean Operations algorithm is divided onto two parts.
31 -- - The first one is computing interference between arguments.
32 -- - The second one is building the result of operation.
33 -- The BooleanOperation class provides execution of both parts
34 -- of the Boolean Operations algorithm. The second part
35 -- (building the result) depends on given type of the Boolean
36 -- Operation (see Constructor).
41 ListOfShape from TopTools,
42 Operation from BOPAlgo,
45 PaveFiller from BOPAlgo,
46 PPaveFiller from BOPAlgo,
47 DataMapOfIntegerListOfShape from TopTools,
48 DataMapOfIntegerShape from TopTools,
49 DataMapOfShapeShape from TopTools
53 Initialize (S1 :Shape from TopoDS;
54 S2 :Shape from TopoDS;
55 anOperation:Operation from BOPAlgo);
56 ---Purpose: Prepares the operations for S1 and S2.
58 Initialize (S1 :Shape from TopoDS;
59 S2 :Shape from TopoDS;
60 aDSF :PaveFiller from BOPAlgo;
61 anOperation:Operation from BOPAlgo);
62 ---Purpose: Prepares the operations for S1 and S2.
65 anOp: Operation from BOPAlgo);
66 ---Purpose: Sets the type of Boolean operation to perform
67 --- It can be BOPAlgo_SECTION
77 ---Purpose: Provides the algorithm of Boolean Operations
78 -- - Filling interference Data Structure (if it is necessary)
79 -- - Building the result of the operation.
82 returns Shape from TopoDS
84 ---Purpose: Returns the first shape involved in this Boolean operation.
85 ---C++: return const &
88 returns Shape from TopoDS
90 ---Purpose: Returns the second shape involved in this Boolean operation.
91 ---C++: return const &
94 returns Operation from BOPAlgo;
95 ---Purpose: Returns the type of Boolean Operation that has been performed.
97 FuseEdges(me) returns Boolean from Standard;
98 ---Purpose: Returns the flag of edge refining
101 ---Purpose: Fuse C1 edges
103 PrepareFiller(me:out)
104 returns Boolean from Standard
108 ---Category: Querying
110 returns Boolean from Standard;
113 returns Integer from Standard;
114 ---Purpose: Returns the error status of operation.
116 --- 1 - The Object is created but Nothing is Done
117 --- 2 - Null source shapes is not allowed
118 --- 3 - Check types of the arguments
119 --- 4 - Can not allocate memory for the DSFiller
120 --- 5 - The Builder can not work with such types of arguments
121 --- 6 - Unknown operation is not allowed
122 --- 7 - Can not allocate memory for the Builder
123 -- > 100 - See the Builder's ErrorStatus
125 Modified (me: in out;
126 aS : Shape from TopoDS)
127 returns ListOfShape from TopTools
128 is redefined virtual;
129 ---Purpose: Returns the list of shapes modified from the shape <S>.
130 ---C++: return const &
132 IsDeleted (me: in out;
133 aS : Shape from TopoDS)
135 is redefined virtual;
136 ---Purpose: Returns true if the shape S has been deleted. The
137 -- result shape of the operation does not contain the shape S.
139 Modified2 (me: in out;
140 aS : Shape from TopoDS)
141 returns ListOfShape from TopTools
143 ---Purpose: Returns the list of shapes modified from the shape <S>.
144 --- For use in BRepNaming.
145 ---C++: return const &
148 Generated (me: in out; S : Shape from TopoDS)
149 returns ListOfShape from TopTools
150 is redefined virtual;
151 ---Purpose: Returns the list of shapes generated from the shape <S>.
152 --- For use in BRepNaming.
153 ---C++: return const &
156 returns Boolean from Standard
158 ---Purpose: Returns true if there is at least one modified shape.
159 --- For use in BRepNaming.
162 returns Boolean from Standard
164 ---Purpose: Returns true if there is at least one generated shape.
165 --- For use in BRepNaming.
168 returns Boolean from Standard
170 ---Purpose: Returns true if there is at least one deleted shape.
171 --- For use in BRepNaming.
173 Destroy (me: in out);
174 ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation(){Destroy();}"
176 --modified by NIZNHY-PKV Wed Mar 20 10:29:30 2002 f
178 SectionEdges (me: in out)
179 returns ListOfShape from TopTools;
180 --- Purpose: Returns a list of section edges.
181 -- The edges represent the result of intersection between arguments of
182 -- Boolean Operation. They are computed during operation execution.
183 ---C++: return const &
184 --modified by NIZNHY-PKV Wed Mar 20 10:29:35 2002 t
186 RefinedList (me: in out; theL : ListOfShape from TopTools)
187 returns ListOfShape from TopTools
189 ---Purpose: Returns the list of shapes generated from the shape <S>.
190 --- For use in BRepNaming.
191 ---C++: return const &
194 myS1 : Shape from TopoDS is protected;
195 myS2 : Shape from TopoDS is protected;
196 myBuilderCanWork : Boolean from Standard is protected;
197 myOperation : Operation from BOPAlgo is protected;
198 myErrorStatus : Integer from Standard is protected;
199 myDSFiller : PPaveFiller from BOPAlgo is protected;
200 myBuilder : PBOP from BOPAlgo is protected;
202 myEntryType : Integer from Standard;
205 myFuseEdges : Boolean from Standard ;
206 myModifFaces : DataMapOfShapeShape from TopTools;
207 myEdgeMap : DataMapOfShapeShape from TopTools;
209 end BooleanOperation;