Salome HOME
Update from BR_V5_DEV 13Feb2009
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IHealingOperations.hxx
1 //  Copyright (C) 2007-2008  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.
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 #ifndef _GEOMImpl_IHealingOperations_HXX_
23 #define _GEOMImpl_IHealingOperations_HXX_
24
25 #include "GEOM_IOperations.hxx"
26 #include "GEOM_Engine.hxx"
27 #include "GEOM_Object.hxx"
28
29 #include <TColStd_HArray1OfExtendedString.hxx>
30 #include <TColStd_HArray1OfInteger.hxx>
31
32 #include <list>
33
34 class GEOMImpl_IHealingOperations : public GEOM_IOperations {
35  public:
36   Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
37   Standard_EXPORT ~GEOMImpl_IHealingOperations();
38
39   // Apply Shape Processing to the selected Object
40   Standard_EXPORT Handle(GEOM_Object) ShapeProcess( Handle(GEOM_Object) theObject,
41                                     const Handle(TColStd_HArray1OfExtendedString)& theOperations,
42                                     const Handle(TColStd_HArray1OfExtendedString)& theParams,
43                                     const Handle(TColStd_HArray1OfExtendedString)& theValues );
44
45   // Retrieve default Shape Process parameters (from resource file)
46   Standard_EXPORT void GetShapeProcessParameters( std::list<std::string>& theOperations,
47                                                   std::list<std::string>& theParams,
48                                                   std::list<std::string>& theValues );
49
50   // Retrieve default Shape Process parameters for given operator
51   Standard_EXPORT bool GetOperatorParameters( const std::string theOperation, 
52                                               std::list<std::string>& theParams,
53                                               std::list<std::string>& theValues );
54
55   // returns all parameters that are valid for the given operation (Shape Process operator)
56   Standard_EXPORT static bool GetParameters( const std::string theOperation, std::list<std::string>& theParams );
57
58   Standard_EXPORT Handle(GEOM_Object) SuppressFaces( Handle(GEOM_Object) theObject,
59                                      const Handle(TColStd_HArray1OfInteger)& theFaces);
60
61   Standard_EXPORT Handle(GEOM_Object) CloseContour( Handle(GEOM_Object) theObject,
62                                     const Handle(TColStd_HArray1OfInteger)& theWires,
63                                     bool isCommonVertex );
64
65   Standard_EXPORT Handle(GEOM_Object) RemoveIntWires( Handle(GEOM_Object) theObject,
66                                       const Handle(TColStd_HArray1OfInteger)& theWires);
67
68   Standard_EXPORT Handle(GEOM_Object) FillHoles( Handle(GEOM_Object) theObject,
69                                  const Handle(TColStd_HArray1OfInteger)& theWires);
70                                       
71   Standard_EXPORT Handle(GEOM_Object) Sew( Handle(GEOM_Object) theObject,
72                            double theTolerance );
73
74   Standard_EXPORT Handle(GEOM_Object) DivideEdge( Handle(GEOM_Object) theObject,
75                                   int theIndex,  
76                                   double theValue,
77                                   bool isByParameter );
78
79   // this function does not use Function-Driver mechanism, it just computes the free
80   // boundary edges and returns them in the sequence.  It is called just for information reasons
81   // and it's not intended for history/undo/redo/etc..
82   Standard_EXPORT bool GetFreeBoundary ( Handle(GEOM_Object) theObject, 
83                          Handle(TColStd_HSequenceOfTransient)& theOutClosedWires, 
84                          Handle(TColStd_HSequenceOfTransient)& theOutOpenWires );
85
86   Standard_EXPORT Handle(GEOM_Object) ChangeOrientation( Handle(GEOM_Object) theObject);
87   Standard_EXPORT Handle(GEOM_Object) ChangeOrientationCopy( Handle(GEOM_Object) theObject);
88
89 };
90
91 #endif