2 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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>
35 #include <Standard_Boolean.hxx>
36 #include <Standard_Real.hxx>
37 #include <Standard_Integer.hxx>
39 #include <TopAbs_ShapeEnum.hxx>
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>
47 #include <TopTools_MapOfShape.hxx>
48 #include <TopTools_DataMapOfShapeListOfShape.hxx>
49 #include <TopTools_DataMapOfShapeShape.hxx>
50 #include <TopTools_ListOfShape.hxx>
52 #include <GEOMAlgo_ShapeAlgo.hxx>
53 #include <GEOMAlgo_PassKeyShape.hxx>
55 //=======================================================================
56 //class : GEOMAlgo_Gluer
58 //=======================================================================
59 class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo {
65 virtual ~GEOMAlgo_Gluer();
68 void SetCheckGeometry(const Standard_Boolean aFlag) ;
71 Standard_Boolean CheckGeometry() const;
74 void SetKeepNonSolids(const Standard_Boolean aFlag) ;
77 Standard_Boolean KeepNonSolids() const;
80 virtual void Perform() ;
83 Standard_Integer AloneShapes() const;
86 const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
89 const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
92 Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
95 const TopTools_DataMapOfShapeListOfShape& Images() const;
98 const TopTools_DataMapOfShapeShape& Origins() const;
102 virtual void CheckData() ;
105 virtual void CheckResult() ;
108 void MakeVertices() ;
117 void MakeShapes(const TopAbs_ShapeEnum aType) ;
126 void InnerTolerance() ;
129 void EdgePassKey(const TopoDS_Edge& aE,
130 GEOMAlgo_PassKeyShape& aPK) ;
133 void FacePassKey(const TopoDS_Face& aF,
134 GEOMAlgo_PassKeyShape& aPK) ;
137 void MakeVertex(const TopTools_ListOfShape& aLV,
138 TopoDS_Vertex& aNewV) ;
141 void MakeEdge(const TopoDS_Edge& aEdge,
142 TopoDS_Edge& aNewEdge) ;
145 void MakeFace(const TopoDS_Face& aFace,
146 TopoDS_Face& aNewEdge) ;
149 Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
150 const TopoDS_Face& aF) ;
153 Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
156 void MakeSubShapes(const TopoDS_Shape& aS,
157 TopTools_MapOfShape& aM,
158 TopoDS_Compound& aC) ;
161 Standard_Boolean myCheckGeometry;
162 Standard_Boolean myKeepNonSolids;
164 TopTools_DataMapOfShapeListOfShape myImages;
165 TopTools_DataMapOfShapeShape myOrigins;
166 Standard_Integer myNbAlone;
167 TopTools_ListOfShape myGenerated;