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
24 // Author: Peter KURNEV
27 #ifndef _GEOMAlgo_Gluer2_HeaderFile
28 #define _GEOMAlgo_Gluer2_HeaderFile
30 #include <Standard.hxx>
31 #include <Standard_Macro.hxx>
33 #include <TopTools_DataMapOfShapeListOfShape.hxx>
34 #include <TopTools_DataMapOfShapeShape.hxx>
35 #include <Standard_Boolean.hxx>
36 #include <GEOMAlgo_GluerAlgo.hxx>
37 #include <TopAbs_ShapeEnum.hxx>
38 #include <NMTTools_CoupleOfShape.hxx>
39 #include <NMTTools_ListOfCoupleOfShape.hxx>
40 #include <GEOMAlgo_BuilderShape.hxx>
42 //=======================================================================
43 //class : GEOMAlgo_Gluer2
45 //=======================================================================
46 class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
47 public GEOMAlgo_BuilderShape {
50 Standard_EXPORT GEOMAlgo_Gluer2();
52 Standard_EXPORT virtual ~GEOMAlgo_Gluer2();
54 Standard_EXPORT void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
56 Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
58 Standard_EXPORT void SetKeepNonSolids(const Standard_Boolean theFlag) ;
60 Standard_EXPORT Standard_Boolean KeepNonSolids() const;
62 Standard_EXPORT virtual void Clear() ;
64 Standard_EXPORT virtual void Perform() ;
66 Standard_EXPORT virtual void CheckData() ;
68 Standard_EXPORT void Detect() ;
70 Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
72 Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
74 Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
76 Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
78 Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
80 Standard_EXPORT static void MakeVertex(const TopTools_ListOfShape& theLV,
81 TopoDS_Vertex& theV) ;
83 Standard_EXPORT static void MapBRepShapes(const TopoDS_Shape& theS,
84 TopTools_MapOfShape& theM) ;
86 Standard_EXPORT static void MapShapes(const TopoDS_Shape& theS,
87 TopTools_MapOfShape& theM) ;
92 Standard_EXPORT void PerformShapesToWork() ;
94 Standard_EXPORT void FillVertices() ;
96 Standard_EXPORT void FillEdges() ;
98 Standard_EXPORT void FillWires() ;
100 Standard_EXPORT void FillFaces() ;
102 Standard_EXPORT void FillShells() ;
104 Standard_EXPORT void FillSolids() ;
106 Standard_EXPORT void FillCompSolids() ;
108 Standard_EXPORT void FillCompounds() ;
110 Standard_EXPORT void BuildResult() ;
112 Standard_EXPORT void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
114 Standard_EXPORT void FillContainers(const TopAbs_ShapeEnum theType) ;
116 Standard_EXPORT void FillCompound(const TopoDS_Shape& theC) ;
118 Standard_EXPORT virtual void PrepareHistory() ;
120 Standard_EXPORT Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
122 Standard_EXPORT void MakeBRepShapes(const TopoDS_Shape& theS,
123 TopoDS_Shape& theSnew) ;
125 Standard_EXPORT void MakeEdge(const TopoDS_Edge& theE,
126 TopoDS_Edge& theEnew) ;
128 Standard_EXPORT void MakeFace(const TopoDS_Face& theF,
129 TopoDS_Face& theFnew) ;
131 Standard_EXPORT void TreatPair(const NMTTools_CoupleOfShape& theCS,
132 NMTTools_ListOfCoupleOfShape& theLCS) ;
135 TopTools_DataMapOfShapeListOfShape myShapesToGlue;
136 TopTools_DataMapOfShapeListOfShape myImagesDetected;
137 TopTools_DataMapOfShapeShape myOriginsDetected;
138 TopTools_DataMapOfShapeListOfShape myImagesToWork;
139 TopTools_DataMapOfShapeShape myOriginsToWork;
140 Standard_Boolean myKeepNonSolids;