0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / BRepAlgo / BRepAlgo_DSAccess.cdl
CommitLineData
b311480e 1-- Created on: 1997-08-13
2-- Created by: Prestataire Mary FABIEN
3-- Copyright (c) 1997-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
22class DSAccess from BRepAlgo
23
24 ---Purpose:
25
26uses
27
28 HDataStructure from TopOpeBRepDS,
29 Kind from TopOpeBRepDS,
30 Shape from TopoDS,
31 Wire from TopoDS,
32 Face from TopoDS,
33 Vertex from TopoDS,
34 ListOfInteger from TColStd,
35 SetOfInteger from TColStd,
36 MapOfInteger from TColStd,
37 ListOfShape from TopTools,
38 State from TopAbs,
39 CheckStatus from BRepAlgo,
40 EdgeConnector from BRepAlgo,
41 LoopSet from TopOpeBRepBuild,
42 HBuilder from TopOpeBRepBuild,
43 DataMapOfShapeInterference from BRepAlgo,
44 DataMapOfShapeShape from TopTools,
45 DataMapOfShapeListOfShape from TopTools,
46 DSFiller from TopOpeBRep
47
48is
49
50 Create returns DSAccess from BRepAlgo;
51
52 Init(me: in out);
53 ---Purpose: Clears the internal data structure, including the
54 --Shapes of Load().
55
56
57-- Filling of the DS
58
59 Load(me : in out; S : Shape from TopoDS);
60 ---Purpose: Loads the shape in DS.
61 --
62
63 Load(me : in out; S1, S2 : in out Shape from TopoDS);
64 ---Purpose: Loads two shapes in the DS without intersecting them.
65
66 Intersect(me : in out);
67 ---Purpose: Intersects two shapes at input and loads the DS with
68 -- their intersection. Clears the TopOpeBRepBuild_HBuilder if
69 -- necessary
70
71 Intersect(me : in out; S1, S2 : Shape from TopoDS);
72 ---Purpose: Intersects the faces contained in two given shapes
73 -- and loads them in the DS. Clears the TopOpeBRepBuild_HBuilder
74 -- if necessary
75
76 SameDomain(me : in out;S1, S2 : Shape from TopoDS);
77 ---Purpose: This method does the same thing as the previous,
78 -- but faster. There is no intersection face/face 3D.
79 -- The faces have the same support(surface). No test of
80 -- tangency (that is why it is faster). Intersects in 2d
81 -- the faces tangent F1 anf F2.
82
83
84-- Construction des Sections
85
86 GetSectionEdgeSet(me : in out; S1,S2 : Shape from TopoDS)
87 ---Purpose: returns compounds of Edge connected with section, which
88 -- contains sections between faces contained in S1 and S2.
89 -- returns an empty list of Shape if S1 or S2 do not contain
90 -- face.
91 -- calls GetSectionEdgeSet() if it has not already been done
92 ---C++: return const &
93 returns ListOfShape from TopTools;
94
95 GetSectionEdgeSet(me : in out)
96 ---Purpose: returns all compounds of edges connected with section
97 -- contained in the DS
98 ---C++: return const &
99 returns ListOfShape from TopTools;
100
101 IsWire(me : in out;Compound : Shape from TopoDS)
102 ---Purpose: NYI
103 returns Boolean from Standard;
104
105 Wire(me : in out;Compound : Shape from TopoDS)
106 ---Purpose: NYI
107 ---C++: return const &
108 returns Shape from TopoDS;
109
110 SectionVertex(me : in out;S1 : Shape from TopoDS;S2 : Shape from TopoDS)
111 ---Purpose: NYI
112 -- returns the vertex of section, which contains the section
113 -- between face S1 and edge S2 (returns an empty Shape
114 -- if S1 is not a face or if S2 is not an edge)
115 ---C++: return const &
116 returns ListOfShape from TopTools;
117
118
119-- Edition de la SD
120
121 SuppressEdgeSet(me : in out; Compound : Shape from TopoDS);
122 ---Purpose: Invalidates a complete line of section. All
123 -- Edges connected by Vertex or a Wire. Can be
124 -- a group of connected Edges, which do not form a
125 -- standard Wire.
126
127 ChangeEdgeSet(me : in out; Old, New : Shape from TopoDS);
128 ---Purpose: Modifies a line of section. <New> -- should be a
129 -- Group of Edges connected by Vertex. -- Can be a
130 -- Wire. Can be a group of connected Edges that do not
131 -- form a standard Wire. <New> should be sub-groupn of <Old>
132 --
133 --
134
135 SuppressSectionVertex(me : in out;V : Vertex from TopoDS);
136 ---Purpose: NYI
137 -- Make invalid a Vertex of section. The Vertex shoud be
138 -- reconstructed from a point.
139
140 Suppress(me : in out; Compound : Shape from TopoDS;
141 KeepComp : Shape from TopoDS)
142 is private;
143
144-- Reconstruction des Shapes
145
146 Merge(me : in out; state1 : State from TopAbs;
147 state2 : State from TopAbs)
148 ---C++: return const &
149 returns Shape from TopoDS;
150
151 Merge(me : in out; state1 : State from TopAbs)
152 ---C++: return const &
153 returns Shape from TopoDS;
154
155 Propagate(me :in out;what : State from TopAbs;
156 FromShape : Shape from TopoDS;
157 LoadShape : Shape from TopoDS)
158 ---Purpose: NYI Propagation of a state starting from the shape
159 -- FromShape = edge or vertex of section, face or
160 -- Coumpound de section. LoadShape is either S1,
161 -- or S2 (see the method Load). Propagation from
162 -- FromShape, on the states <what> of LoadShape.
163 -- Return a Wire in 2d, a Shell in 3d.
164 -- Specifications are incomplete, to be redefined for the typologies
165 -- correpsonding to <FromShape> and the result :
166 -- exemple : FromShape resultat
167 -- vertex wire (or edge)
168 -- edge of section face (or shell)
169 -- compound of section shell
170 -- ... ...
171 ---C++: return const &
172 returns Shape from TopoDS;
173
174 PropagateFromSection(me : in out;SectionShape : Shape from TopoDS)
175 ---Purpose: SectionShape est soit un Vertex de section(NYI), soit
176 -- une Edge de section. Propagation des shapes
177 -- de section en partant de SectionShape.
178 -- return un Compound de section.
179 ---C++: return const &
180 returns Shape from TopoDS;
181
182
183-- History
184 Modified (me: in out; S : Shape from TopoDS)
185 ---Purpose: Returns the list of the descendant shapes of the shape <S>.
186 ---C++: return const &
187 returns ListOfShape from TopTools ;
188
189 IsDeleted (me: in out; S : Shape from TopoDS)
190 ---Purpose: Returns the fact that the shape <S> has been deleted or not
191 -- by the boolean operation.
192 returns Boolean;
193
194-- Verification de la DS
195
196 Check(me : in out)
197 ---Purpose: NYI
198 -- coherence of the internal Data Structure.
199 returns CheckStatus from BRepAlgo;
200
201-- private
202
203 RemoveEdgeInterferences(me : in out;iF1 : Integer;
204 iF2 : Integer;
205 iCurve : Integer)
206 ---purpose: case of SectEdge coming from Curve
207 -- for each of F1 and F2, find Edges
208 -- for each Edge :
209 -- remove the impact on geometry of vertexes
210 -- of SectEdge. If there is no other impact at these edges
211 -- and if these Edges are not SameDomain,
212 -- make unKeepShape.
213 is private;
214
215 RemoveEdgeInterferences(me : in out;iE1 : Integer;
216 iE2 : Integer;
217 SectEdge :Shape from TopoDS)
218 ---purpose: case of SectEdge coming from Edge(s)
219 -- if iE1 and iE2 are Edges :
220 -- Remove the impact of DSEdge(= iE1 or iE2) of
221 -- geometry a vertex of SectEdge, and if there is nothing
222 -- else make unkeep on DSEdge
223 -- if iE1 or iE2 == 0, no interference on Edges in the DS
224 -- if iE1 and iE2 are Faces :
225 -- for each of faces F1 and F2, explode into Edges
226 -- for each Edge :
227 -- remove interferences a vertex of SectEdge as geometry.
228 -- If no other interferences are attached to
229 -- these Edges, and if these Edges are not SameDomain,
230 -- make unKeepShape.
231 is private;
232
233 RemoveFaceInterferences(me : in out;iF1 : Integer;
234 iF2 : Integer;
235 iE1 : Integer;
236 iE2 : Integer)
237 --purpose : case of SectEdge coming from Edge(s)
238 -- Remove the interferences between F1 and F2 concerning
239 -- DSEdge (= E1 or E2) :
240 -- a) if DSEdge is not SameDomain -> the edge is Removed
241 -- b) if there are no interferences of DSEdge of
242 -- GeomtryType == VERTEX
243 -- with Edge of DSFace(= F1 or F2)
244 -- if DSFace has no more interference and is not SameDomain,
245 -- make unkeep DSFace.
246 is private;
247
248 RemoveFaceInterferences(me : in out;iF1 : Integer;
249 iF2 : Integer;
250 iCurve : Integer)
251 ---purpose: case of SectEdge coming from Curve
252 -- remove the interferences of Geometry iCurve between F1 and F2.
253 -- if Face(= F1 or F2) has no other interferences, and if Face
254 -- is not SameDomain, make unKeepShape Face.
255 is private;
256
257 RemoveEdgeInterferencesFromFace(me : in out;
258 iF1 : Integer;
259 iF2 : Integer;
260 ipv1 : Integer;
261 kind1 : Kind from TopOpeBRepDS;
262 ipv2 : Integer;
263 kind2 : Kind from TopOpeBRepDS)
264 ---purpose: remove from iF1 or iF2 interferences of Edges
265 -- that have GeometryType kind1/kind2 and
266 -- Geometry ipv1/ipv2.
267 -- if kind1/kind2 == TopAbs_VERTEX -> RemoveEdgeFromFace
268 is private;
269
270 RemoveEdgeFromFace(me : in out;iF : Integer;
271 iV : Integer)
272 ---purpose: remove from the DS the Edges that belong to iF
273 -- that have iV as Vertex if they do not have Geometry and
274 -- are not SameDomain.
275 is private;
276
277 PntVtxOnCurve(me : in out; iCurve : Integer;
278 ipv1 : in out Integer;
279 ik1 : in out Kind from TopOpeBRepDS;
280 ipv2 : in out Integer;
281 ik2 : in out Kind from TopOpeBRepDS)
282 ---purpose: Find points/vertex on curves
283 is private;
284
285 PntVtxOnSectEdge(me : in out; SectEdge : Shape from TopoDS;
286 ipv1 : in out Integer;
287 ik1 : in out Kind from TopOpeBRepDS;
288 ipv2 : in out Integer;
289 ik2 : in out Kind from TopOpeBRepDS)
290 ---purpose : Find points/Vertex on SectEdge
291 is private;
292
293 RemoveEdgeSameDomain(me : in out; iE1 : Integer;
294 iE2 : Integer)
295 is private;
296
297 RemoveFaceSameDomain(me : in out; C : Shape from TopoDS)
298 is private;
299
300 FindGoodFace(me : in out; iE : Integer;
301 iF1 : in out Integer;
302 b : in out Boolean)
303 ---C++: return &
304 returns ListOfInteger from TColStd is private;
305
306
307
308 RemoveFaceSameDomain(me : in out; iF1 : Integer;
309 iF2 : Integer)
310 is private;
311
312 GoodInterf(me : in out; SectEdge : Shape from TopoDS;
313 kind : Kind from TopOpeBRepDS;
314 iPointVertex : Integer)
315 returns Boolean is private;
316
317 DS(me) returns HDataStructure from TopOpeBRepDS;
318 ---C++: return const &
319
320 ChangeDS(me : in out) returns HDataStructure from TopOpeBRepDS;
321 ---C++: return &
322
323 Builder(me) returns HBuilder from TopOpeBRepBuild;
324 ---C++: return const &
325
326 ChangeBuilder(me : in out) returns HBuilder from TopOpeBRepBuild;
327 ---C++: return &
328
329fields
330
331 myHDS : HDataStructure from TopOpeBRepDS;
332 myDSFiller : DSFiller from TopOpeBRep;
333 myHB : HBuilder from TopOpeBRepBuild;
334 myEC : EdgeConnector from BRepAlgo;
335 myS1 : Shape from TopoDS;
336 myS2 : Shape from TopoDS;
337 myState1,myState2 : State from TopAbs;
338
339 myListOfCompoundOfEdgeConnected : ListOfShape from TopTools;
340 myCurrentList : ListOfShape from TopTools;
341 myRecomputeBuilderIsDone : Boolean from Standard;
342 myGetSectionIsDone : Boolean from Standard;
343 myResultShape : Shape from TopoDS;
344
345 myWire : Wire from TopoDS;
346 myListOfVertex : ListOfShape from TopTools;
347 myModified : ListOfShape from TopTools;
348 myEmptyShape : Shape from TopoDS;
349 myEmptyListOfShape : ListOfShape from TopTools;
350 myEmptyListOfInteger : ListOfInteger from TColStd;
351
352 myCompoundWireMap : DataMapOfShapeShape from TopTools;
353 mySetOfKeepPoint : SetOfInteger from TColStd;
354
355friends
356
357 class BooleanOperations
358
359end DSAccess from BRepAlgo;