Salome HOME
Synchronize adm files
[modules/geom.git] / src / GEOMImpl / GEOMImpl_HealingDriver.hxx
1 // Copyright (C) 2007-2014  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 //  File   : GEOMImpl_HealingDriver.hxx
23 //  Module : GEOMImpl
24
25 #ifndef _GEOMImpl_HealingDriver_HeaderFile
26 #define _GEOMImpl_HealingDriver_HeaderFile
27
28 #ifndef _TColStd_SequenceOfExtendedString_HeaderFile
29 #include <TColStd_SequenceOfExtendedString.hxx>
30 #endif
31 #ifndef _Standard_TypeMismatch_HeaderFile
32 #include <Standard_TypeMismatch.hxx>
33 #endif
34
35 #ifndef _Standard_HeaderFile
36 #include <Standard.hxx>
37 #endif
38
39 #ifndef _Standard_Macro_HeaderFile
40 #include <Standard_Macro.hxx>
41 #endif
42 #ifndef _Standard_HeaderFile
43 #include <Standard.hxx>
44 #endif
45 #ifndef _Standard_GUID_HeaderFile
46 #include <Standard_GUID.hxx>
47 #endif
48
49 #include <TopoDS_Shape.hxx>
50 #include <TopoDS_Edge.hxx>
51 #include <TColStd_HSequenceOfTransient.hxx>
52
53
54 #ifndef _TFunction_Driver_HeaderFile
55 #include <TFunction_Driver.hxx>
56 #endif
57 #ifndef _TFunction_Logbook_HeaderFile
58 #include <TFunction_Logbook.hxx>
59 #endif
60 #ifndef _Standard_CString_HeaderFile
61 #include <Standard_CString.hxx>
62 #endif
63
64 class GEOMImpl_IHealing;
65
66
67 #include "GEOM_BaseDriver.hxx"
68
69 DEFINE_STANDARD_HANDLE( GEOMImpl_HealingDriver, GEOM_BaseDriver );
70
71 class GEOMImpl_HealingDriver : public GEOM_BaseDriver {
72
73 public:
74
75  // Methods PUBLIC
76   //
77   Standard_EXPORT GEOMImpl_HealingDriver();
78   Standard_EXPORT ~GEOMImpl_HealingDriver() {};
79
80   Standard_EXPORT static const Standard_GUID& GetID();
81
82   Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
83   Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
84   Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
85
86   Standard_EXPORT static Standard_Boolean AreEdgesC1 (const TopoDS_Edge& E1, const TopoDS_Edge& E2);
87   Standard_EXPORT static void FuseCollinearEdges (const TopoDS_Shape&,
88                                                   const Handle(TColStd_HSequenceOfTransient)&,
89                                                   TopoDS_Shape&);
90   Standard_EXPORT virtual
91   bool GetCreationInformation(std::string&             theOperationName,
92                               std::vector<GEOM_Param>& params);
93
94   // Type management
95   //
96 DEFINE_STANDARD_RTTI( GEOMImpl_HealingDriver )
97
98
99 private:
100   Standard_Boolean ShapeProcess  ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
101   Standard_Boolean SuppressFaces ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
102   Standard_Boolean CloseContour  ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
103   Standard_Boolean RemoveIntWires( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
104   Standard_Boolean RemoveHoles   ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
105   Standard_Boolean Sew           ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape&, Standard_Boolean ) const;
106   Standard_Boolean RemoveInternalFaces ( const TopoDS_Shape&, TopoDS_Shape& ) const;
107   Standard_Boolean AddPointOnEdge( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
108   Standard_Boolean ChangeOrientation( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
109   void             LimitTolerance( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
110
111 };
112
113 #endif