Back to index

salome-geom  6.5.0
ShHealOper_EdgeDivide.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_EdgeDivide.hxx
00024 // Created:   30.04.04 16:06:25
00025 // Author:    Galina KULIKOVA
00026 //
00027 #ifndef ShHealOper_EdgeDivide_HeaderFile
00028 #define ShHealOper_EdgeDivide_HeaderFile
00029 
00030 #include <TColStd_HSequenceOfReal.hxx>
00031 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
00032 #include <TopoDS_Edge.hxx>
00033 #include <TopoDS_Shape.hxx>
00034 #include <ShHealOper_Tool.hxx>
00035 #include <TColStd_SequenceOfReal.hxx>
00036 
00038 //Intended for spitting edge in accordance to the specified mode and value.
00039 
00040 class ShHealOper_EdgeDivide : public ShHealOper_Tool
00041 {
00042  public:
00043   // ---------- PUBLIC METHODS ----------
00044 
00045   
00046   Standard_EXPORT ShHealOper_EdgeDivide () : ShHealOper_Tool() {}
00048  
00049   Standard_EXPORT ShHealOper_EdgeDivide (const TopoDS_Shape& theShape);
00051 
00052   Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
00053   //Method for initalization by whole shape.
00054 
00055   Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge, 
00056                                            const Standard_Real theValue,
00057                                            const Standard_Boolean theDivideParamMode = Standard_True);
00058   //Performs spitting of the specified edge in the accoradnce to
00059   //specified mode and value.
00060   //If theDivideParamMode is equal to true edge will be splitted by parameter.
00061   //Else edge will be spliited by length (default true).
00062   //theValue is koefficient for splitting from 0 to 1.
00063 
00064   Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge, 
00065                                            const TColStd_SequenceOfReal& theValues,
00066                                            const Standard_Boolean theDivideParamMode = Standard_True);
00067   //Performs spitting of the specified edge in the accoradnce to
00068   //specified mode and sequence of values the same way as previous.
00069 
00070  protected:
00071   // ---------- PROTECTED METHODS ----------
00072 
00073 
00074   Standard_Boolean build(const Handle(TColStd_HSequenceOfReal)& theValues);
00075   
00076   Standard_Boolean computeValues(const Handle(TColStd_HSequenceOfReal)& theValues,
00077                                  Standard_Boolean& theHas3d,
00078                                  Standard_Boolean& theHas2d,
00079                                  Standard_Boolean& hasPCurves);
00080 
00081  private:
00082   // ---------- PRIVATE FIELDS ----------
00083 
00084   TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace;
00085   Standard_Boolean myDivideParamMode;
00086   TopoDS_Edge myEdge;
00087 
00088  public:
00089 // Declaration of CASCADE RTTI
00090 //DEFINE_STANDARD_RTTI (ShHealOper_EdgeDivide)
00091 };
00092 
00093 // Definition of HANDLE object using Standard_DefineHandle.hxx
00094 //DEFINE_STANDARD_HANDLE (ShHealOper_EdgeDivide, )
00095 
00096 
00097 #endif