]> SALOME platform Git repositories - modules/geom.git/blob - src/ShHealOper/ShHealOper_FillHoles.hxx
Salome HOME
Update copyright information
[modules/geom.git] / src / ShHealOper / ShHealOper_FillHoles.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //
21 // File:      ShHealOper_FillHoles.hxx
22 // Created:   26.04.04 17:15:10
23 // Author:    Galina KULIKOVA
24
25
26 #ifndef ShHealOper_FillHoles_HeaderFile
27 #define ShHealOper_FillHoles_HeaderFile
28
29 #include <MMgt_TShared.hxx>
30 #include <TopoDS_Shape.hxx>
31 #include <TopTools_SequenceOfShape.hxx>
32 #include <TopoDS_Wire.hxx>
33 #include <TColGeom2d_HArray1OfCurve.hxx>
34 #include <Geom_Surface.hxx>
35 #include <TColStd_HArray1OfInteger.hxx>
36 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
37 #include <ShHealOper_Tool.hxx>
38 #include <TopTools_HSequenceOfShape.hxx>
39 #include <TopTools_IndexedMapOfShape.hxx>
40
41 ///  Class ShHealOper_FillHoles
42 //Intended for filling holes.
43
44 class ShHealOper_FillHoles : public ShHealOper_Tool
45 {
46  public:
47   // ---------- PUBLIC METHODS ----------
48
49   Standard_EXPORT ShHealOper_FillHoles ();
50   // Empty constructor initializes class by default parameters.
51   
52   Standard_EXPORT ShHealOper_FillHoles (const TopoDS_Shape& theShape);
53
54   Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
55   //Method for initalization by whole shape.
56   
57   Standard_EXPORT void InitParameters(Standard_Integer theDegree = 3,//3(2)
58                                  Standard_Integer theNbPtsOnCur =5,//3,
59                                  Standard_Integer theNbIter = 12,//3
60                                  Standard_Real theTol3d = 0.0001,//0.001,
61                                  Standard_Real theTol2d = 1.e-5,
62                                  Standard_Real theTolAng = 0.01,
63                                  Standard_Real theTolCrv = 0.01,
64                                  Standard_Integer theMaxDeg = 8,
65                                  Standard_Integer theMaxSeg =9);
66   //Initialization of the parameters for creation of the surface by GeomPlate.
67
68   Standard_EXPORT Standard_Boolean Fill();
69   //Fill all holes detectected as free boundaries.
70   
71    Standard_EXPORT Standard_Boolean Fill(const TopTools_SequenceOfShape& theFillShapes);
72   //Fill hole specified by wires or edges.
73
74
75  private:
76   // ---------- PRIVATE METHODS ----------
77   
78   Standard_Boolean prepareWires(const TopTools_SequenceOfShape& theFillShapes,
79                                 Handle(TopTools_HSequenceOfShape)& theSeqWires);
80
81   Handle(Geom_Surface) buildSurface(const TopoDS_Wire& theWire,
82                                     Handle(TColGeom2d_HArray1OfCurve)& theCurves2d,
83                                     Handle(TColStd_HArray1OfInteger)& theOrders,
84                                     Handle(TColStd_HArray1OfInteger)& theSenses);
85   
86   Standard_Boolean addFace(const Handle(Geom_Surface)& theSurf,
87                            const TopoDS_Wire& theWire,
88                            const Handle(TColGeom2d_HArray1OfCurve)& theCurves2d,
89                            const Handle(TColStd_HArray1OfInteger)& theOrders,
90                            const Handle(TColStd_HArray1OfInteger)& theSenses);
91
92   void getResShape(const TopoDS_Shape& theAddShape,
93                    const TopTools_IndexedMapOfShape& aMapParent,
94                    const Standard_Boolean theHasShell);
95  private:
96   // ---------- PRIVATE FIELDS ----------
97
98   TopTools_IndexedDataMapOfShapeListOfShape myEdgeShells;
99   
100   TopTools_IndexedDataMapOfShapeListOfShape myEdgeComps;
101   TopTools_IndexedDataMapOfShapeListOfShape myEdgeFaces;
102   Standard_Integer myNbPtsOnCur;
103   Standard_Integer myNbIter;
104   Standard_Integer myDegree;
105   Standard_Real myTol2d;
106   Standard_Real  myTol3d;
107   Standard_Real myTolAng;
108   Standard_Real myTolCrv;
109   Standard_Integer  myMaxDeg;
110   Standard_Integer myMaxSeg;
111  public:
112 // Declaration of CASCADE RTTI
113 //DEFINE_STANDARD_RTTI (ShHealOper_FillHoles)
114 };
115
116 // Definition of HANDLE object using Standard_DefineHandle.hxx
117 //DEFINE_STANDARD_HANDLE (ShHealOper_FillHoles, )
118
119
120 #endif