Salome HOME
This commit was generated by cvs2git to create tag 'TRIPOLI_323'.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Gluer.hxx
1
2 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
3 //
4 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2.1 of the License.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 //
21 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 //
23
24 // File:        GEOMAlgo_Gluer.hxx
25 // Created:     Sat Dec 04 12:45:53 2004
26 // Author:      Peter KURNEV
27 //              <peter@PREFEX>
28 //
29 #ifndef _GEOMAlgo_Gluer_HeaderFile
30 #define _GEOMAlgo_Gluer_HeaderFile
31
32 #include <Standard.hxx>
33 #include <Standard_Macro.hxx>
34 #include <Standard_Boolean.hxx>
35 #include <Standard_Real.hxx>
36 #include <TopTools_DataMapOfShapeListOfShape.hxx>
37 #include <TopTools_DataMapOfShapeShape.hxx>
38 #include <Standard_Integer.hxx>
39 #include <TopTools_ListOfShape.hxx>
40 #include <GEOMAlgo_ShapeAlgo.hxx>
41 #include <TopAbs_ShapeEnum.hxx>
42 #include <TopoDS_Shape.hxx>
43 #include <TopoDS_Edge.hxx>
44 #include <TopoDS_Face.hxx>
45 #include <TopoDS_Vertex.hxx>
46 #include <GEOMAlgo_PassKeyShape.hxx>
47 #include <TopTools_MapOfShape.hxx>
48 #include <TopoDS_Compound.hxx>
49
50 //=======================================================================
51 //class    : GEOMAlgo_Gluer
52 //purpose  :
53 //=======================================================================
54 class GEOMAlgo_Gluer  : public GEOMAlgo_ShapeAlgo {
55 public:
56   Standard_EXPORT
57     GEOMAlgo_Gluer();
58
59   Standard_EXPORT
60     virtual ~GEOMAlgo_Gluer();
61
62   Standard_EXPORT
63     void SetCheckGeometry(const Standard_Boolean aFlag) ;
64
65   Standard_EXPORT
66     Standard_Boolean CheckGeometry() const;
67
68   Standard_EXPORT
69     void SetKeepNonSolids(const Standard_Boolean aFlag) ;
70
71   Standard_EXPORT
72     Standard_Boolean KeepNonSolids() const;
73
74   Standard_EXPORT
75     virtual  void Perform() ;
76
77   Standard_EXPORT
78     Standard_Integer AloneShapes() const;
79
80   Standard_EXPORT
81     const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
82
83   Standard_EXPORT
84     const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
85
86   Standard_EXPORT
87     Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
88
89   Standard_EXPORT
90     const TopTools_DataMapOfShapeListOfShape& Images() const;
91
92   Standard_EXPORT
93     const TopTools_DataMapOfShapeShape& Origins() const;
94
95  protected:
96   Standard_EXPORT
97     virtual  void CheckData() ;
98
99   Standard_EXPORT
100     virtual  void CheckResult() ;
101
102   Standard_EXPORT
103     void MakeVertices() ;
104
105   Standard_EXPORT
106     void MakeEdges() ;
107
108   Standard_EXPORT
109     void MakeFaces() ;
110
111   Standard_EXPORT
112     void MakeShapes(const TopAbs_ShapeEnum aType) ;
113
114   Standard_EXPORT
115     void MakeShells() ;
116
117   Standard_EXPORT
118     void MakeSolids() ;
119
120   Standard_EXPORT
121     void InnerTolerance() ;
122
123   Standard_EXPORT
124     void EdgePassKey(const TopoDS_Edge& aE,
125                      GEOMAlgo_PassKeyShape& aPK) ;
126
127   Standard_EXPORT
128     void FacePassKey(const TopoDS_Face& aF,
129                      GEOMAlgo_PassKeyShape& aPK) ;
130
131   Standard_EXPORT
132     void MakeVertex(const TopTools_ListOfShape& aLV,
133                     TopoDS_Vertex& aNewV) ;
134
135   Standard_EXPORT
136     void MakeEdge(const TopoDS_Edge& aEdge,
137                   TopoDS_Edge& aNewEdge) ;
138
139   Standard_EXPORT
140     void MakeFace(const TopoDS_Face& aFace,
141                   TopoDS_Face& aNewEdge) ;
142
143   Standard_EXPORT
144     Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
145                                  const TopoDS_Face& aF) ;
146
147   Standard_EXPORT
148     Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
149
150   Standard_EXPORT
151     void MakeSubShapes(const TopoDS_Shape& aS,
152                        TopTools_MapOfShape& aM,
153                        TopoDS_Compound& aC) ;
154
155
156   Standard_Boolean myCheckGeometry;
157   Standard_Boolean myKeepNonSolids;
158   Standard_Real myTol;
159   TopTools_DataMapOfShapeListOfShape myImages;
160   TopTools_DataMapOfShapeShape myOrigins;
161   Standard_Integer myNbAlone;
162   TopTools_ListOfShape myGenerated;
163 };
164 #endif