]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_SplitToZonesTool.h
Salome HOME
Boundary polyline added for calculation case.
[modules/hydro.git] / src / HYDROData / HYDROData_SplitToZonesTool.h
1
2 #ifndef HYDROData_SplitToZonesTool_H
3 #define HYDROData_SplitToZonesTool_H
4
5 #include <HYDROData_Object.h>
6
7 #include <TopoDS_Face.hxx>
8
9 #include <QStringList>
10
11 class Handle(HYDROData_Polyline);
12
13 /**
14  * \class HYDROData_SplitToZonesTool
15  * \brief This class contains methods used for splitting geometry objects
16  *        into non-intersected regions.
17  */
18 class HYDRODATA_EXPORT HYDROData_SplitToZonesTool
19 {
20 public:
21   struct HYDRODATA_EXPORT SplitData
22   {
23     TopoDS_Shape Shape;
24     QStringList  ObjectNames;
25
26     SplitData() {}
27     
28     SplitData( const TopoDS_Shape& theShape,
29                const QStringList& theObjectNames ) :
30       Shape( theShape ), ObjectNames( theObjectNames ) {}
31
32     SplitData( const TopoDS_Shape& theShape,
33                const QString& theObjectNames ) :
34       Shape( theShape ), ObjectNames( theObjectNames ) {}
35
36     TopoDS_Face Face() const;
37   };
38
39   typedef QList        <SplitData> SplitDataList;
40   typedef QListIterator<SplitData> SplitDataListIterator;
41
42 public:
43
44   static SplitDataList       SplitToZones( const HYDROData_SequenceOfObjects& theObjectList,
45                                            const Handle(HYDROData_Polyline)&  thePolyline );
46
47 private:
48
49   static bool                SplitTwoData( const SplitData& theData1,
50                                            const SplitData& theData2,
51                                            SplitData& theData1Subtracted,
52                                            SplitData& theData2Subtracted,
53                                            SplitData& theDataIntersected );
54
55   static SplitDataList       ExtractSeparateData( const SplitData& theData );
56
57 };
58
59 #endif