1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: GEOMAlgo_Gluer2.hxx
24 // Author: Peter KURNEV
26 #ifndef _GEOMAlgo_Gluer2_HeaderFile
27 #define _GEOMAlgo_Gluer2_HeaderFile
29 #include <Standard.hxx>
30 #include <Standard_Macro.hxx>
31 #include <Standard_Boolean.hxx>
33 #include <TopAbs_ShapeEnum.hxx>
35 #include <TopTools_DataMapOfShapeListOfShape.hxx>
36 #include <TopTools_DataMapOfShapeShape.hxx>
38 #include <NMTTools_CoupleOfShape.hxx>
39 #include <NMTTools_ListOfCoupleOfShape.hxx>
41 #include <GEOMAlgo_GluerAlgo.hxx>
42 #include <GEOMAlgo_BuilderShape.hxx>
43 #include <GEOMAlgo_GlueDetector.hxx>
45 //=======================================================================
46 //class : GEOMAlgo_Gluer2
48 //=======================================================================
49 class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
50 public GEOMAlgo_BuilderShape {
57 virtual ~GEOMAlgo_Gluer2();
60 void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
63 const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
66 void SetKeepNonSolids(const Standard_Boolean theFlag) ;
69 Standard_Boolean KeepNonSolids() const;
71 Standard_EXPORT virtual void Clear() ;
74 virtual void Perform() ;
77 virtual void CheckData() ;
83 const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
86 const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
89 virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
92 virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
95 virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
98 static void MakeVertex(const TopTools_ListOfShape& theLV,
99 TopoDS_Vertex& theV) ;
102 static void MapBRepShapes(const TopoDS_Shape& theS,
103 TopTools_MapOfShape& theM) ;
106 static void MapShapes(const TopoDS_Shape& theS,
107 TopTools_MapOfShape& theM) ;
109 //modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
111 const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
112 //modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
113 //------------------------------------------------
116 void PerformShapesToWork() ;
119 void FillVertices() ;
137 void FillCompSolids() ;
140 void FillCompounds() ;
146 void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
149 void FillContainers(const TopAbs_ShapeEnum theType) ;
152 void FillCompound(const TopoDS_Shape& theC) ;
155 virtual void PrepareHistory() ;
158 Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
161 void MakeBRepShapes(const TopoDS_Shape& theS,
162 TopoDS_Shape& theSnew) ;
165 void MakeEdge(const TopoDS_Edge& theE,
166 TopoDS_Edge& theEnew) ;
169 void MakeFace(const TopoDS_Face& theF,
170 TopoDS_Face& theFnew) ;
173 void TreatPair(const NMTTools_CoupleOfShape& theCS,
174 NMTTools_ListOfCoupleOfShape& theLCS) ;
177 TopTools_DataMapOfShapeListOfShape myShapesToGlue;
178 TopTools_DataMapOfShapeListOfShape myImagesDetected;
179 TopTools_DataMapOfShapeShape myOriginsDetected;
180 TopTools_DataMapOfShapeListOfShape myImagesToWork;
181 TopTools_DataMapOfShapeShape myOriginsToWork;
182 Standard_Boolean myKeepNonSolids;
183 //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f
184 GEOMAlgo_GlueDetector myDetector;
185 //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t