2 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
4 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
21 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File: GEOMAlgo_Gluer.hxx
25 // Created: Sat Dec 04 12:45:53 2004
26 // Author: Peter KURNEV
29 #ifndef _GEOMAlgo_Gluer_HeaderFile
30 #define _GEOMAlgo_Gluer_HeaderFile
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>
50 //=======================================================================
51 //class : GEOMAlgo_Gluer
53 //=======================================================================
54 class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo {
60 virtual ~GEOMAlgo_Gluer();
63 void SetCheckGeometry(const Standard_Boolean aFlag) ;
66 Standard_Boolean CheckGeometry() const;
69 void SetKeepNonSolids(const Standard_Boolean aFlag) ;
72 Standard_Boolean KeepNonSolids() const;
75 virtual void Perform() ;
78 Standard_Integer AloneShapes() const;
81 const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
84 const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
87 Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
90 const TopTools_DataMapOfShapeListOfShape& Images() const;
93 const TopTools_DataMapOfShapeShape& Origins() const;
97 virtual void CheckData() ;
100 virtual void CheckResult() ;
103 void MakeVertices() ;
112 void MakeShapes(const TopAbs_ShapeEnum aType) ;
121 void InnerTolerance() ;
124 void EdgePassKey(const TopoDS_Edge& aE,
125 GEOMAlgo_PassKeyShape& aPK) ;
128 void FacePassKey(const TopoDS_Face& aF,
129 GEOMAlgo_PassKeyShape& aPK) ;
132 void MakeVertex(const TopTools_ListOfShape& aLV,
133 TopoDS_Vertex& aNewV) ;
136 void MakeEdge(const TopoDS_Edge& aEdge,
137 TopoDS_Edge& aNewEdge) ;
140 void MakeFace(const TopoDS_Face& aFace,
141 TopoDS_Face& aNewEdge) ;
144 Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
145 const TopoDS_Face& aF) ;
148 Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
151 void MakeSubShapes(const TopoDS_Shape& aS,
152 TopTools_MapOfShape& aM,
153 TopoDS_Compound& aC) ;
156 Standard_Boolean myCheckGeometry;
157 Standard_Boolean myKeepNonSolids;
159 TopTools_DataMapOfShapeListOfShape myImages;
160 TopTools_DataMapOfShapeShape myOrigins;
161 Standard_Integer myNbAlone;
162 TopTools_ListOfShape myGenerated;