File: BRepAlgo_DSAccess.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (231 lines) | stat: -rw-r--r-- 9,047 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BRepAlgo_DSAccess_HeaderFile
#define _BRepAlgo_DSAccess_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>

#include <Handle_TopOpeBRepDS_HDataStructure.hxx>
#include <TopOpeBRep_DSFiller.hxx>
#include <Handle_TopOpeBRepBuild_HBuilder.hxx>
#include <Handle_BRepAlgo_EdgeConnector.hxx>
#include <TopoDS_Shape.hxx>
#include <TopAbs_State.hxx>
#include <TopTools_ListOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <TopoDS_Wire.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
#include <BRepAlgo_CheckStatus.hxx>
#include <Standard_Integer.hxx>
#include <TopOpeBRepDS_Kind.hxx>
class TopOpeBRepDS_HDataStructure;
class TopOpeBRepBuild_HBuilder;
class BRepAlgo_EdgeConnector;
class BRepAlgo_BooleanOperations;
class TopoDS_Shape;
class TopTools_ListOfShape;
class TopoDS_Vertex;
class TColStd_ListOfInteger;



class BRepAlgo_DSAccess 
{
public:

  DEFINE_STANDARD_ALLOC

  
  Standard_EXPORT BRepAlgo_DSAccess();
  
  //! Clears the internal data structure, including the
  Standard_EXPORT   void Init() ;
  
  //! Loads the shape in DS.
  Standard_EXPORT   void Load (const TopoDS_Shape& S) ;
  
  //! Loads two shapes in the DS without intersecting them.
  Standard_EXPORT   void Load (TopoDS_Shape& S1, TopoDS_Shape& S2) ;
  
  //! Intersects two shapes at input and loads the DS with
  //! their intersection. Clears the TopOpeBRepBuild_HBuilder if
  //! necessary
  Standard_EXPORT   void Intersect() ;
  
  //! Intersects the faces contained in two given shapes
  //! and loads them in the DS. Clears the TopOpeBRepBuild_HBuilder
  //! if necessary
  Standard_EXPORT   void Intersect (const TopoDS_Shape& S1, const TopoDS_Shape& S2) ;
  
  //! This method does the same thing as the previous,
  //! but faster. There is no intersection face/face 3D.
  //! The faces have the same support(surface). No test of
  //! tangency (that is why it is faster). Intersects in 2d
  //! the faces tangent F1 anf F2.
  Standard_EXPORT   void SameDomain (const TopoDS_Shape& S1, const TopoDS_Shape& S2) ;
  
  //! returns compounds of Edge connected with section, which
  //! contains sections between faces contained in S1 and S2.
  //! returns an empty list of Shape if S1 or S2 do not contain
  //! face.
  //! calls GetSectionEdgeSet() if it has not already been done
  Standard_EXPORT  const  TopTools_ListOfShape& GetSectionEdgeSet (const TopoDS_Shape& S1, const TopoDS_Shape& S2) ;
  
  //! returns all compounds of edges connected with section
  //! contained in the DS
  Standard_EXPORT  const  TopTools_ListOfShape& GetSectionEdgeSet() ;
  
  //! NYI
  Standard_EXPORT   Standard_Boolean IsWire (const TopoDS_Shape& Compound) ;
  
  //! NYI
  Standard_EXPORT  const  TopoDS_Shape& Wire (const TopoDS_Shape& Compound) ;
  
  //! NYI
  //! returns the vertex of section, which contains the section
  //! between face S1 and edge S2 (returns an empty Shape
  //! if S1 is not a face or if S2 is not an edge)
  Standard_EXPORT  const  TopTools_ListOfShape& SectionVertex (const TopoDS_Shape& S1, const TopoDS_Shape& S2) ;
  
  //! Invalidates a complete line of section. All
  //! Edges connected by Vertex or a Wire. Can be
  //! a group of connected Edges, which do not form a
  //! standard Wire.
  Standard_EXPORT   void SuppressEdgeSet (const TopoDS_Shape& Compound) ;
  
  //! Modifies a line of section.  <New> -- should be a
  //! Group of Edges connected by Vertex.  -- Can be a
  //! Wire.  Can be a group of connected Edges that do not
  //! form a standard Wire.   <New> should be sub-groupn of <Old>
  Standard_EXPORT   void ChangeEdgeSet (const TopoDS_Shape& Old, const TopoDS_Shape& New) ;
  
  //! NYI
  //! Make invalid a Vertex of section. The Vertex shoud be
  //! reconstructed from a point.
  Standard_EXPORT   void SuppressSectionVertex (const TopoDS_Vertex& V) ;
  
  Standard_EXPORT  const  TopoDS_Shape& Merge (const TopAbs_State state1, const TopAbs_State state2) ;
  
  Standard_EXPORT  const  TopoDS_Shape& Merge (const TopAbs_State state1) ;
  
  //! NYI   Propagation  of a state starting from the shape
  //! FromShape = edge or vertex of section, face or
  //! Coumpound de section. LoadShape is either S1,
  //! or S2  (see the method Load).   Propagation   from
  //! FromShape, on the states <what> of LoadShape.
  //! Return a Wire in 2d, a Shell in 3d.
  //! Specifications are incomplete, to be redefined for the typologies
  //! correpsonding to  <FromShape> and the result :
  //! exemple :    FromShape        resultat
  //! vertex           wire (or edge)
  //! edge of section       face (or shell)
  //! compound of section   shell
  //! ...                  ...
  Standard_EXPORT  const  TopoDS_Shape& Propagate (const TopAbs_State what, const TopoDS_Shape& FromShape, const TopoDS_Shape& LoadShape) ;
  
  //! SectionShape est soit un Vertex de section(NYI), soit
  //! une Edge de section. Propagation  des shapes
  //! de section en partant de SectionShape.
  //! return un Compound de section.
  Standard_EXPORT  const  TopoDS_Shape& PropagateFromSection (const TopoDS_Shape& SectionShape) ;
  
  //! Returns the list of the descendant shapes of the shape <S>.
  Standard_EXPORT  const  TopTools_ListOfShape& Modified (const TopoDS_Shape& S) ;
  
  //! Returns the fact that the shape <S> has been deleted or not
  //! by the boolean operation.
  Standard_EXPORT   Standard_Boolean IsDeleted (const TopoDS_Shape& S) ;
  
  //! NYI
  //! coherence of the internal Data Structure.
  Standard_EXPORT   BRepAlgo_CheckStatus Check() ;
  
  Standard_EXPORT  const  Handle(TopOpeBRepDS_HDataStructure)& DS()  const;
  
  Standard_EXPORT   Handle(TopOpeBRepDS_HDataStructure)& ChangeDS() ;
  
  Standard_EXPORT  const  Handle(TopOpeBRepBuild_HBuilder)& Builder()  const;
  
  Standard_EXPORT   Handle(TopOpeBRepBuild_HBuilder)& ChangeBuilder() ;


friend class BRepAlgo_BooleanOperations;


protected:





private:

  
  Standard_EXPORT   void Suppress (const TopoDS_Shape& Compound, const TopoDS_Shape& KeepComp) ;
  
  Standard_EXPORT   void RemoveEdgeInterferences (const Standard_Integer iF1, const Standard_Integer iF2, const Standard_Integer iCurve) ;
  
  Standard_EXPORT   void RemoveEdgeInterferences (const Standard_Integer iE1, const Standard_Integer iE2, const TopoDS_Shape& SectEdge) ;
  
  Standard_EXPORT   void RemoveFaceInterferences (const Standard_Integer iF1, const Standard_Integer iF2, const Standard_Integer iE1, const Standard_Integer iE2) ;
  
  Standard_EXPORT   void RemoveFaceInterferences (const Standard_Integer iF1, const Standard_Integer iF2, const Standard_Integer iCurve) ;
  
  Standard_EXPORT   void RemoveEdgeInterferencesFromFace (const Standard_Integer iF1, const Standard_Integer iF2, const Standard_Integer ipv1, const TopOpeBRepDS_Kind kind1, const Standard_Integer ipv2, const TopOpeBRepDS_Kind kind2) ;
  
  Standard_EXPORT   void RemoveEdgeFromFace (const Standard_Integer iF, const Standard_Integer iV) ;
  
  Standard_EXPORT   void PntVtxOnCurve (const Standard_Integer iCurve, Standard_Integer& ipv1, TopOpeBRepDS_Kind& ik1, Standard_Integer& ipv2, TopOpeBRepDS_Kind& ik2) ;
  
  Standard_EXPORT   void PntVtxOnSectEdge (const TopoDS_Shape& SectEdge, Standard_Integer& ipv1, TopOpeBRepDS_Kind& ik1, Standard_Integer& ipv2, TopOpeBRepDS_Kind& ik2) ;
  
  Standard_EXPORT   void RemoveEdgeSameDomain (const Standard_Integer iE1, const Standard_Integer iE2) ;
  
  Standard_EXPORT   void RemoveFaceSameDomain (const TopoDS_Shape& C) ;
  
  Standard_EXPORT   TColStd_ListOfInteger& FindGoodFace (const Standard_Integer iE, Standard_Integer& iF1, Standard_Boolean& b) ;
  
  Standard_EXPORT   void RemoveFaceSameDomain (const Standard_Integer iF1, const Standard_Integer iF2) ;
  
  Standard_EXPORT   Standard_Boolean GoodInterf (const TopoDS_Shape& SectEdge, const TopOpeBRepDS_Kind kind, const Standard_Integer iPointVertex) ;


  Handle(TopOpeBRepDS_HDataStructure) myHDS;
  TopOpeBRep_DSFiller myDSFiller;
  Handle(TopOpeBRepBuild_HBuilder) myHB;
  Handle(BRepAlgo_EdgeConnector) myEC;
  TopoDS_Shape myS1;
  TopoDS_Shape myS2;
  TopAbs_State myState1;
  TopAbs_State myState2;
  TopTools_ListOfShape myListOfCompoundOfEdgeConnected;
  TopTools_ListOfShape myCurrentList;
  Standard_Boolean myRecomputeBuilderIsDone;
  Standard_Boolean myGetSectionIsDone;
  TopoDS_Shape myResultShape;
  TopoDS_Wire myWire;
  TopTools_ListOfShape myListOfVertex;
  TopTools_ListOfShape myModified;
  TopoDS_Shape myEmptyShape;
  TopTools_ListOfShape myEmptyListOfShape;
  TColStd_ListOfInteger myEmptyListOfInteger;
  TopTools_DataMapOfShapeShape myCompoundWireMap;
  TColStd_PackedMapOfInteger mySetOfKeepPoint;


};







#endif // _BRepAlgo_DSAccess_HeaderFile