summaryrefslogtreecommitdiff
path: root/inc/BOPTools_DSFiller.hxx
blob: 3d33c94e11260794b9db50e8027468fedfa306db (plain)
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
// 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 _BOPTools_DSFiller_HeaderFile
#define _BOPTools_DSFiller_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _BooleanOperations_PShapesDataStructure_HeaderFile
#include <BooleanOperations_PShapesDataStructure.hxx>
#endif
#ifndef _BOPTools_PInterferencePool_HeaderFile
#include <BOPTools_PInterferencePool.hxx>
#endif
#ifndef _BOPTools_PPaveFiller_HeaderFile
#include <BOPTools_PPaveFiller.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TColStd_DataMapOfIntegerListOfInteger_HeaderFile
#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class TopoDS_Shape;
class TColStd_SetOfInteger;
class BOPTools_SSIntersectionAttribute;
class BooleanOperations_ShapesDataStructure;
class BOPTools_InterferencePool;
class BOPTools_PavePool;
class BOPTools_CommonBlockPool;
class BOPTools_SplitShapesPool;
class BOPTools_PaveFiller;
class TColStd_DataMapOfIntegerListOfInteger;



//!  class that provides <br>
//!  1. creation of the data structure (DS) <br>
//!  2. creation of the interferences' pool <br>
//!  3. invokation of PaveFiller->Perform() to fill the DS <br>
class BOPTools_DSFiller  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
//! Empty constructor <br>
  Standard_EXPORT   BOPTools_DSFiller();
  //! Destructor <br>
  Standard_EXPORT     void Destroy() ;
~BOPTools_DSFiller()
{
  Destroy();
}
  
//! Modifier <br>
//! Sets the arguments of boolean operation <br>
  Standard_EXPORT     void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
  
//! Selector <br>
  Standard_EXPORT    const TopoDS_Shape& Shape1() const;
  
//! Selector <br>
  Standard_EXPORT    const TopoDS_Shape& Shape2() const;
  
//! Performs the filling of the DS <br>
//! <br>
  Standard_EXPORT     void Perform() ;
  
  Standard_EXPORT     void InitFillersAndPools() ;
  
  Standard_EXPORT     void PartialPerform(const TColStd_SetOfInteger& anObjSubSet,const TColStd_SetOfInteger& aToolSubSet) ;
  
  Standard_EXPORT     void ToCompletePerform() ;
  
//! Performs the filling of the DS <br>
  Standard_EXPORT     void Perform(const BOPTools_SSIntersectionAttribute& theSectionAttribute) ;
  
//! Selector <br>
  Standard_EXPORT    const BooleanOperations_ShapesDataStructure& DS() const;
  
//! Selector <br>
  Standard_EXPORT    const BOPTools_InterferencePool& InterfPool() const;
  
//! Selector <br>
  Standard_EXPORT    const BOPTools_PavePool& PavePool() const;
  
//! Selector <br>
  Standard_EXPORT    const BOPTools_CommonBlockPool& CommonBlockPool() const;
  
//! Selector <br>
  Standard_EXPORT    const BOPTools_SplitShapesPool& SplitShapesPool() const;
  
//! Selector <br>
  Standard_EXPORT    const BOPTools_PaveFiller& PaveFiller() const;
  
//! Returns TRUE if new DS and the interferences' pool has been created <br>
  Standard_EXPORT     Standard_Boolean IsNewFiller() const;
  
//! Modifier <br>
  Standard_EXPORT     void SetNewFiller(const Standard_Boolean aFlag) const;
  
//! Selector <br>
  Standard_EXPORT     Standard_Boolean IsDone() const;
  
       const TColStd_DataMapOfIntegerListOfInteger& SplitFacePool() const;
  
        TColStd_DataMapOfIntegerListOfInteger& ChangeSplitFacePool() ;
  //! Finds sub-shapes of theShape having equal type <br>
//!          and store them in theShapeResult. <br>
//!          Returns the following status codes: <br>
//!          0 - OK <br>
//!          1 - Error: theShape is a COMPSOLID <br>
//!          2 - Error: theShape is not a COMPOUND <br>
//!          3 - Error: theShape contains shapes of COMPSOLID type <br>
//!          4 - Error: Subshape of theShape have unkown type <br>
//!          5 - Error: theShape contains shapes of different type <br>
  Standard_EXPORT   static  Standard_Integer TreatCompound(const TopoDS_Shape& theShape,TopoDS_Shape& theShapeResult) ;





protected:





private:

  
//! Clear contents of the DS and the interferences' pool <br>
  Standard_EXPORT     void Clear() ;


TopoDS_Shape myShape1;
TopoDS_Shape myShape2;
BooleanOperations_PShapesDataStructure myDS;
BOPTools_PInterferencePool myInterfPool;
BOPTools_PPaveFiller myPaveFiller;
Standard_Boolean myIsDone;
TColStd_DataMapOfIntegerListOfInteger mySplitFacePool;
Standard_Boolean myNewFiller;


};


#include <BOPTools_DSFiller.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif