Salome HOME
22752: [EDF] Provide explicit feedback on what has been done by Shape Processing...
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IHealingOperations.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
23 #ifndef _GEOMImpl_IHealingOperations_HXX_
24 #define _GEOMImpl_IHealingOperations_HXX_
25
26 #include "GEOM_IOperations.hxx"
27 #include "GEOM_Engine.hxx"
28 #include "GEOM_Object.hxx"
29
30 #include <TColStd_HArray1OfExtendedString.hxx>
31 #include <TColStd_HArray1OfInteger.hxx>
32
33 #include <list>
34
35 class ShHealOper_ModifStats;
36
37 class GEOMImpl_IHealingOperations : public GEOM_IOperations {
38  public:
39   Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
40   Standard_EXPORT ~GEOMImpl_IHealingOperations();
41
42   // Apply Shape Processing to the selected Object
43   Standard_EXPORT Handle(GEOM_Object) ShapeProcess( Handle(GEOM_Object) theObject,
44                             const Handle(TColStd_HArray1OfExtendedString)& theOperations,
45                             const Handle(TColStd_HArray1OfExtendedString)& theParams,
46                             const Handle(TColStd_HArray1OfExtendedString)& theValues );
47
48   // Retrieve default Shape Process parameters (from resource file)
49   Standard_EXPORT void GetShapeProcessParameters( std::list<std::string>& theOperations,
50                                                   std::list<std::string>& theParams,
51                                                   std::list<std::string>& theValues );
52
53   // Retrieve default Shape Process parameters for given operator
54   Standard_EXPORT bool GetOperatorParameters( const std::string&      theOperation,
55                                               std::list<std::string>& theParams,
56                                               std::list<std::string>& theValues );
57
58   // returns all parameters that are valid for the given operation (Shape Process operator)
59   Standard_EXPORT static bool GetParameters( const std::string theOperation,
60                                              std::list<std::string>& theParams );
61
62   Standard_EXPORT Handle(GEOM_Object) SuppressFaces( Handle(GEOM_Object) theObject,
63                                      const Handle(TColStd_HArray1OfInteger)& theFaces);
64
65   Standard_EXPORT Handle(GEOM_Object) CloseContour( Handle(GEOM_Object) theObject,
66                                     const Handle(TColStd_HArray1OfInteger)& theWires,
67                                     bool isCommonVertex );
68
69   Standard_EXPORT Handle(GEOM_Object) RemoveIntWires( Handle(GEOM_Object) theObject,
70                                       const Handle(TColStd_HArray1OfInteger)& theWires);
71
72   Standard_EXPORT Handle(GEOM_Object) FillHoles( Handle(GEOM_Object) theObject,
73                                  const Handle(TColStd_HArray1OfInteger)& theWires);
74
75   Standard_EXPORT Handle(GEOM_Object) Sew( std::list<Handle(GEOM_Object)> & theObject,
76                                            double                           theTolerance,
77                                            bool                             isAllowNonManifold);
78
79   Standard_EXPORT Handle(GEOM_Object) RemoveInternalFaces (std::list< Handle(GEOM_Object)> & theSolids);
80
81   Standard_EXPORT Handle(GEOM_Object) DivideEdge( Handle(GEOM_Object) theObject,
82                                                   int                 theIndex,
83                                                   double              theValue,
84                                                   bool                isByParameter );
85
86   Standard_EXPORT Handle(GEOM_Object) DivideEdgeByPoint( Handle(GEOM_Object)             theObject,
87                                                          int                             theIndex,
88                                                          std::list<Handle(GEOM_Object)>& thePoint );
89
90   Standard_EXPORT Handle(GEOM_Object) FuseCollinearEdgesWithinWire
91                                      (Handle(GEOM_Object) theWire,
92                                       std::list<Handle(GEOM_Object)> theVertices);
93
94   // this function does not use Function-Driver mechanism, it just computes the free
95   // boundary edges and returns them in the sequence.  It is called just for information reasons
96   // and it's not intended for history/undo/redo/etc..
97   Standard_EXPORT bool GetFreeBoundary ( Handle(TColStd_HSequenceOfTransient)& theObjects,
98                                          Handle(TColStd_HSequenceOfTransient)& theOutClosedWires,
99                                          Handle(TColStd_HSequenceOfTransient)& theOutOpenWires );
100
101   Standard_EXPORT Handle(GEOM_Object) ChangeOrientation( Handle(GEOM_Object) theObject);
102   Standard_EXPORT Handle(GEOM_Object) ChangeOrientationCopy( Handle(GEOM_Object) theObject);
103
104   Standard_EXPORT Handle(GEOM_Object) LimitTolerance( Handle(GEOM_Object) theObject,
105                                                       double theTolerance );
106
107   const ShHealOper_ModifStats* GetStatistics() { return myModifStats; }
108
109 private:
110
111   ShHealOper_ModifStats* myModifStats;
112 };
113
114 #endif