Back to index

salome-geom  6.5.0
ShHealOper_RemoveFace.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:      ShHealOper_RemoveFace.hxx
00024 // Created:   15.04.04 18:10:16
00025 // Author:    Galina KULIKOVA
00026 //
00027 #ifndef ShHealOper_RemoveFace_HeaderFile
00028 #define ShHealOper_RemoveFace_HeaderFile
00029 
00030 #include <MMgt_TShared.hxx>
00031 #include <ShHealOper_Tool.hxx>
00032 #include <TopoDS_Shape.hxx>
00033 #include <TopTools_SequenceOfShape.hxx>
00034 #include <TopTools_MapOfShape.hxx>
00035 #include <TopoDS_Solid.hxx>
00036 #include <TopoDS_Shell.hxx>
00037 #include <TopoDS_Face.hxx>
00038 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
00040 //Class intended to removing faces from shape.
00041 
00042 class ShHealOper_RemoveFace : public ShHealOper_Tool
00043 {
00044  public:
00045   // ---------- PUBLIC METHODS ----------
00046 
00047   Standard_EXPORT ShHealOper_RemoveFace ();
00048   //Empty constructor.
00049   
00050   Standard_EXPORT ShHealOper_RemoveFace (const TopoDS_Shape& theShape);
00051   // Constructor initialized by shape from which faces will be removed.
00052   Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
00053    //Method for initalization by whole shape.
00054   Standard_EXPORT Standard_Boolean Perform();
00055   //Removes all faces from specified shape.
00056   
00057   Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theRemovedFaces);
00058   //Removes faces specified in the sequence of faces from specified shape.
00059 
00060   
00061  private:
00062  
00063   Standard_Boolean removeFaces(const TopoDS_Shape& theShape,TopoDS_Shape& theNewShape);
00064   Standard_Boolean removeFaces(const TopoDS_Solid& theShape,TopoDS_Shape& theNewShape);
00065   Standard_Boolean removeFaces(const TopoDS_Shell& theShell,TopoDS_Shape& theNewShape);
00066   Standard_Boolean isReplace(const TopoDS_Shape& theOldShape,TopoDS_Shape& theNewShape);
00067    //Methods for removing faces from sub-shapes.
00068 
00069   void removePCurve(const TopoDS_Face& theFace);
00070   //method for removing pcurves belonging to face
00071 
00072   Standard_Boolean isManifold(const TopoDS_Shell& aShell);
00073   //denenes manifold shell.
00074  private:
00075   // ---------- PRIVATE FIELDS ----------
00076 
00077   TopTools_MapOfShape myMapFaces;
00078   TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace;
00079  public:
00080 // Declaration of CASCADE RTTI
00081 //DEFINE_STANDARD_RTTI (ShHealOper_RemoveFace)
00082 };
00083 
00084 // Definition of HANDLE object using Standard_DefineHandle.hxx
00085 //DEFINE_STANDARD_HANDLE (ShHealOper_RemoveFace, )
00086 
00087 
00088 #endif