Salome HOME
a00b64382a74878f2584ad2614bf476f7817d076
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Gluer.hxx
1
2 // Copyright (C) 2007-2023  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, or (at your option) any later version.
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
35 #include <Standard_Boolean.hxx>
36 #include <Standard_Real.hxx>
37 #include <Standard_Integer.hxx>
38
39 #include <TopAbs_ShapeEnum.hxx>
40
41 #include <TopoDS_Shape.hxx>
42 #include <TopoDS_Edge.hxx>
43 #include <TopoDS_Face.hxx>
44 #include <TopoDS_Vertex.hxx>
45 #include <TopoDS_Compound.hxx>
46
47 #include <TopTools_MapOfShape.hxx>
48 #include <TopTools_DataMapOfShapeListOfShape.hxx>
49 #include <TopTools_DataMapOfShapeShape.hxx>
50 #include <TopTools_ListOfShape.hxx>
51
52 #include <GEOMAlgo_ShapeAlgo.hxx>
53 #include <GEOMAlgo_PassKeyShape.hxx>
54
55 //=======================================================================
56 //class    : GEOMAlgo_Gluer
57 //purpose  :
58 //=======================================================================
59 class GEOMAlgo_Gluer  : public GEOMAlgo_ShapeAlgo {
60 public:
61   Standard_EXPORT
62     GEOMAlgo_Gluer();
63
64   Standard_EXPORT
65     virtual ~GEOMAlgo_Gluer();
66
67   Standard_EXPORT
68     void SetCheckGeometry(const Standard_Boolean aFlag) ;
69
70   Standard_EXPORT
71     Standard_Boolean CheckGeometry() const;
72
73   Standard_EXPORT
74     void SetKeepNonSolids(const Standard_Boolean aFlag) ;
75
76   Standard_EXPORT
77     Standard_Boolean KeepNonSolids() const;
78
79   Standard_EXPORT
80     virtual  void Perform() ;
81
82   Standard_EXPORT
83     Standard_Integer AloneShapes() const;
84
85   Standard_EXPORT
86     const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
87
88   Standard_EXPORT
89     const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
90
91   Standard_EXPORT
92     Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
93
94   Standard_EXPORT
95     const TopTools_DataMapOfShapeListOfShape& Images() const;
96
97   Standard_EXPORT
98     const TopTools_DataMapOfShapeShape& Origins() const;
99
100  protected:
101   Standard_EXPORT
102     virtual  void CheckData() ;
103
104   Standard_EXPORT
105     virtual  void CheckResult() ;
106
107   Standard_EXPORT
108     void MakeVertices() ;
109
110   Standard_EXPORT
111     void MakeEdges() ;
112
113   Standard_EXPORT
114     void MakeFaces() ;
115
116   Standard_EXPORT
117     void MakeShapes(const TopAbs_ShapeEnum aType) ;
118
119   Standard_EXPORT
120     void MakeShells() ;
121
122   Standard_EXPORT
123     void MakeSolids() ;
124
125   Standard_EXPORT
126     void InnerTolerance() ;
127
128   Standard_EXPORT
129     void EdgePassKey(const TopoDS_Edge& aE,
130                      GEOMAlgo_PassKeyShape& aPK) ;
131
132   Standard_EXPORT
133     void FacePassKey(const TopoDS_Face& aF,
134                      GEOMAlgo_PassKeyShape& aPK) ;
135
136   Standard_EXPORT
137     void MakeVertex(const TopTools_ListOfShape& aLV,
138                     TopoDS_Vertex& aNewV) ;
139
140   Standard_EXPORT
141     void MakeEdge(const TopoDS_Edge& aEdge,
142                   TopoDS_Edge& aNewEdge) ;
143
144   Standard_EXPORT
145     void MakeFace(const TopoDS_Face& aFace,
146                   TopoDS_Face& aNewEdge) ;
147
148   Standard_EXPORT
149     Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
150                                  const TopoDS_Face& aF) ;
151
152   Standard_EXPORT
153     Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
154
155   Standard_EXPORT
156     void MakeSubShapes(const TopoDS_Shape& aS,
157                        TopTools_MapOfShape& aM,
158                        TopoDS_Compound& aC) ;
159
160
161   Standard_Boolean myCheckGeometry;
162   Standard_Boolean myKeepNonSolids;
163   Standard_Real myTol;
164   TopTools_DataMapOfShapeListOfShape myImages;
165   TopTools_DataMapOfShapeShape myOrigins;
166   Standard_Integer myNbAlone;
167   TopTools_ListOfShape myGenerated;
168 };
169 #endif