1 // Copyright (C) 2007-2023 CEA, EDF, 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, or (at your option) any later version.
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 <GeomAlgoImpl.h>
31 #include <Standard.hxx>
32 #include <Standard_Macro.hxx>
33 #include <Standard_Boolean.hxx>
35 #include <TopAbs_ShapeEnum.hxx>
37 #include <TopTools_DataMapOfShapeListOfShape.hxx>
38 #include <TopTools_DataMapOfShapeShape.hxx>
40 #include <GEOMAlgo_GluerAlgo.hxx>
41 #include <GEOMAlgo_BuilderShape.hxx>
42 #include <GEOMAlgo_GlueDetector.hxx>
43 #include <GEOMAlgo_CoupleOfShapes.hxx>
44 #include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
46 //=======================================================================
47 //class : GEOMAlgo_Gluer2
49 //=======================================================================
50 class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
51 public GEOMAlgo_BuilderShape {
54 GEOMALGOIMPL_EXPORT GEOMAlgo_Gluer2();
56 GEOMALGOIMPL_EXPORT virtual ~GEOMAlgo_Gluer2();
58 GEOMALGOIMPL_EXPORT void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM);
60 GEOMALGOIMPL_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
62 GEOMALGOIMPL_EXPORT void SetKeepNonSolids(const Standard_Boolean theFlag);
64 GEOMALGOIMPL_EXPORT Standard_Boolean KeepNonSolids() const;
66 GEOMALGOIMPL_EXPORT virtual void Clear();
68 GEOMALGOIMPL_EXPORT virtual void Perform();
70 GEOMALGOIMPL_EXPORT virtual void CheckData();
72 GEOMALGOIMPL_EXPORT void Detect();
74 GEOMALGOIMPL_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
76 GEOMALGOIMPL_EXPORT const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
78 GEOMALGOIMPL_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS);
80 GEOMALGOIMPL_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS);
82 GEOMALGOIMPL_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS);
85 GEOMALGOIMPL_EXPORT static void MakeVertex(const TopTools_ListOfShape& theLV,
88 GEOMALGOIMPL_EXPORT static void MapBRepShapes(const TopoDS_Shape& theS,
89 TopTools_MapOfShape& theM);
91 GEOMALGOIMPL_EXPORT static void MapShapes(const TopoDS_Shape& theS,
92 TopTools_MapOfShape& theM);
94 //modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
95 GEOMALGOIMPL_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
96 //modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
97 //------------------------------------------------
99 GEOMALGOIMPL_EXPORT void PerformShapesToWork() ;
101 GEOMALGOIMPL_EXPORT void FillVertices();
102 GEOMALGOIMPL_EXPORT void FillEdges();
103 GEOMALGOIMPL_EXPORT void FillWires();
104 GEOMALGOIMPL_EXPORT void FillFaces();
105 GEOMALGOIMPL_EXPORT void FillShells();
106 GEOMALGOIMPL_EXPORT void FillSolids();
107 GEOMALGOIMPL_EXPORT void FillCompSolids();
108 GEOMALGOIMPL_EXPORT void FillCompounds();
110 GEOMALGOIMPL_EXPORT void BuildResult();
112 GEOMALGOIMPL_EXPORT void FillBRepShapes(const TopAbs_ShapeEnum theType);
113 GEOMALGOIMPL_EXPORT void FillContainers(const TopAbs_ShapeEnum theType);
114 GEOMALGOIMPL_EXPORT void FillCompound(const TopoDS_Shape& theC);
116 GEOMALGOIMPL_EXPORT virtual void PrepareHistory();
118 GEOMALGOIMPL_EXPORT Standard_Boolean HasImage(const TopoDS_Shape& theC);
120 GEOMALGOIMPL_EXPORT void MakeBRepShapes(const TopoDS_Shape& theS,
121 TopoDS_Shape& theSnew);
123 GEOMALGOIMPL_EXPORT void MakeEdge(const TopoDS_Edge& theE,
124 TopoDS_Edge& theEnew);
126 GEOMALGOIMPL_EXPORT void MakeFace(const TopoDS_Face& theF,
127 TopoDS_Face& theFnew);
129 GEOMALGOIMPL_EXPORT void TreatPair(const GEOMAlgo_CoupleOfShapes& theCS,
130 GEOMAlgo_ListOfCoupleOfShapes& theLCS);
133 TopTools_DataMapOfShapeListOfShape myShapesToGlue;
134 TopTools_DataMapOfShapeListOfShape myImagesDetected;
135 TopTools_DataMapOfShapeShape myOriginsDetected;
136 TopTools_DataMapOfShapeListOfShape myImagesToWork;
137 TopTools_DataMapOfShapeShape myOriginsToWork;
138 Standard_Boolean myKeepNonSolids;
139 GEOMAlgo_GlueDetector myDetector;