b311480e |
1 | -- Created on: 1993-10-14 |
2 | -- Created by: Remi LEQUETTE |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | deferred class BooleanOperation from BRepAlgoAPI |
b1d15f53 |
18 | inherits BuilderAlgo from BRepAlgoAPI |
49b0c452 |
19 | |
20 | ---Purpose: |
21 | -- The abstract class BooleanOperation is the root |
22 | -- class of Boolean Operations (see Overview). |
23 | -- Boolean Operations algorithm is divided onto two parts. |
24 | -- - The first one is computing interference between arguments. |
25 | -- - The second one is building the result of operation. |
26 | -- The class BooleanOperation provides API level of both parts |
7fd59977 |
27 | |
28 | uses |
29 | |
b1d15f53 |
30 | Shape from TopoDS, |
31 | DataMapOfShapeShape from TopTools, |
49b0c452 |
32 | ListOfShape from TopTools, |
33 | -- |
b1d15f53 |
34 | Operation from BOPAlgo, |
49b0c452 |
35 | PaveFiller from BOPAlgo |
36 | |
7fd59977 |
37 | |
b1d15f53 |
38 | is |
39 | Initialize |
40 | returns BooleanOperation from BRepAlgoAPI; |
49b0c452 |
41 | ---Purpose: Empty constructor |
42 | |
43 | Initialize (PF :PaveFiller from BOPAlgo) |
44 | returns BooleanOperation from BRepAlgoAPI; |
45 | ---Purpose: Empty constructor |
46 | -- <PF> - PaveFiller object that is carried out |
47 | |
85915310 |
48 | Initialize (S1 :Shape from TopoDS; |
b1d15f53 |
49 | S2 :Shape from TopoDS; |
50 | anOperation:Operation from BOPAlgo); |
49b0c452 |
51 | ---Purpose: Constructor with two arguments |
52 | -- <S1>, <S2> -arguments |
53 | -- <anOperation> - the type of the operation |
54 | -- Obsolete |
7fd59977 |
55 | |
49b0c452 |
56 | Initialize (S1 :Shape from TopoDS; |
57 | S2 :Shape from TopoDS; |
58 | PF :PaveFiller from BOPAlgo; |
b1d15f53 |
59 | anOperation:Operation from BOPAlgo); |
49b0c452 |
60 | ---Purpose: Constructor with two arguments |
61 | -- <S1>, <S2> -arguments |
62 | -- <anOperation> - the type of the operation |
63 | -- <PF> - PaveFiller object that is carried out |
64 | -- Obsolete |
7fd59977 |
65 | |
85915310 |
66 | Shape1(me) |
67 | returns Shape from TopoDS |
b1d15f53 |
68 | is static; |
49b0c452 |
69 | ---Purpose: Returns the first argument involved in this Boolean operation. |
70 | -- Obsolete |
85915310 |
71 | ---C++: return const & |
49b0c452 |
72 | |
7fd59977 |
73 | |
74 | Shape2(me) |
85915310 |
75 | returns Shape from TopoDS |
76 | is static; |
49b0c452 |
77 | ---Purpose: Returns the second argument involved in this Boolean operation. |
78 | -- Obsolete |
85915310 |
79 | ---C++: return const & |
49b0c452 |
80 | |
81 | SetTools(me:out; |
82 | theLS: ListOfShape from TopTools); |
83 | ---Purpose: Sets the tools |
84 | |
85 | Tools(me) |
86 | returns ListOfShape from TopTools; |
87 | ---C++: return const & |
88 | ---Purpose: Gets the tools |
89 | |
b1d15f53 |
90 | SetOperation (me:out; |
49b0c452 |
91 | anOp: Operation from BOPAlgo); |
92 | ---Purpose: Sets the type of Boolean operation |
7fd59977 |
93 | |
94 | Operation (me) |
85915310 |
95 | returns Operation from BOPAlgo; |
49b0c452 |
96 | ---Purpose: Returns the type of Boolean Operation |
97 | ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation();" |
98 | |
b1d15f53 |
99 | Build (me:out) |
49b0c452 |
100 | is redefined ; |
101 | ---Purpose: Performs the algorithm |
102 | -- Filling interference Data Structure (if it is necessary) |
103 | -- Building the result of the operation. |
b1d15f53 |
104 | |
105 | BuilderCanWork(me) |
106 | returns Boolean from Standard; |
49b0c452 |
107 | ---Purpose: Returns True if there was no errors occured |
108 | -- obsolete |
109 | |
85915310 |
110 | FuseEdges(me) |
b1d15f53 |
111 | returns Boolean from Standard; |
112 | ---Purpose: Returns the flag of edge refining |
7fd59977 |
113 | |
114 | RefineEdges(me:out); |
85915310 |
115 | ---Purpose: Fuse C1 edges |
b1d15f53 |
116 | |
49b0c452 |
117 | SectionEdges (me: in out) |
b1d15f53 |
118 | returns ListOfShape from TopTools; |
119 | --- Purpose: Returns a list of section edges. |
120 | -- The edges represent the result of intersection between arguments of |
121 | -- Boolean Operation. They are computed during operation execution. |
122 | ---C++: return const & |
123 | |
7fd59977 |
124 | Modified (me: in out; |
85915310 |
125 | aS : Shape from TopoDS) |
126 | returns ListOfShape from TopTools |
49b0c452 |
127 | is redefined; |
85915310 |
128 | ---Purpose: Returns the list of shapes modified from the shape <S>. |
129 | ---C++: return const & |
7fd59977 |
130 | |
131 | IsDeleted (me: in out; |
85915310 |
132 | aS : Shape from TopoDS) |
133 | returns Boolean |
49b0c452 |
134 | is redefined; |
85915310 |
135 | ---Purpose: Returns true if the shape S has been deleted. The |
136 | -- result shape of the operation does not contain the shape S. |
7fd59977 |
137 | |
85915310 |
138 | Generated (me: in out; |
139 | S : Shape from TopoDS) |
140 | returns ListOfShape from TopTools |
49b0c452 |
141 | is redefined; |
85915310 |
142 | ---Purpose: Returns the list of shapes generated from the shape <S>. |
143 | --- For use in BRepNaming. |
144 | ---C++: return const & |
7fd59977 |
145 | |
85915310 |
146 | HasModified (me) |
147 | returns Boolean from Standard |
49b0c452 |
148 | is redefined; |
85915310 |
149 | ---Purpose: Returns true if there is at least one modified shape. |
150 | --- For use in BRepNaming. |
7fd59977 |
151 | |
152 | HasGenerated (me) |
85915310 |
153 | returns Boolean from Standard |
49b0c452 |
154 | is redefined; |
85915310 |
155 | ---Purpose: Returns true if there is at least one generated shape. |
156 | --- For use in BRepNaming. |
7fd59977 |
157 | |
158 | HasDeleted (me) |
85915310 |
159 | returns Boolean from Standard |
49b0c452 |
160 | is redefined; |
85915310 |
161 | ---Purpose: Returns true if there is at least one deleted shape. |
162 | --- For use in BRepNaming. |
b1d15f53 |
163 | |
164 | -- |
49b0c452 |
165 | -- protected methods |
166 | -- |
167 | Clear(me:out) |
168 | is redefined protected; |
169 | |
170 | SetAttributes (me:out) |
171 | is virtual protected; |
172 | |
85915310 |
173 | RefinedList (me: in out; |
174 | theL : ListOfShape from TopTools) |
175 | returns ListOfShape from TopTools |
b1d15f53 |
176 | is protected; |
85915310 |
177 | ---Purpose: Returns the list of shapes generated from the shape <S>. |
178 | --- For use in BRepNaming. |
49b0c452 |
179 | ---C++: return const & |
180 | |
181 | |
b1d15f53 |
182 | |
49b0c452 |
183 | fields |
184 | myTools : ListOfShape from TopTools is protected; |
b1d15f53 |
185 | myOperation: Operation from BOPAlgo is protected; |
49b0c452 |
186 | -- |
187 | myBuilderCanWork : Boolean from Standard is protected; |
7fd59977 |
188 | -- for edge refiner |
b1d15f53 |
189 | myFuseEdges : Boolean from Standard ; |
190 | myModifFaces : DataMapOfShapeShape from TopTools; |
191 | myEdgeMap : DataMapOfShapeShape from TopTools; |
7fd59977 |
192 | |
193 | end BooleanOperation; |