From: isn Date: Wed, 7 Dec 2016 11:12:34 +0000 (+0300) Subject: refs #1070 X-Git-Tag: v1.6~8^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3cd82f2e56f3073d9f2c648340f4747912b6c01b;p=modules%2Fhydro.git refs #1070 --- diff --git a/src/HYDROData/HYDROData_SplitToZonesTool.cxx b/src/HYDROData/HYDROData_SplitToZonesTool.cxx index 182c6178..8784a1e5 100644 --- a/src/HYDROData/HYDROData_SplitToZonesTool.cxx +++ b/src/HYDROData/HYDROData_SplitToZonesTool.cxx @@ -44,6 +44,7 @@ #include #include #include +#include //#define DEB_SPLIT_TO_ZONES 1 //#define DEB_SPLIT_TO_ZONES_CHECK_PARTITION 1 @@ -246,6 +247,24 @@ HYDROData_SplitToZonesTool::SplitDataList anOutputSplitDataList.append(SDI); } +#ifndef NDEBUG + //check CutFaceByEdges method: ensure that SD.Face() edges fully covered by + //history map (OutOrSh2M) + if (!OutOrSh2M.IsEmpty()) + { + TopTools_IndexedMapOfShape EE; + TopExp::MapShapes(SD.Face(), TopAbs_EDGE, EE); + int noncontNb = 0; + for (int i = 1; i <= EE.Extent(); i++) + { + const TopoDS_Shape& E = EE(i); + noncontNb += !OutOrSh2M.Contains(E); + } + //noncontNb > 0 => some problem with edge history + assert(noncontNb == 0); + } +#endif + if(!theGroupsList.IsEmpty() ) { SplitDataList ModifInpGroupList; @@ -256,7 +275,16 @@ HYDROData_SplitToZonesTool::SplitDataList if (SData.Type != SplitData::Data_Edge) ModifInpGroupList.append(SData); //add as is const TopoDS_Shape& SData_sh = SData.Shape; - const TopTools_ListOfShape& modif_ls = OutOrSh2M.FindFromKey(SData_sh); + TopTools_ListOfShape modif_ls; + if (!InterPolys.IsEmpty()) + if (OutOrSh2M.Contains(SData_sh)) + modif_ls = OutOrSh2M.FindFromKey(SData_sh); + //else TODO - show message that one of the object should be updated + +#ifndef NDEBUG + if (!InterPolys.IsEmpty() && OutOrSh2M.IsEmpty()) + assert (true); +#endif if (modif_ls.IsEmpty()) ModifInpGroupList.append(SData); //non modified else