b311480e |
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 |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | -- modified by Peter KURNEV Tue Mar 5 14:01:51 2002 |
4e57c75e |
22 | -- modified by Eugeny MALTCHIKOV Wed Jul 04 11:13:01 2012 |
23 | |
7fd59977 |
24 | |
25 | deferred class BooleanOperation from BRepAlgoAPI |
26 | inherits MakeShape from BRepBuilderAPI |
27 | |
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). |
37 | |
38 | uses |
39 | |
40 | Shape from TopoDS, |
41 | ListOfShape from TopTools, |
4e57c75e |
42 | Operation from BOPAlgo, |
43 | BOP from BOPAlgo, |
44 | PBOP from BOPAlgo, |
45 | PaveFiller from BOPAlgo, |
46 | PPaveFiller from BOPAlgo, |
7fd59977 |
47 | DataMapOfIntegerListOfShape from TopTools, |
48 | DataMapOfIntegerShape from TopTools, |
49 | DataMapOfShapeShape from TopTools |
50 | |
51 | is |
52 | |
53 | Initialize (S1 :Shape from TopoDS; |
54 | S2 :Shape from TopoDS; |
4e57c75e |
55 | anOperation:Operation from BOPAlgo); |
7fd59977 |
56 | ---Purpose: Prepares the operations for S1 and S2. |
57 | |
58 | Initialize (S1 :Shape from TopoDS; |
59 | S2 :Shape from TopoDS; |
4e57c75e |
60 | aDSF :PaveFiller from BOPAlgo; |
61 | anOperation:Operation from BOPAlgo); |
7fd59977 |
62 | ---Purpose: Prepares the operations for S1 and S2. |
63 | |
64 | SetOperation (me:out; |
4e57c75e |
65 | anOp: Operation from BOPAlgo); |
7fd59977 |
66 | ---Purpose: Sets the type of Boolean operation to perform |
4e57c75e |
67 | --- It can be BOPAlgo_SECTION |
68 | --- BOPAlgo_COMMON |
69 | --- BOPAlgo_FUSE |
70 | --- BOPAlgo_CUT |
71 | --- BOPAlgo_CUT21 |
7fd59977 |
72 | --- |
73 | |
74 | |
75 | Build (me:out) |
76 | is redefined virtual; |
77 | ---Purpose: Provides the algorithm of Boolean Operations |
78 | -- - Filling interference Data Structure (if it is necessary) |
79 | -- - Building the result of the operation. |
80 | |
81 | Shape1(me) |
82 | returns Shape from TopoDS |
83 | is static; |
84 | ---Purpose: Returns the first shape involved in this Boolean operation. |
85 | ---C++: return const & |
86 | |
87 | Shape2(me) |
88 | returns Shape from TopoDS |
89 | is static; |
90 | ---Purpose: Returns the second shape involved in this Boolean operation. |
91 | ---C++: return const & |
92 | |
93 | Operation (me) |
4e57c75e |
94 | returns Operation from BOPAlgo; |
7fd59977 |
95 | ---Purpose: Returns the type of Boolean Operation that has been performed. |
96 | |
97 | FuseEdges(me) returns Boolean from Standard; |
98 | ---Purpose: Returns the flag of edge refining |
99 | |
100 | RefineEdges(me:out); |
101 | ---Purpose: Fuse C1 edges |
102 | |
103 | PrepareFiller(me:out) |
104 | returns Boolean from Standard |
105 | is protected; |
106 | |
107 | |
108 | ---Category: Querying |
109 | BuilderCanWork(me) |
110 | returns Boolean from Standard; |
111 | |
112 | ErrorStatus(me) |
113 | returns Integer from Standard; |
114 | ---Purpose: Returns the error status of operation. |
115 | --- 0 - Ok |
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 |
124 | |
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 & |
131 | |
132 | IsDeleted (me: in out; |
133 | aS : Shape from TopoDS) |
134 | returns Boolean |
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. |
138 | |
139 | Modified2 (me: in out; |
140 | aS : Shape from TopoDS) |
141 | returns ListOfShape from TopTools |
142 | is virtual; |
143 | ---Purpose: Returns the list of shapes modified from the shape <S>. |
144 | --- For use in BRepNaming. |
145 | ---C++: return const & |
146 | ---Level: Public |
147 | |
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 & |
154 | |
155 | HasModified (me) |
156 | returns Boolean from Standard |
157 | is virtual; |
158 | ---Purpose: Returns true if there is at least one modified shape. |
159 | --- For use in BRepNaming. |
160 | |
161 | HasGenerated (me) |
162 | returns Boolean from Standard |
163 | is virtual; |
164 | ---Purpose: Returns true if there is at least one generated shape. |
165 | --- For use in BRepNaming. |
166 | |
167 | HasDeleted (me) |
168 | returns Boolean from Standard |
169 | is virtual; |
170 | ---Purpose: Returns true if there is at least one deleted shape. |
171 | --- For use in BRepNaming. |
172 | |
173 | Destroy (me: in out); |
174 | ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation(){Destroy();}" |
175 | |
176 | --modified by NIZNHY-PKV Wed Mar 20 10:29:30 2002 f |
177 | |
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 |
185 | |
186 | RefinedList (me: in out; theL : ListOfShape from TopTools) |
187 | returns ListOfShape from TopTools |
188 | is private; |
189 | ---Purpose: Returns the list of shapes generated from the shape <S>. |
190 | --- For use in BRepNaming. |
191 | ---C++: return const & |
192 | |
193 | fields |
4e57c75e |
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; |
7fd59977 |
201 | |
202 | myEntryType : Integer from Standard; |
203 | |
204 | -- for edge refiner |
205 | myFuseEdges : Boolean from Standard ; |
206 | myModifFaces : DataMapOfShapeShape from TopTools; |
207 | myEdgeMap : DataMapOfShapeShape from TopTools; |
208 | |
209 | end BooleanOperation; |
210 | |