Back to index

salome-geom  6.5.0
GEOMAlgo_Gluer2.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File:        GEOMAlgo_Gluer2.hxx
00024 // Author:      Peter KURNEV
00025 
00026 #ifndef _GEOMAlgo_Gluer2_HeaderFile
00027 #define _GEOMAlgo_Gluer2_HeaderFile
00028 
00029 #include <Standard.hxx>
00030 #include <Standard_Macro.hxx>
00031 #include <Standard_Boolean.hxx>
00032 
00033 #include <TopAbs_ShapeEnum.hxx>
00034 
00035 #include <TopTools_DataMapOfShapeListOfShape.hxx>
00036 #include <TopTools_DataMapOfShapeShape.hxx>
00037 
00038 #include <NMTTools_CoupleOfShape.hxx>
00039 #include <NMTTools_ListOfCoupleOfShape.hxx>
00040 
00041 #include <GEOMAlgo_GluerAlgo.hxx>
00042 #include <GEOMAlgo_BuilderShape.hxx>
00043 #include <GEOMAlgo_GlueDetector.hxx>
00044 
00045 //=======================================================================
00046 //class : GEOMAlgo_Gluer2
00047 //purpose  :
00048 //=======================================================================
00049 class GEOMAlgo_Gluer2  : public GEOMAlgo_GluerAlgo,
00050                          public GEOMAlgo_BuilderShape {
00051 public:
00052 
00053   Standard_EXPORT
00054     GEOMAlgo_Gluer2();
00055 
00056   Standard_EXPORT
00057     virtual ~GEOMAlgo_Gluer2();
00058 
00059   Standard_EXPORT
00060     void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
00061 
00062   Standard_EXPORT
00063     const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
00064 
00065   Standard_EXPORT
00066     void SetKeepNonSolids(const Standard_Boolean theFlag) ;
00067 
00068   Standard_EXPORT
00069     Standard_Boolean KeepNonSolids() const;
00070 
00071   Standard_EXPORT   virtual  void Clear() ;
00072 
00073   Standard_EXPORT
00074     virtual  void Perform() ;
00075 
00076   Standard_EXPORT
00077     virtual  void CheckData() ;
00078 
00079   Standard_EXPORT
00080     void Detect() ;
00081 
00082   Standard_EXPORT
00083     const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
00084 
00085   Standard_EXPORT
00086     const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
00087 
00088   Standard_EXPORT
00089     virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
00090 
00091   Standard_EXPORT
00092     virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
00093 
00094   Standard_EXPORT
00095     virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
00096 
00097   Standard_EXPORT
00098     static void MakeVertex(const TopTools_ListOfShape& theLV,
00099                            TopoDS_Vertex& theV) ;
00100 
00101   Standard_EXPORT
00102     static void MapBRepShapes(const TopoDS_Shape& theS,
00103                               TopTools_MapOfShape& theM) ;
00104 
00105   Standard_EXPORT
00106     static void MapShapes(const TopoDS_Shape& theS,
00107                           TopTools_MapOfShape& theM) ;
00108 
00109 //modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
00110   Standard_EXPORT
00111     const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
00112 //modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
00113 //------------------------------------------------
00114 protected:
00115   Standard_EXPORT
00116     void PerformShapesToWork() ;
00117 
00118   Standard_EXPORT
00119     void FillVertices() ;
00120 
00121   Standard_EXPORT
00122     void FillEdges() ;
00123 
00124   Standard_EXPORT
00125     void FillWires() ;
00126 
00127   Standard_EXPORT
00128     void FillFaces() ;
00129 
00130   Standard_EXPORT
00131     void FillShells() ;
00132 
00133   Standard_EXPORT
00134     void FillSolids() ;
00135 
00136   Standard_EXPORT
00137     void FillCompSolids() ;
00138 
00139   Standard_EXPORT
00140     void FillCompounds() ;
00141 
00142   Standard_EXPORT
00143     void BuildResult() ;
00144 
00145   Standard_EXPORT
00146     void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
00147 
00148   Standard_EXPORT
00149     void FillContainers(const TopAbs_ShapeEnum theType) ;
00150 
00151   Standard_EXPORT
00152     void FillCompound(const TopoDS_Shape& theC) ;
00153 
00154   Standard_EXPORT
00155     virtual  void PrepareHistory() ;
00156 
00157   Standard_EXPORT
00158     Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
00159 
00160   Standard_EXPORT
00161     void MakeBRepShapes(const TopoDS_Shape& theS,
00162                         TopoDS_Shape& theSnew) ;
00163 
00164   Standard_EXPORT
00165     void MakeEdge(const TopoDS_Edge& theE,
00166                   TopoDS_Edge& theEnew) ;
00167 
00168   Standard_EXPORT
00169     void MakeFace(const TopoDS_Face& theF,
00170                   TopoDS_Face& theFnew) ;
00171 
00172   Standard_EXPORT
00173     void TreatPair(const NMTTools_CoupleOfShape& theCS,
00174                    NMTTools_ListOfCoupleOfShape& theLCS) ;
00175 
00176 protected:
00177   TopTools_DataMapOfShapeListOfShape myShapesToGlue;
00178   TopTools_DataMapOfShapeListOfShape myImagesDetected;
00179   TopTools_DataMapOfShapeShape myOriginsDetected;
00180   TopTools_DataMapOfShapeListOfShape myImagesToWork;
00181   TopTools_DataMapOfShapeShape myOriginsToWork;
00182   Standard_Boolean myKeepNonSolids;
00183   //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f
00184   GEOMAlgo_GlueDetector myDetector;
00185   //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t
00186 private:
00187 };
00188 #endif