Back to index

salome-geom  6.5.0
GEOMAlgo_Builder.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 // File:        GEOMAlgo_Builder.cxx
00023 // Created:
00024 // Author:      Peter KURNEV
00025 //
00026 #ifndef _GEOMAlgo_Builder_HeaderFile
00027 #define _GEOMAlgo_Builder_HeaderFile
00028 
00029 #include <Standard.hxx>
00030 #include <Standard_Macro.hxx>
00031 #include <NMTTools_PPaveFiller.hxx>
00032 #include <TopTools_ListOfShape.hxx>
00033 #include <Standard_Integer.hxx>
00034 #include <TopTools_MapOfShape.hxx>
00035 #include <BRepAlgo_Image.hxx>
00036 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
00037 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
00038 #include <GEOMAlgo_BuilderShape.hxx>
00039 #include <NMTTools_PaveFiller.hxx>
00040 #include <Standard_Boolean.hxx>
00041 #include <TopAbs_ShapeEnum.hxx>
00042 #include <TopoDS_Shape.hxx>
00043 #include <BRepAlgo_Image.hxx>
00044 
00045 //=======================================================================
00046 //function : GEOMAlgo_Builder
00047 //purpose  :
00048 //=======================================================================
00049 class GEOMAlgo_Builder  : public GEOMAlgo_BuilderShape
00050 {
00051  public:
00053   Standard_EXPORT
00054     GEOMAlgo_Builder();
00055 
00056   Standard_EXPORT
00057     virtual ~GEOMAlgo_Builder();
00058 
00060   Standard_EXPORT
00061     virtual  void Perform() ;
00062 
00065   Standard_EXPORT
00066     virtual  void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
00067 
00069   Standard_EXPORT
00070     virtual  void AddShape(const TopoDS_Shape& theShape) ;
00071 
00073   Standard_EXPORT
00074     virtual  void Clear() ;
00075 
00077   Standard_EXPORT
00078     const TopTools_ListOfShape& Shapes() const;
00079 
00082   Standard_EXPORT
00083     virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
00084 
00087   Standard_EXPORT
00088     virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
00089 
00091   Standard_EXPORT
00092     virtual  Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
00093 
00096   Standard_EXPORT
00097     void AddCompound(const TopoDS_Shape& theShape) ;
00098 
00100   Standard_EXPORT
00101     const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const;
00102 
00104   Standard_EXPORT
00105     const BRepAlgo_Image& Images() const;
00106 
00109   Standard_EXPORT
00110     const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const;
00111 
00112 protected:
00115   Standard_EXPORT
00116     virtual  void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
00117 
00119   Standard_EXPORT
00120     virtual  void PrepareHistory() ;
00121 
00123   Standard_EXPORT
00124     virtual  void ClearInternals() ;
00125 
00127   Standard_EXPORT
00128     virtual  void Prepare() ;
00129 
00131   Standard_EXPORT
00132     virtual  void PostTreat() ;
00133 
00136   Standard_EXPORT
00137     void AddShape1(const TopoDS_Shape& theShape) ;
00138 
00140   Standard_EXPORT
00141     virtual  void BuildResult(const TopAbs_ShapeEnum theType) ;
00142 
00144   Standard_EXPORT
00145     void FillImagesVertices() ;
00146 
00148   Standard_EXPORT
00149     void FillImagesEdges() ;
00150 
00152   Standard_EXPORT
00153     void FillImagesFaces() ;
00154 
00157   Standard_EXPORT
00158     void FillIn2DParts() ;
00159 
00161   Standard_EXPORT
00162     void BuildSplitFaces() ;
00163 
00165   Standard_EXPORT
00166     void FillSameDomainFaces() ;
00167 
00170   Standard_EXPORT
00171     void FillImagesFaces1() ;
00172 
00175   Standard_EXPORT
00176     void FillInternalVertices() ;
00177 
00179   Standard_EXPORT
00180     void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
00181 
00183   Standard_EXPORT
00184     void FillImagesSolids() ;
00185 
00188   Standard_EXPORT
00189     void FillIn3DParts() ;
00190 
00192   Standard_EXPORT
00193     void BuildSplitSolids() ;
00194 
00197   Standard_EXPORT
00198     void FillInternalShapes() ;
00199 
00205   Standard_EXPORT
00206     void BuildDraftSolid(const TopoDS_Shape& theSolid,
00207                       TopoDS_Shape& theDraftSolid,
00208                       TopTools_ListOfShape& theInternalFaces) ;
00209 
00210 
00211   NMTTools_PPaveFiller myPaveFiller;
00212   TopTools_ListOfShape myShapes;
00213   Standard_Integer myNbTypes;
00214   TopTools_MapOfShape myMapFence;
00215   TopTools_ListOfShape myShapes1[9];
00216   BRepAlgo_Image myImages;
00217   TopTools_IndexedDataMapOfShapeListOfShape myInParts;
00218   BRepAlgo_Image mySplitFaces;
00219   TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
00220   TopTools_IndexedDataMapOfShapeShape myDraftSolids;
00221   Standard_Integer myEntryPoint;
00222 
00223 };
00224 #endif