Salome HOME
Update copyright information
[modules/geom.git] / src / GEOMAlgo_NEW / GEOMAlgo_Gluer2.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        GEOMAlgo_Gluer2.hxx
24 // Author:      Peter KURNEV
25
26 #ifndef _GEOMAlgo_Gluer2_HeaderFile
27 #define _GEOMAlgo_Gluer2_HeaderFile
28
29 #include <Standard.hxx>
30 #include <Standard_Macro.hxx>
31 #include <Standard_Boolean.hxx>
32
33 #include <TopAbs_ShapeEnum.hxx>
34
35 #include <TopTools_DataMapOfShapeListOfShape.hxx>
36 #include <TopTools_DataMapOfShapeShape.hxx>
37
38 #include <NMTTools_CoupleOfShape.hxx>
39 #include <NMTTools_ListOfCoupleOfShape.hxx>
40
41 #include <GEOMAlgo_GluerAlgo.hxx>
42 #include <GEOMAlgo_BuilderShape.hxx>
43 #include <GEOMAlgo_GlueDetector.hxx>
44
45 //=======================================================================
46 //class : GEOMAlgo_Gluer2
47 //purpose  :
48 //=======================================================================
49 class GEOMAlgo_Gluer2  : public GEOMAlgo_GluerAlgo,
50                          public GEOMAlgo_BuilderShape {
51 public:
52
53   Standard_EXPORT
54     GEOMAlgo_Gluer2();
55
56   Standard_EXPORT
57     virtual ~GEOMAlgo_Gluer2();
58
59   Standard_EXPORT
60     void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
61
62   Standard_EXPORT
63     const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
64
65   Standard_EXPORT
66     void SetKeepNonSolids(const Standard_Boolean theFlag) ;
67
68   Standard_EXPORT
69     Standard_Boolean KeepNonSolids() const;
70
71   Standard_EXPORT   virtual  void Clear() ;
72
73   Standard_EXPORT
74     virtual  void Perform() ;
75
76   Standard_EXPORT
77     virtual  void CheckData() ;
78
79   Standard_EXPORT
80     void Detect() ;
81
82   Standard_EXPORT
83     const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
84
85   Standard_EXPORT
86     const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
87
88   Standard_EXPORT
89     virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
90
91   Standard_EXPORT
92     virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
93
94   Standard_EXPORT
95     virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
96
97   Standard_EXPORT
98     static void MakeVertex(const TopTools_ListOfShape& theLV,
99                            TopoDS_Vertex& theV) ;
100
101   Standard_EXPORT
102     static void MapBRepShapes(const TopoDS_Shape& theS,
103                               TopTools_MapOfShape& theM) ;
104
105   Standard_EXPORT
106     static void MapShapes(const TopoDS_Shape& theS,
107                           TopTools_MapOfShape& theM) ;
108
109 //modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
110   Standard_EXPORT
111     const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
112 //modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
113 //------------------------------------------------
114 protected:
115   Standard_EXPORT
116     void PerformShapesToWork() ;
117
118   Standard_EXPORT
119     void FillVertices() ;
120
121   Standard_EXPORT
122     void FillEdges() ;
123
124   Standard_EXPORT
125     void FillWires() ;
126
127   Standard_EXPORT
128     void FillFaces() ;
129
130   Standard_EXPORT
131     void FillShells() ;
132
133   Standard_EXPORT
134     void FillSolids() ;
135
136   Standard_EXPORT
137     void FillCompSolids() ;
138
139   Standard_EXPORT
140     void FillCompounds() ;
141
142   Standard_EXPORT
143     void BuildResult() ;
144
145   Standard_EXPORT
146     void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
147
148   Standard_EXPORT
149     void FillContainers(const TopAbs_ShapeEnum theType) ;
150
151   Standard_EXPORT
152     void FillCompound(const TopoDS_Shape& theC) ;
153
154   Standard_EXPORT
155     virtual  void PrepareHistory() ;
156
157   Standard_EXPORT
158     Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
159
160   Standard_EXPORT
161     void MakeBRepShapes(const TopoDS_Shape& theS,
162                         TopoDS_Shape& theSnew) ;
163
164   Standard_EXPORT
165     void MakeEdge(const TopoDS_Edge& theE,
166                   TopoDS_Edge& theEnew) ;
167
168   Standard_EXPORT
169     void MakeFace(const TopoDS_Face& theF,
170                   TopoDS_Face& theFnew) ;
171
172   Standard_EXPORT
173     void TreatPair(const NMTTools_CoupleOfShape& theCS,
174                    NMTTools_ListOfCoupleOfShape& theLCS) ;
175
176 protected:
177   TopTools_DataMapOfShapeListOfShape myShapesToGlue;
178   TopTools_DataMapOfShapeListOfShape myImagesDetected;
179   TopTools_DataMapOfShapeShape myOriginsDetected;
180   TopTools_DataMapOfShapeListOfShape myImagesToWork;
181   TopTools_DataMapOfShapeShape myOriginsToWork;
182   Standard_Boolean myKeepNonSolids;
183   //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f
184   GEOMAlgo_GlueDetector myDetector;
185   //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t
186 private:
187 };
188 #endif