1 // Copyright (C) 2007-2011 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
22 // File: GEOMAlgo_Gluer2.hxx
23 // Author: Peter KURNEV
25 #ifndef _GEOMAlgo_Gluer2_HeaderFile
26 #define _GEOMAlgo_Gluer2_HeaderFile
28 #include <Standard.hxx>
29 #include <Standard_Macro.hxx>
30 #include <Standard_Boolean.hxx>
32 #include <TopAbs_ShapeEnum.hxx>
34 #include <TopTools_DataMapOfShapeListOfShape.hxx>
35 #include <TopTools_DataMapOfShapeShape.hxx>
37 #include <NMTTools_CoupleOfShape.hxx>
38 #include <NMTTools_ListOfCoupleOfShape.hxx>
40 #include <GEOMAlgo_GluerAlgo.hxx>
41 #include <GEOMAlgo_BuilderShape.hxx>
42 #include <GEOMAlgo_GlueDetector.hxx>
44 //=======================================================================
45 //class : GEOMAlgo_Gluer2
47 //=======================================================================
48 class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
49 public GEOMAlgo_BuilderShape {
56 virtual ~GEOMAlgo_Gluer2();
59 void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
62 const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
65 void SetKeepNonSolids(const Standard_Boolean theFlag) ;
68 Standard_Boolean KeepNonSolids() const;
70 Standard_EXPORT virtual void Clear() ;
73 virtual void Perform() ;
76 virtual void CheckData() ;
82 const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
85 const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
88 virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
91 virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
94 virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
97 static void MakeVertex(const TopTools_ListOfShape& theLV,
98 TopoDS_Vertex& theV) ;
101 static void MapBRepShapes(const TopoDS_Shape& theS,
102 TopTools_MapOfShape& theM) ;
105 static void MapShapes(const TopoDS_Shape& theS,
106 TopTools_MapOfShape& theM) ;
108 //modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
110 const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
111 //modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
112 //------------------------------------------------
115 void PerformShapesToWork() ;
118 void FillVertices() ;
136 void FillCompSolids() ;
139 void FillCompounds() ;
145 void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
148 void FillContainers(const TopAbs_ShapeEnum theType) ;
151 void FillCompound(const TopoDS_Shape& theC) ;
154 virtual void PrepareHistory() ;
157 Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
160 void MakeBRepShapes(const TopoDS_Shape& theS,
161 TopoDS_Shape& theSnew) ;
164 void MakeEdge(const TopoDS_Edge& theE,
165 TopoDS_Edge& theEnew) ;
168 void MakeFace(const TopoDS_Face& theF,
169 TopoDS_Face& theFnew) ;
172 void TreatPair(const NMTTools_CoupleOfShape& theCS,
173 NMTTools_ListOfCoupleOfShape& theLCS) ;
176 TopTools_DataMapOfShapeListOfShape myShapesToGlue;
177 TopTools_DataMapOfShapeListOfShape myImagesDetected;
178 TopTools_DataMapOfShapeShape myOriginsDetected;
179 TopTools_DataMapOfShapeListOfShape myImagesToWork;
180 TopTools_DataMapOfShapeShape myOriginsToWork;
181 Standard_Boolean myKeepNonSolids;
182 //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f
183 GEOMAlgo_GlueDetector myDetector;
184 //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t