Version: 6.3.1

src/GEOMAlgo/GEOMAlgo_Gluer.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 #ifndef _GEOMAlgo_Gluer_HeaderFile
00024 #define _GEOMAlgo_Gluer_HeaderFile
00025 
00026 #ifndef _Standard_HeaderFile
00027 #include <Standard.hxx>
00028 #endif
00029 #ifndef _Standard_Macro_HeaderFile
00030 #include <Standard_Macro.hxx>
00031 #endif
00032 
00033 #ifndef _Standard_Boolean_HeaderFile
00034 #include <Standard_Boolean.hxx>
00035 #endif
00036 #ifndef _Standard_Real_HeaderFile
00037 #include <Standard_Real.hxx>
00038 #endif
00039 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
00040 #include <TopTools_DataMapOfShapeListOfShape.hxx>
00041 #endif
00042 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
00043 #include <TopTools_DataMapOfShapeShape.hxx>
00044 #endif
00045 #ifndef _Standard_Integer_HeaderFile
00046 #include <Standard_Integer.hxx>
00047 #endif
00048 #ifndef _TopTools_ListOfShape_HeaderFile
00049 #include <TopTools_ListOfShape.hxx>
00050 #endif
00051 #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
00052 #include <GEOMAlgo_ShapeAlgo.hxx>
00053 #endif
00054 #ifndef _TopAbs_ShapeEnum_HeaderFile
00055 #include <TopAbs_ShapeEnum.hxx>
00056 #endif
00057 class TopTools_ListOfShape;
00058 class TopoDS_Shape;
00059 class TopoDS_Edge;
00060 class GEOMAlgo_PassKeyShape;
00061 class TopoDS_Face;
00062 class TopoDS_Vertex;
00063 class TopTools_DataMapOfShapeListOfShape;
00064 class TopTools_DataMapOfShapeShape;
00065 class TopTools_MapOfShape;
00066 class TopoDS_Compound;
00067 
00068 
00069 
00070 class GEOMAlgo_Gluer  : public GEOMAlgo_ShapeAlgo {
00071 public:
00072 
00073   void* operator new(size_t,void* anAddress) 
00074   {
00075     return anAddress;
00076   }
00077   void* operator new(size_t size) 
00078   {
00079     return Standard::Allocate(size); 
00080   }
00081   void  operator delete(void *anAddress) 
00082   {
00083     if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00084   }
00085 
00086   
00087   Standard_EXPORT   GEOMAlgo_Gluer();
00088 Standard_EXPORT virtual ~GEOMAlgo_Gluer();
00089   
00090   Standard_EXPORT     void SetCheckGeometry(const Standard_Boolean aFlag) ;
00091   
00092   Standard_EXPORT     Standard_Boolean CheckGeometry() const;
00093   
00094   Standard_EXPORT   virtual  void Perform() ;
00095   
00096   Standard_EXPORT     Standard_Integer AloneShapes() const;
00097   
00098   Standard_EXPORT    const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
00099   
00100   Standard_EXPORT    const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
00101   
00102   Standard_EXPORT     Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
00103   
00104   Standard_EXPORT    const TopTools_DataMapOfShapeListOfShape& Images() const;
00105   
00106   Standard_EXPORT    const TopTools_DataMapOfShapeShape& Origins() const;
00107   
00108   Standard_EXPORT     void MakeSubShapes(const TopoDS_Shape& aS,TopTools_MapOfShape& aM,TopoDS_Compound& aC) ;
00109   
00110   Standard_EXPORT     void SetKeepNonSolids(const Standard_Boolean bFlag) ;
00111   
00112   Standard_EXPORT     Standard_Boolean KeepNonSolids() const;
00113 
00114 
00115 
00116 
00117 
00118 protected:
00119 
00120   
00121   Standard_EXPORT   virtual  void CheckData() ;
00122   
00123   Standard_EXPORT   virtual  void CheckResult() ;
00124   
00125   Standard_EXPORT     void MakeVertices() ;
00126   
00127   Standard_EXPORT     void MakeEdges() ;
00128   
00129   Standard_EXPORT     void MakeFaces() ;
00130   
00131   Standard_EXPORT     void MakeShapes(const TopAbs_ShapeEnum aType) ;
00132   
00133   Standard_EXPORT     void MakeShells() ;
00134   
00135   Standard_EXPORT     void MakeSolids() ;
00136   
00137   Standard_EXPORT     void InnerTolerance() ;
00138   
00139   Standard_EXPORT     void EdgePassKey(const TopoDS_Edge& aE,GEOMAlgo_PassKeyShape& aPK) ;
00140   
00141   Standard_EXPORT     void FacePassKey(const TopoDS_Face& aF,GEOMAlgo_PassKeyShape& aPK) ;
00142   
00143   Standard_EXPORT     void MakeVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewV) ;
00144   
00145   Standard_EXPORT     void MakeEdge(const TopoDS_Edge& aEdge,TopoDS_Edge& aNewEdge) ;
00146   
00147   Standard_EXPORT     void MakeFace(const TopoDS_Face& aFace,TopoDS_Face& aNewEdge) ;
00148   
00149   Standard_EXPORT     Standard_Boolean IsToReverse(const TopoDS_Face& aFR,const TopoDS_Face& aF) ;
00150   
00151   Standard_EXPORT     Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
00152 
00153 
00154 Standard_Boolean myCheckGeometry;
00155 Standard_Real myTol;
00156 TopTools_DataMapOfShapeListOfShape myImages;
00157 TopTools_DataMapOfShapeShape myOrigins;
00158 Standard_Integer myNbAlone;
00159 TopTools_ListOfShape myGenerated;
00160 Standard_Boolean myKeepNonSolids;
00161 
00162 
00163 private:
00164 
00165 
00166 
00167 
00168 
00169 };
00170 
00171 
00172 
00173 
00174 
00175 // other Inline functions and methods (like "C++: function call" methods)
00176 
00177 
00178 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS