1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : GEOMImpl_HealingDriver.hxx
25 #ifndef _GEOMImpl_HealingDriver_HeaderFile
26 #define _GEOMImpl_HealingDriver_HeaderFile
28 #ifndef _TColStd_SequenceOfExtendedString_HeaderFile
29 #include <TColStd_SequenceOfExtendedString.hxx>
31 #ifndef _Standard_TypeMismatch_HeaderFile
32 #include <Standard_TypeMismatch.hxx>
35 #ifndef _Standard_HeaderFile
36 #include <Standard.hxx>
39 #ifndef _Standard_Macro_HeaderFile
40 #include <Standard_Macro.hxx>
42 #ifndef _Standard_HeaderFile
43 #include <Standard.hxx>
45 #ifndef _Standard_GUID_HeaderFile
46 #include <Standard_GUID.hxx>
49 #include <TopoDS_Shape.hxx>
50 #include <TopoDS_Edge.hxx>
51 #include <TColStd_HSequenceOfTransient.hxx>
54 #ifndef _TFunction_Driver_HeaderFile
55 #include <TFunction_Driver.hxx>
57 #ifndef _TFunction_Logbook_HeaderFile
58 #include <TFunction_Logbook.hxx>
60 #ifndef _Standard_CString_HeaderFile
61 #include <Standard_CString.hxx>
64 #include "GEOM_BaseDriver.hxx"
66 class GEOMImpl_IHealing;
67 class ShHealOper_Tool;
68 class TopTools_SequenceOfShape;
71 DEFINE_STANDARD_HANDLE( GEOMImpl_HealingDriver, GEOM_BaseDriver );
73 class GEOMImpl_HealingDriver : public GEOM_BaseDriver {
79 Standard_EXPORT GEOMImpl_HealingDriver();
80 Standard_EXPORT ~GEOMImpl_HealingDriver() {};
82 Standard_EXPORT static const Standard_GUID& GetID();
84 Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
85 Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
86 Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
88 Standard_EXPORT static Standard_Boolean AreEdgesC1 (const TopoDS_Edge& E1, const TopoDS_Edge& E2);
89 Standard_EXPORT static void FuseCollinearEdges (const TopoDS_Shape&,
90 const Handle(TColStd_HSequenceOfTransient)&,
92 Standard_EXPORT virtual
93 bool GetCreationInformation(std::string& theOperationName,
94 std::vector<GEOM_Param>& params);
98 DEFINE_STANDARD_RTTI( GEOMImpl_HealingDriver )
102 Standard_Boolean ShapeProcess ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
103 Standard_Boolean SuppressFaces ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
104 void SuppressFacesRec (const TopTools_SequenceOfShape& theShapesFaces,
105 const TopoDS_Shape& theOriginalShape,
106 TopoDS_Shape& theOutShape) const;
107 Standard_Boolean CloseContour ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
108 Standard_Boolean RemoveIntWires( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
109 Standard_Boolean RemoveHoles ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
110 Standard_Boolean Sew ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape&, Standard_Boolean ) const;
111 Standard_Boolean RemoveInternalFaces ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
112 Standard_Boolean AddPointOnEdge( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
113 Standard_Boolean ChangeOrientation( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
114 void LimitTolerance( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
116 void SaveStatistics( const ShHealOper_Tool& healer, bool add=false ) const;