]> SALOME platform Git repositories - modules/geom.git/blob - src/ShHealOper/ShHealOper_EdgeDivide.hxx
Salome HOME
37b40e751912e7c54534ee1b28228c047a8cab1d
[modules/geom.git] / src / ShHealOper / ShHealOper_EdgeDivide.hxx
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
6 //
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.
11 //
12
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.
17 //
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
21 //
22
23
24 #ifndef ShHealOper_EdgeDivide_HeaderFile
25 #define ShHealOper_EdgeDivide_HeaderFile
26
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>
33
34 ///  Class ShHealOper_EdgeDivide
35 //Intended for spitting edge in accordance to the specified mode and value.
36
37 class ShHealOper_EdgeDivide : public ShHealOper_Tool
38 {
39  public:
40   // ---------- PUBLIC METHODS ----------
41
42   
43   Standard_EXPORT ShHealOper_EdgeDivide () : ShHealOper_Tool() {}
44   /// Empty constructor
45  
46   Standard_EXPORT ShHealOper_EdgeDivide (const TopoDS_Shape& theShape);
47    /// Constructor initializes by shape.
48
49   Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
50   //Method for initalization by whole shape.
51
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.
60
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.
66
67  protected:
68   // ---------- PROTECTED METHODS ----------
69
70
71   Standard_Boolean build(const Handle(TColStd_HSequenceOfReal)& theValues);
72   
73   Standard_Boolean computeValues(const Handle(TColStd_HSequenceOfReal)& theValues,
74                                  Standard_Boolean& theHas3d,
75                                  Standard_Boolean& theHas2d,
76                                  Standard_Boolean& hasPCurves);
77
78  private:
79   // ---------- PRIVATE FIELDS ----------
80
81   TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace;
82   Standard_Boolean myDivideParamMode;
83   TopoDS_Edge myEdge;
84
85  public:
86 // Declaration of CASCADE RTTI
87 //DEFINE_STANDARD_RTTI (ShHealOper_EdgeDivide)
88 };
89
90 // Definition of HANDLE object using Standard_DefineHandle.hxx
91 //DEFINE_STANDARD_HANDLE (ShHealOper_EdgeDivide, )
92
93
94 #endif