X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_SplitToZonesTool.h;h=530e7f2aba241f1606e998177afb99c67fe4df50;hb=a95289fabbb6fbf6f32c06207422c65aafd5bd65;hp=f2a5ad69e81964813c985bdfd245acc3e2e7676f;hpb=fdf964c463d1b26d45057bc3e7963aa8b3d4c20f;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_SplitToZonesTool.h b/src/HYDROData/HYDROData_SplitToZonesTool.h index f2a5ad69..530e7f2a 100644 --- a/src/HYDROData/HYDROData_SplitToZonesTool.h +++ b/src/HYDROData/HYDROData_SplitToZonesTool.h @@ -1,15 +1,36 @@ +// Copyright (C) 2014-2015 EDF-R&D +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef HYDROData_SplitToZonesTool_H #define HYDROData_SplitToZonesTool_H +#ifdef WIN32 + #pragma warning ( disable: 4251 ) +#endif + #include #include #include #include #include #include -#include -#include +#include +#include #include #include @@ -54,11 +75,11 @@ public: typedef QList SplitDataList; typedef QListIterator SplitDataListIterator; - typedef NCollection_Map HYDROData_MapOfShape; + typedef NCollection_IndexedMap HYDROData_MapOfShape; typedef HYDROData_MapOfShape::Iterator HYDROData_MapIteratorOfMapOfShape; - typedef NCollection_DataMap HYDROData_DataMapOfShapeListOfShape; + typedef NCollection_IndexedDataMap HYDROData_DataMapOfShapeListOfShape; typedef HYDROData_DataMapOfShapeListOfShape::Iterator HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape; - typedef NCollection_DataMap HYDROData_DataMapOfShapeListOfString; + typedef NCollection_IndexedDataMap HYDROData_DataMapOfShapeListOfString; typedef HYDROData_DataMapOfShapeListOfString::Iterator HYDROData_DataMapIteratorOfDataMapOfShapeListOfString; #undef _NCollection_MapHasher @@ -66,24 +87,30 @@ public: static SplitDataList Split( const HYDROData_SequenceOfObjects& theObjectList, const HYDROData_SequenceOfObjects& theGroupsList, - const Handle(HYDROData_PolylineXY)& thePolyline ); + const Handle(HYDROData_PolylineXY)& thePolyline, + const HYDROData_SequenceOfObjects& InterPolys ); - static void SetFileNames(const QString& theNameBefore, const QString& theNameAfter); + static SplitDataList Split( const HYDROData_SequenceOfObjects& theObjectList ); -private: + static void AddInternalEdges(HYDROData_DataMapOfShapeListOfShape& DM, + const HYDROData_SequenceOfObjects& thePolylines); + + static int CutByEdges(const TopoDS_Shape& InSh, const TopTools_ListOfShape& InEdges, + TopTools_ListOfShape& outShs); - static bool SplitTwoData( const SplitData& theData1, - const SplitData& theData2, - SplitData& theData1Subtracted, - SplitData& theData2Subtracted, - SplitData& theDataIntersected ); + static void SetFileNames(const QString& theNameBefore, const QString& theNameAfter); - static SplitDataList ExtractSeparateData( const SplitData& theData ); +private: - /** + /** * Split input faces. */ static Standard_Integer SplitFaces(const TopoDS_Compound& theComp, HYDROData_Transform& theTool); }; +#ifdef WIN32 + #pragma warning ( default: 4251 ) +#endif + + #endif