Salome HOME
Fix for bug Bug IPAL20288 (4x: CRASH after trying to build a sketch).
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ILocalOperations.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 #ifndef _GEOMImpl_ILocalOperations_HXX_
22 #define _GEOMImpl_ILocalOperations_HXX_
23
24 #include "Utils_SALOME_Exception.hxx"
25 #include "GEOM_IOperations.hxx"
26 #include "GEOM_Engine.hxx"
27 #include "GEOM_Object.hxx"
28 #include <TDocStd_Document.hxx>
29
30 #include <list>
31
32 class GEOMImpl_ILocalOperations : public GEOM_IOperations {
33  public:
34   Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine, int theDocID);
35   Standard_EXPORT ~GEOMImpl_ILocalOperations();
36
37   Standard_EXPORT Handle(GEOM_Object) MakeFilletAll   (Handle(GEOM_Object) theShape, double theR);
38   Standard_EXPORT Handle(GEOM_Object) MakeFilletEdges (Handle(GEOM_Object) theShape, double theR,
39                                                        std::list<int> theEdges);
40   Standard_EXPORT Handle(GEOM_Object) MakeFilletEdgesR1R2 (Handle(GEOM_Object) theShape,
41                                                            double theR1, double theR2,
42                                                            std::list<int> theEdges);
43   Standard_EXPORT Handle(GEOM_Object) MakeFilletFaces (Handle(GEOM_Object) theShape, double theR,
44                                                        std::list<int> theFaces);
45   Standard_EXPORT Handle(GEOM_Object) MakeFilletFacesR1R2 (Handle(GEOM_Object) theShape,
46                                                            double theR1, double theR2,
47                                                            std::list<int> theFaces);
48
49   Standard_EXPORT Handle(GEOM_Object) MakeChamferAll   (Handle(GEOM_Object) theShape, double theD);
50   Standard_EXPORT Handle(GEOM_Object) MakeChamferEdge  (Handle(GEOM_Object) theShape,
51                                         double theD1, double theD2,
52                                         int theFace1, int theFace2);
53   Standard_EXPORT Handle(GEOM_Object) MakeChamferEdgeAD  (Handle(GEOM_Object) theShape,
54                                         double theD, double theAngle,
55                                         int theFace1, int theFace2);
56   Standard_EXPORT Handle(GEOM_Object) MakeChamferFaces (Handle(GEOM_Object) theShape,
57                                                         double theD1, double theD2,
58                                                         std::list<int> theFaces);
59   Standard_EXPORT Handle(GEOM_Object) MakeChamferFacesAD (Handle(GEOM_Object) theShape,
60                                                           double theD, double theAngle,
61                                                           std::list<int> theFaces);
62   Standard_EXPORT Handle(GEOM_Object) MakeChamferEdges (Handle(GEOM_Object) theShape,
63                                                         double theD1, double theD2,
64                                                         std::list<int> theEdges);
65   Standard_EXPORT Handle(GEOM_Object) MakeChamferEdgesAD (Handle(GEOM_Object) theShape,
66                                                           double theD, double theAngle,
67                                                           std::list<int> theEdges);
68   Standard_EXPORT Handle(GEOM_Object) MakeArchimede (Handle(GEOM_Object) theShape,
69                                                      double theWeight, double theWaterDensity,
70                                                      double theMeshingDeflection);
71   
72   Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theShape,
73                                                      Handle(GEOM_Object) theSubShape);
74   
75   Standard_EXPORT static bool GetSubShape (const TopoDS_Shape& theShape,
76                                            const int theIndex,
77                                            TopoDS_Shape& theSubShape);
78 };
79
80 #endif