Salome HOME
Update copyright
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Gluer2.hxx
1 // Copyright (C) 2007-2011  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 // File:        GEOMAlgo_Gluer2.hxx
23 // Created:     
24 // Author:      Peter KURNEV
25 //              <pkv@irinox>
26
27 #ifndef _GEOMAlgo_Gluer2_HeaderFile
28 #define _GEOMAlgo_Gluer2_HeaderFile
29
30 #include <Standard.hxx>
31 #include <Standard_Macro.hxx>
32
33 #include <TopTools_DataMapOfShapeListOfShape.hxx>
34 #include <TopTools_DataMapOfShapeShape.hxx>
35 #include <Standard_Boolean.hxx>
36 #include <GEOMAlgo_GluerAlgo.hxx>
37 #include <TopAbs_ShapeEnum.hxx>
38 #include <NMTTools_CoupleOfShape.hxx>
39 #include <NMTTools_ListOfCoupleOfShape.hxx>
40 #include <GEOMAlgo_BuilderShape.hxx>
41
42 //=======================================================================
43 //class : GEOMAlgo_Gluer2
44 //purpose  : 
45 //=======================================================================
46 class GEOMAlgo_Gluer2  : public GEOMAlgo_GluerAlgo, 
47                          public GEOMAlgo_BuilderShape {
48 public:
49   
50   Standard_EXPORT   GEOMAlgo_Gluer2();
51   
52   Standard_EXPORT virtual ~GEOMAlgo_Gluer2();
53   
54   Standard_EXPORT     void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
55   
56   Standard_EXPORT    const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
57   
58   Standard_EXPORT     void SetKeepNonSolids(const Standard_Boolean theFlag) ;
59   
60   Standard_EXPORT     Standard_Boolean KeepNonSolids() const;
61   
62   Standard_EXPORT   virtual  void Clear() ;
63   
64   Standard_EXPORT   virtual  void Perform() ;
65   
66   Standard_EXPORT   virtual  void CheckData() ;
67   
68   Standard_EXPORT     void Detect() ;
69   
70   Standard_EXPORT    const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
71   
72   Standard_EXPORT    const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
73   
74   Standard_EXPORT   virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
75   
76   Standard_EXPORT   virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
77   
78   Standard_EXPORT   virtual  Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
79   
80   Standard_EXPORT   static  void MakeVertex(const TopTools_ListOfShape& theLV,
81                                             TopoDS_Vertex& theV) ;
82   
83   Standard_EXPORT   static  void MapBRepShapes(const TopoDS_Shape& theS,
84                                                TopTools_MapOfShape& theM) ;
85   
86   Standard_EXPORT   static  void MapShapes(const TopoDS_Shape& theS,
87                                            TopTools_MapOfShape& theM) ;
88
89
90 protected:
91   
92   Standard_EXPORT     void PerformShapesToWork() ;
93   
94   Standard_EXPORT     void FillVertices() ;
95   
96   Standard_EXPORT     void FillEdges() ;
97   
98   Standard_EXPORT     void FillWires() ;
99   
100   Standard_EXPORT     void FillFaces() ;
101   
102   Standard_EXPORT     void FillShells() ;
103   
104   Standard_EXPORT     void FillSolids() ;
105   
106   Standard_EXPORT     void FillCompSolids() ;
107   
108   Standard_EXPORT     void FillCompounds() ;
109   
110   Standard_EXPORT     void BuildResult() ;
111   
112   Standard_EXPORT     void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
113   
114   Standard_EXPORT     void FillContainers(const TopAbs_ShapeEnum theType) ;
115   
116   Standard_EXPORT     void FillCompound(const TopoDS_Shape& theC) ;
117   
118   Standard_EXPORT     virtual  void PrepareHistory() ;
119   
120   Standard_EXPORT     Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
121   
122   Standard_EXPORT     void MakeBRepShapes(const TopoDS_Shape& theS,
123                                           TopoDS_Shape& theSnew) ;
124   
125   Standard_EXPORT     void MakeEdge(const TopoDS_Edge& theE,
126                                     TopoDS_Edge& theEnew) ;
127   
128   Standard_EXPORT     void MakeFace(const TopoDS_Face& theF,
129                                     TopoDS_Face& theFnew) ;
130   
131   Standard_EXPORT     void TreatPair(const NMTTools_CoupleOfShape& theCS,
132                                      NMTTools_ListOfCoupleOfShape& theLCS) ;
133
134 protected:
135   TopTools_DataMapOfShapeListOfShape myShapesToGlue;
136   TopTools_DataMapOfShapeListOfShape myImagesDetected;
137   TopTools_DataMapOfShapeShape myOriginsDetected;
138   TopTools_DataMapOfShapeListOfShape myImagesToWork;
139   TopTools_DataMapOfShapeShape myOriginsToWork;
140   Standard_Boolean myKeepNonSolids;
141
142 private:
143 };
144 #endif