Back to index

salome-geom  6.5.0
GEOMAlgo_GetInPlace.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_GetInPlace.hxx
00023 // Created:
00024 // Author:      Peter KURNEV
00025 
00026 #ifndef _GEOMAlgo_GetInPlace_HeaderFile
00027 #define _GEOMAlgo_GetInPlace_HeaderFile
00028 
00029 #include <Standard.hxx>
00030 #include <Standard_Macro.hxx>
00031 #include <Standard_Integer.hxx>
00032 #include <Standard_Real.hxx>
00033 #include <Standard_Boolean.hxx>
00034 
00035 #include <TopAbs_ShapeEnum.hxx>
00036 #include <TopoDS_Shape.hxx>
00037 
00038 #include <NMTTools_CoupleOfShape.hxx>
00039 #include <NMTTools_ListOfCoupleOfShape.hxx>
00040 #include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
00041 
00042 #include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>
00043 #include <GEOMAlgo_GluerAlgo.hxx>
00044 #include <GEOMAlgo_Algo.hxx>
00045 #include <GEOMAlgo_DataMapOfShapePnt.hxx>
00046 
00047 
00048 //=======================================================================
00054 //=======================================================================
00055 //class    : GEOMAlgo_GetInPlaceIterator
00056 //purpose  :
00057 //=======================================================================
00058 class GEOMAlgo_GetInPlaceIterator  {
00059  public:
00063   //Standard_EXPORT
00064     GEOMAlgo_GetInPlaceIterator();
00065 
00069   //Standard_EXPORT
00070     virtual ~GEOMAlgo_GetInPlaceIterator();
00071 
00075   //Standard_EXPORT
00076     void Clear() ;
00077 
00083   //Standard_EXPORT
00084     void AppendPair(const NMTTools_CoupleOfShape& theCS) ;
00085 
00093   //Standard_EXPORT
00094     void Initialize(const TopAbs_ShapeEnum theT1,
00095                   const TopAbs_ShapeEnum theT2) ;
00101   //Standard_EXPORT
00102     Standard_Boolean More() const;
00103 
00107   //Standard_EXPORT
00108     void Next() ;
00109 
00115   //Standard_EXPORT
00116     const NMTTools_CoupleOfShape& Value() const;
00117 
00118 protected:
00119   Standard_Integer myDim;
00120   NMTTools_ListOfCoupleOfShape myLists[10];
00121   NMTTools_ListOfCoupleOfShape myEmptyList;
00122   NMTTools_ListIteratorOfListOfCoupleOfShape myIterator;
00123 
00124 private:
00125 };
00126 
00127 
00128 //=======================================================================
00134 //=======================================================================
00135 //class    : GEOMAlgo_GetInPlace
00136 //purpose  :
00137 //=======================================================================
00138 class GEOMAlgo_GetInPlace  : public GEOMAlgo_GluerAlgo,
00139                              public GEOMAlgo_Algo
00140 {
00141  public:
00145   Standard_EXPORT
00146     GEOMAlgo_GetInPlace();
00150   Standard_EXPORT
00151     virtual ~GEOMAlgo_GetInPlace();
00157   Standard_EXPORT
00158     virtual void SetShapeWhere(const TopoDS_Shape& theShape) ;
00159 
00165   Standard_EXPORT
00166     const TopoDS_Shape& ShapeWhere() const;
00167 
00173   Standard_EXPORT
00174     void SetTolMass(const Standard_Real theTol) ;
00175 
00181   Standard_EXPORT
00182     Standard_Real TolMass() const;
00183 
00189   Standard_EXPORT
00190     void SetTolCG(const Standard_Real theTol) ;
00191 
00197   Standard_EXPORT
00198     Standard_Real TolCG() const;
00199 
00203   Standard_EXPORT
00204     virtual  void Perform() ;
00205 
00211   Standard_EXPORT
00212     Standard_Boolean IsFound() const;
00213 
00217   Standard_EXPORT
00218     virtual  void CheckData() ;
00219 
00223   Standard_EXPORT
00224     virtual  void Clear() ;
00225 
00234   Standard_EXPORT
00235     const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesIn() const;
00236 
00245   Standard_EXPORT
00246     const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesOn() const;
00247 
00248 protected:
00249   Standard_EXPORT
00250     void Intersect() ;
00251 
00252   Standard_EXPORT
00253     void PerformVV() ;
00254 
00255   Standard_EXPORT
00256     void PerformVE() ;
00257 
00258   Standard_EXPORT
00259     void PerformEE() ;
00260 
00261   Standard_EXPORT
00262     void PerformVF() ;
00263 
00264   Standard_EXPORT
00265     void PerformEF() ;
00266 
00267   Standard_EXPORT
00268     void PerformFF() ;
00269 
00270   Standard_EXPORT
00271     void FillEdgesOn() ;
00272 
00273   Standard_EXPORT
00274     void FillFacesOn() ;
00275 
00276   Standard_EXPORT
00277     void FillSolidsOn() ;
00278 
00279   Standard_EXPORT
00280     void PerformZF() ;
00281 
00282   Standard_EXPORT
00283     void PerformZZ() ;
00284 
00285   Standard_EXPORT
00286     void FillImages() ;
00287 
00288   Standard_EXPORT
00289     void FillImagesCompound(const TopoDS_Shape& theS) ;
00290 
00291   Standard_EXPORT
00292     void CheckGProps() ;
00293 
00294   Standard_EXPORT
00295     void CheckGProps(const TopoDS_Shape& theS) ;
00296 
00297   Standard_EXPORT
00298     void FillShapesIn(const TopoDS_Shape& theS1,
00299                     const TopoDS_Shape& theS2) ;
00300 
00301   Standard_EXPORT
00302     void FillShapesOn(const TopoDS_Shape& theS1,
00303                     const TopoDS_Shape& theS2) ;
00304 
00305   Standard_EXPORT
00306     Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1,
00307                                   const TopoDS_Shape& theS2);
00308 
00309 
00310   TopoDS_Shape myShapeWhere;
00311   GEOMAlgo_GetInPlaceIterator myIterator;
00312   GEOMAlgo_DataMapOfShapeMapOfShape myShapesIn;
00313   GEOMAlgo_DataMapOfShapeMapOfShape myShapesOn;
00314   Standard_Real myTolMass;
00315   Standard_Real myTolCG;
00316   Standard_Boolean myFound;
00317   GEOMAlgo_DataMapOfShapePnt myMapShapePnt;
00318 
00319 private:
00320 };
00321 
00322 
00323 
00324 #endif