1 // File: ShHealOper_EdgeDivide.hxx
2 // Created: 30.04.04 16:06:25
3 // Author: Galina KULIKOVA
4 // < MODULE = KERNEL> <PACKAGE = ShHealOper> : <Shape Healing Operations>
5 // Copyright (C) 2003 CEA
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2.1 of the License.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef ShHealOper_EdgeDivide_HeaderFile
25 #define ShHealOper_EdgeDivide_HeaderFile
27 #include <TColStd_HSequenceOfReal.hxx>
28 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
29 #include <TopoDS_Edge.hxx>
30 #include <TopoDS_Shape.hxx>
31 #include <ShHealOper_Tool.hxx>
32 #include <TColStd_SequenceOfReal.hxx>
34 /// Class ShHealOper_EdgeDivide
35 //Intended for spitting edge in accordance to the specified mode and value.
37 class ShHealOper_EdgeDivide : public ShHealOper_Tool
40 // ---------- PUBLIC METHODS ----------
43 Standard_EXPORT ShHealOper_EdgeDivide () : ShHealOper_Tool() {}
46 Standard_EXPORT ShHealOper_EdgeDivide (const TopoDS_Shape& theShape);
47 /// Constructor initializes by shape.
49 Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
50 //Method for initalization by whole shape.
52 Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
53 const Standard_Real theValue,
54 const Standard_Boolean theDivideParamMode = Standard_True);
55 //Performs spitting of the specified edge in the accoradnce to
56 //specified mode and value.
57 //If theDivideParamMode is equal to true edge will be splitted by parameter.
58 //Else edge will be spliited by length (default true).
59 //theValue is koefficient for splitting from 0 to 1.
61 Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
62 const TColStd_SequenceOfReal& theValues,
63 const Standard_Boolean theDivideParamMode = Standard_True);
64 //Performs spitting of the specified edge in the accoradnce to
65 //specified mode and sequence of values the same way as previous.
68 // ---------- PROTECTED METHODS ----------
71 Standard_Boolean build(const Handle(TColStd_HSequenceOfReal)& theValues);
73 Standard_Boolean computeValues(const Handle(TColStd_HSequenceOfReal)& theValues,
74 Standard_Boolean& theHas3d,
75 Standard_Boolean& theHas2d,
76 Standard_Boolean& hasPCurves);
79 // ---------- PRIVATE FIELDS ----------
81 TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace;
82 Standard_Boolean myDivideParamMode;
86 // Declaration of CASCADE RTTI
87 //DEFINE_STANDARD_RTTI (ShHealOper_EdgeDivide)
90 // Definition of HANDLE object using Standard_DefineHandle.hxx
91 //DEFINE_STANDARD_HANDLE (ShHealOper_EdgeDivide, )