Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ShHealOper_EdgeDivide.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // File: ShHealOper_EdgeDivide.hxx
24 // Created: 30.04.04 16:06:25
25 // Author: Galina KULIKOVA
26 //
27 #ifndef ShHealOper_EdgeDivide_HeaderFile
28 #define ShHealOper_EdgeDivide_HeaderFile
29 
30 #include <ShHealOper_Tool.hxx>
31 #include <TColStd_HSequenceOfReal.hxx>
32 #include <TColStd_SequenceOfReal.hxx>
33 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
34 #include <TopoDS_Edge.hxx>
35 
37 //Intended for spitting edge in accordance to the specified mode and value.
38 
40 {
41  public:
42  // ---------- PUBLIC METHODS ----------
43 
44 
45  Standard_EXPORT ShHealOper_EdgeDivide () : ShHealOper_Tool() {}
47 
48  Standard_EXPORT ShHealOper_EdgeDivide (const TopoDS_Shape& theShape);
50 
51  Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
52  //Method for initalization by whole shape.
53 
54  Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
55  const Standard_Real theValue,
56  const Standard_Boolean theDivideParamMode = Standard_True);
57  //Performs spitting of the specified edge in the accoradnce to
58  //specified mode and value.
59  //If theDivideParamMode is equal to true edge will be splitted by parameter.
60  //Else edge will be spliited by length (default true).
61  //theValue is coefficient for splitting from 0 to 1.
62 
63  Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
64  const TColStd_SequenceOfReal& theValues,
65  const Standard_Boolean theDivideParamMode = Standard_True);
66  //Performs spitting of the specified edge in the accoradnce to
67  //specified mode and sequence of values the same way as previous.
68 
69  Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge,
70  const TopoDS_Shape& thePoint);
71  //Performs spitting of the specified edge by projecting a point to it.
72 
73 protected:
74  // ---------- PROTECTED METHODS ----------
75 
76 
77  Standard_Boolean build(const Handle(TColStd_HSequenceOfReal)& theValues);
78 
79  Standard_Boolean computeValues(const Handle(TColStd_HSequenceOfReal)& theValues,
80  Standard_Boolean& theHas3d,
81  Standard_Boolean& theHas2d,
82  Standard_Boolean& hasPCurves);
83 
84  private:
85  // ---------- PRIVATE FIELDS ----------
86 
87  TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace;
88  Standard_Boolean myDivideParamMode;
89  TopoDS_Edge myEdge;
90 
91  public:
92 // Declaration of CASCADE RTTI
93 //DEFINE_STANDARD_RTTI (ShHealOper_EdgeDivide)
94 };
95 
96 // Definition of HANDLE object using Standard_DefineHandle.hxx
97 //DEFINE_STANDARD_HANDLE (ShHealOper_EdgeDivide, )
98 
99 
100 #endif