Salome HOME
8174eb986cdf984643d768117a99013d3ee44855
[modules/geom.git] / src / PARTITION / Partition_Spliter.hxx
1 // File generated by CPPExt (Value)
2 //                     Copyright (C) 1991,1995 by
3 //  
4 //                      MATRA DATAVISION, FRANCE
5 //  
6 // This software is furnished in accordance with the terms and conditions
7 // of the contract and with the inclusion of the above copyright notice.
8 // This software or any other copy thereof may not be provided or otherwise
9 // be made available to any other person. No title to an ownership of the
10 // software is hereby transferred.
11 //  
12 // At the termination of the contract, the software and all copies of this
13 // software must be deleted.
14
15 #ifndef _Partition_Spliter_HeaderFile
16 #define _Partition_Spliter_HeaderFile
17
18 #ifndef _TopAbs_ShapeEnum_HeaderFile
19 #include <TopAbs_ShapeEnum.hxx>
20 #endif
21 #ifndef _TopoDS_Compound_HeaderFile
22 #include <TopoDS_Compound.hxx>
23 #endif
24 #ifndef _BRep_Builder_HeaderFile
25 #include <BRep_Builder.hxx>
26 #endif
27 #ifndef _TopTools_ListOfShape_HeaderFile
28 #include <TopTools_ListOfShape.hxx>
29 #endif
30 #ifndef _TopTools_MapOfShape_HeaderFile
31 #include <TopTools_MapOfShape.hxx>
32 #endif
33 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
34 #include <TopTools_DataMapOfShapeShape.hxx>
35 #endif
36 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
37 #include <Handle_BRepAlgo_AsDes.hxx>
38 #endif
39 #ifndef _BRepAlgo_Image_HeaderFile
40 #include <BRepAlgo_Image.hxx>
41 #endif
42 #ifndef _Partition_Inter3d_HeaderFile
43 #include "Partition_Inter3d.hxx"
44 #endif
45 #ifndef _TopTools_MapOfOrientedShape_HeaderFile
46 #include <TopTools_MapOfOrientedShape.hxx>
47 #endif
48 #ifndef _Standard_Boolean_HeaderFile
49 #include <Standard_Boolean.hxx>
50 #endif
51 class BRepAlgo_AsDes;
52 class TopoDS_Shape;
53 class TopTools_ListOfShape;
54 class TopoDS_Edge;
55
56
57 #ifndef _Standard_HeaderFile
58 #include <Standard.hxx>
59 #endif
60 #ifndef _Standard_Macro_HeaderFile
61 #include <Standard_Macro.hxx>
62 #endif
63
64 class Partition_Spliter  {
65
66 public:
67
68     void* operator new(size_t,void* anAddress) 
69       {
70         return anAddress;
71       }
72     void* operator new(size_t size) 
73       { 
74         return Standard::Allocate(size); 
75       }
76     void  operator delete(void *anAddress) 
77       { 
78         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
79       }
80  // Methods PUBLIC
81  // 
82 Standard_EXPORT Partition_Spliter();
83 Standard_EXPORT   void AddShape(const TopoDS_Shape& S) ;
84 Standard_EXPORT   void AddTool(const TopoDS_Shape& S) ;
85 Standard_EXPORT   void Compute(const TopAbs_ShapeEnum Limit = TopAbs_SHAPE) ;
86 Standard_EXPORT   void KeepShapesInside(const TopoDS_Shape& S) ;
87 Standard_EXPORT   void RemoveShapesInside(const TopoDS_Shape& S) ;
88 Standard_EXPORT   TopoDS_Shape Shape() const;
89 Standard_EXPORT   void Clear() ;
90
91
92
93
94
95 protected:
96
97  // Methods PROTECTED
98  // 
99
100
101  // Fields PROTECTED
102  //
103
104
105 private: 
106
107  // Methods PRIVATE
108  // 
109 Standard_EXPORT   void MakeShells(const TopoDS_Shape& S,TopTools_ListOfShape& NS) ;
110 Standard_EXPORT   TopoDS_Shape MakeFaces(const TopoDS_Shape& S) ;
111 Standard_EXPORT   void MakeEdges(const TopoDS_Edge& E,const TopTools_ListOfShape& VOnE,TopTools_ListOfShape& NE) const;
112 Standard_EXPORT   TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ;
113 Standard_EXPORT   Standard_Boolean CheckTool(const TopoDS_Shape& S) ;
114 Standard_EXPORT   void MergeEqualEdges(const TopTools_ListOfShape& LE) ;
115
116
117  // Fields PRIVATE
118  //
119 TopAbs_ShapeEnum myDoneStep;
120 TopoDS_Compound myShape;
121 BRep_Builder myBuilder;
122 TopTools_ListOfShape myListShapes;
123 TopTools_MapOfShape myMapFaces;
124 TopTools_MapOfShape myMapTools;
125 TopTools_DataMapOfShapeShape myFaceShapeMap;
126 TopTools_MapOfShape myNewSection;
127 Handle_BRepAlgo_AsDes myAsDes;
128 BRepAlgo_Image myImagesFaces;
129 BRepAlgo_Image myImagesEdges;
130 BRepAlgo_Image myImageShape;
131 Partition_Inter3d myInter3d;
132 TopTools_MapOfOrientedShape myAddedFacesMap;
133 TopTools_MapOfShape myEqualEdges;
134 TopTools_DataMapOfShapeShape myInternalFaces;
135
136
137 };
138
139 // other Inline functions and methods (like "C++: function call" methods)
140 //
141
142
143 #endif