SHAPER  9.12.0
GEOMAlgo_Splitter.hxx
1 // Copyright (C) 2007-2023 CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef GEOMAlgo_Splitter_HeaderFile
21 #define GEOMAlgo_Splitter_HeaderFile
22 
23 #include <GeomAlgoImpl.h>
24 
25 #include <Standard.hxx>
26 #include <Standard_Macro.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_Integer.hxx>
29 
30 #include <NCollection_BaseAllocator.hxx>
31 
32 #include <TopAbs_ShapeEnum.hxx>
33 
34 #include <TopoDS_Shape.hxx>
35 
36 #include <BOPAlgo_Builder.hxx>
37 
38 #include <Basics_OCCTVersion.hxx>
39 
40 //=======================================================================
41 //class : GEOMAlgo_Splitter
42 //purpose :
43 //=======================================================================
50 {
51  public:
53  GEOMALGOIMPL_EXPORT GEOMAlgo_Splitter();
54 
57  GEOMALGOIMPL_EXPORT GEOMAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator);
58 
59  GEOMALGOIMPL_EXPORT virtual ~GEOMAlgo_Splitter();
60 
63  GEOMALGOIMPL_EXPORT void AddTool(const TopoDS_Shape& theShape);
64 
66  GEOMALGOIMPL_EXPORT const NCollection_List<TopoDS_Shape>& Tools()const;
67 
70  GEOMALGOIMPL_EXPORT void SetLimit(const TopAbs_ShapeEnum aLimit);
71 
73  GEOMALGOIMPL_EXPORT TopAbs_ShapeEnum Limit()const;
74 
77  GEOMALGOIMPL_EXPORT void SetLimitMode(const Standard_Integer aMode);
78 
80  GEOMALGOIMPL_EXPORT Standard_Integer LimitMode()const;
81 
83  GEOMALGOIMPL_EXPORT virtual void Clear();
84 
85  protected:
88  GEOMALGOIMPL_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType);
89 
91 #if OCC_VERSION_LARGE < 0x07070000
92  GEOMALGOIMPL_EXPORT virtual void PostTreat();
93 #else
94  GEOMALGOIMPL_EXPORT virtual void PostTreat(const Message_ProgressRange& theRange);
95 #endif
96 
97  protected:
99  NCollection_List<TopoDS_Shape> myTools;
100 
102  NCollection_Map<TopoDS_Shape> myMapTools;
103 
105  TopAbs_ShapeEnum myLimit;
106 
108  Standard_Integer myLimitMode;
109 };
110 
111 #endif
Definition: GEOMAlgo_Splitter.hxx:50
virtual GEOMALGOIMPL_EXPORT void Clear()
Clears all tool shapes.
Definition: GEOMAlgo_Splitter.cxx:124
TopAbs_ShapeEnum myLimit
A limit type.
Definition: GEOMAlgo_Splitter.hxx:105
virtual GEOMALGOIMPL_EXPORT void BuildResult(const TopAbs_ShapeEnum theType)
Build result.
Definition: GEOMAlgo_Splitter.cxx:135
GEOMALGOIMPL_EXPORT const NCollection_List< TopoDS_Shape > & Tools() const
Returns list of tool shapes.
Definition: GEOMAlgo_Splitter.cxx:84
GEOMALGOIMPL_EXPORT Standard_Integer LimitMode() const
Returns mode of limit.
Definition: GEOMAlgo_Splitter.cxx:116
NCollection_Map< TopoDS_Shape > myMapTools
Map of tools.
Definition: GEOMAlgo_Splitter.hxx:102
GEOMALGOIMPL_EXPORT GEOMAlgo_Splitter()
Constructor.
Definition: GEOMAlgo_Splitter.cxx:38
GEOMALGOIMPL_EXPORT TopAbs_ShapeEnum Limit() const
Returns defined limit type.
Definition: GEOMAlgo_Splitter.cxx:100
GEOMALGOIMPL_EXPORT void SetLimitMode(const Standard_Integer aMode)
Set mode (0 or 1) of limit.
Definition: GEOMAlgo_Splitter.cxx:108
GEOMALGOIMPL_EXPORT void SetLimit(const TopAbs_ShapeEnum aLimit)
Set type of used shapes.
Definition: GEOMAlgo_Splitter.cxx:92
Standard_Integer myLimitMode
A limit mode.
Definition: GEOMAlgo_Splitter.hxx:108
virtual GEOMALGOIMPL_EXPORT void PostTreat()
Post processing of the calculation.
Definition: GEOMAlgo_Splitter.cxx:170
GEOMALGOIMPL_EXPORT void AddTool(const TopoDS_Shape &theShape)
Add a tool shape.
Definition: GEOMAlgo_Splitter.cxx:72
NCollection_List< TopoDS_Shape > myTools
List of tools.
Definition: GEOMAlgo_Splitter.hxx:99