Back to index

salome-geom  6.5.0
GEOMAlgo_Gluer.hxx
Go to the documentation of this file.
00001 
00002 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 //
00004 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00005 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00006 //
00007 // This library is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public
00009 // License as published by the Free Software Foundation; either
00010 // version 2.1 of the License.
00011 //
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00020 //
00021 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00022 //
00023 
00024 // File:      GEOMAlgo_Gluer.hxx
00025 // Created:   Sat Dec 04 12:45:53 2004
00026 // Author:    Peter KURNEV
00027 //            <peter@PREFEX>
00028 //
00029 #ifndef _GEOMAlgo_Gluer_HeaderFile
00030 #define _GEOMAlgo_Gluer_HeaderFile
00031 
00032 #include <Standard.hxx>
00033 #include <Standard_Macro.hxx>
00034 #include <Standard_Boolean.hxx>
00035 #include <Standard_Real.hxx>
00036 #include <TopTools_DataMapOfShapeListOfShape.hxx>
00037 #include <TopTools_DataMapOfShapeShape.hxx>
00038 #include <Standard_Integer.hxx>
00039 #include <TopTools_ListOfShape.hxx>
00040 #include <GEOMAlgo_ShapeAlgo.hxx>
00041 #include <TopAbs_ShapeEnum.hxx>
00042 #include <TopoDS_Shape.hxx>
00043 #include <TopoDS_Edge.hxx>
00044 #include <TopoDS_Face.hxx>
00045 #include <TopoDS_Vertex.hxx>
00046 #include <GEOMAlgo_PassKeyShape.hxx>
00047 #include <TopTools_MapOfShape.hxx>
00048 #include <TopoDS_Compound.hxx>
00049 
00050 //=======================================================================
00051 //class    : GEOMAlgo_Gluer
00052 //purpose  :
00053 //=======================================================================
00054 class GEOMAlgo_Gluer  : public GEOMAlgo_ShapeAlgo {
00055 public:
00056   Standard_EXPORT
00057     GEOMAlgo_Gluer();
00058 
00059   Standard_EXPORT
00060     virtual ~GEOMAlgo_Gluer();
00061 
00062   Standard_EXPORT
00063     void SetCheckGeometry(const Standard_Boolean aFlag) ;
00064 
00065   Standard_EXPORT
00066     Standard_Boolean CheckGeometry() const;
00067 
00068   Standard_EXPORT
00069     void SetKeepNonSolids(const Standard_Boolean aFlag) ;
00070 
00071   Standard_EXPORT
00072     Standard_Boolean KeepNonSolids() const;
00073 
00074   Standard_EXPORT
00075     virtual  void Perform() ;
00076 
00077   Standard_EXPORT
00078     Standard_Integer AloneShapes() const;
00079 
00080   Standard_EXPORT
00081     const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
00082 
00083   Standard_EXPORT
00084     const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
00085 
00086   Standard_EXPORT
00087     Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
00088 
00089   Standard_EXPORT
00090     const TopTools_DataMapOfShapeListOfShape& Images() const;
00091 
00092   Standard_EXPORT
00093     const TopTools_DataMapOfShapeShape& Origins() const;
00094 
00095  protected:
00096   Standard_EXPORT
00097     virtual  void CheckData() ;
00098 
00099   Standard_EXPORT
00100     virtual  void CheckResult() ;
00101 
00102   Standard_EXPORT
00103     void MakeVertices() ;
00104 
00105   Standard_EXPORT
00106     void MakeEdges() ;
00107 
00108   Standard_EXPORT
00109     void MakeFaces() ;
00110 
00111   Standard_EXPORT
00112     void MakeShapes(const TopAbs_ShapeEnum aType) ;
00113 
00114   Standard_EXPORT
00115     void MakeShells() ;
00116 
00117   Standard_EXPORT
00118     void MakeSolids() ;
00119 
00120   Standard_EXPORT
00121     void InnerTolerance() ;
00122 
00123   Standard_EXPORT
00124     void EdgePassKey(const TopoDS_Edge& aE,
00125                    GEOMAlgo_PassKeyShape& aPK) ;
00126 
00127   Standard_EXPORT
00128     void FacePassKey(const TopoDS_Face& aF,
00129                    GEOMAlgo_PassKeyShape& aPK) ;
00130 
00131   Standard_EXPORT
00132     void MakeVertex(const TopTools_ListOfShape& aLV,
00133                   TopoDS_Vertex& aNewV) ;
00134 
00135   Standard_EXPORT
00136     void MakeEdge(const TopoDS_Edge& aEdge,
00137                 TopoDS_Edge& aNewEdge) ;
00138 
00139   Standard_EXPORT
00140     void MakeFace(const TopoDS_Face& aFace,
00141                 TopoDS_Face& aNewEdge) ;
00142 
00143   Standard_EXPORT
00144     Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
00145                              const TopoDS_Face& aF) ;
00146 
00147   Standard_EXPORT
00148     Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
00149 
00150   Standard_EXPORT
00151     void MakeSubShapes(const TopoDS_Shape& aS,
00152                      TopTools_MapOfShape& aM,
00153                      TopoDS_Compound& aC) ;
00154 
00155 
00156   Standard_Boolean myCheckGeometry;
00157   Standard_Boolean myKeepNonSolids;
00158   Standard_Real myTol;
00159   TopTools_DataMapOfShapeListOfShape myImages;
00160   TopTools_DataMapOfShapeShape myOrigins;
00161   Standard_Integer myNbAlone;
00162   TopTools_ListOfShape myGenerated;
00163 };
00164 #endif