Salome HOME
Mantis issue 0021541: EDF 2213 GEOM: Filling accuracy
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Splitter.hxx
1 // Copyright (C) 2007-2012  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 //  File:   GEOMAlgo_Splitter.hxx
23 //
24 //  Author: Peter KURNEV
25 //
26 #ifndef _GEOMAlgo_Splitter_HeaderFile
27 #define _GEOMAlgo_Splitter_HeaderFile
28
29 #include <Standard.hxx>
30 #include <Standard_Macro.hxx>
31 #include <TopTools_ListOfShape.hxx>
32 #include <TopTools_MapOfShape.hxx>
33 #include <TopAbs_ShapeEnum.hxx>
34 #include <Standard_Integer.hxx>
35 #include <GEOMAlgo_Builder.hxx>
36 #include <TopoDS_Shape.hxx>
37
38 //! Implementation of Gluing Operation Algorithm (GA) <br>
39 //=======================================================================
40 //function : GEOMAlgo_Splitter
41 //purpose  :
42 //=======================================================================
43 class GEOMAlgo_Splitter  : public GEOMAlgo_Builder
44 {
45  public:
46
47   //!  Empty constructor <br>
48   Standard_EXPORT
49     GEOMAlgo_Splitter();
50
51   Standard_EXPORT
52     virtual ~GEOMAlgo_Splitter();
53
54   //!  Clears internal fields and arguments <br>
55   Standard_EXPORT
56     virtual  void Clear() ;
57
58   //!  Adds Tool argument theShape of the operation <br>
59   Standard_EXPORT
60     virtual  void AddTool(const TopoDS_Shape& theShape) ;
61
62   //!  Returns the arguments of the operation <br>
63   Standard_EXPORT
64     const TopTools_ListOfShape& Tools() const;
65
66   Standard_EXPORT
67     void SetLimit(const TopAbs_ShapeEnum aLimit) ;
68
69   Standard_EXPORT
70     TopAbs_ShapeEnum Limit() const;
71
72   Standard_EXPORT
73     void SetLimitMode(const Standard_Integer aLimitMode) ;
74
75   Standard_EXPORT
76     Standard_Integer LimitMode() const;
77   //!  Adds Tool arguments of the operation as <br>
78   //!           shapes of upper level of container shape theShape <br>
79   //! ===================================================== <br>
80   Standard_EXPORT
81     void AddToolCompound(const TopoDS_Shape& theShape) ;
82
83  protected:
84   //! Build the resulting shapes of type theType <br>
85   Standard_EXPORT
86     virtual  void BuildResult(const TopAbs_ShapeEnum theType) ;
87   //!  Provides post-tratment actions <br>
88   Standard_EXPORT
89     virtual  void PostTreat() ;
90
91
92   TopTools_ListOfShape myTools;
93   TopTools_MapOfShape myMapTools;
94   TopAbs_ShapeEnum myLimit;
95   Standard_Integer myLimitMode;
96 };
97 #endif