]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
18.12.2013.Update of Split method (basesd on bug of Partition algorithm in history).
authorszy <szy@opencascade.com>
Wed, 18 Dec 2013 12:48:30 +0000 (12:48 +0000)
committerszy <szy@opencascade.com>
Wed, 18 Dec 2013 12:48:30 +0000 (12:48 +0000)
src/HYDROData/HYDROData_SplitToZonesTool.cxx

index de99585d7a5fbd3b8e026ec9e0eebf31f6863e39..cbc77b7ce4ba324b236da80387c003ec8f984c1f 100644 (file)
@@ -137,10 +137,19 @@ HYDROData_SplitToZonesTool::SplitDataList
   
   // Step 3. Collect history  
   HYDROData_DataMapOfShapeListOfShape aDM1;
-  anIt.Init(aLS);
+  anIt.Init(aLS); 
   for (;anIt.More();anIt.Next()) {
-       const TopTools_ListOfShape& aListOfNew = aBuilder->Modified(anIt.Value());
-       aDM1.Bind(anIt.Value(), aListOfNew);
+       const TopTools_ListOfShape& aListOfNew = aBuilder->Modified(anIt.Value());      
+    TopTools_ListOfShape aList;
+       TopTools_ListIteratorOfListOfShape it1(aListOfNew);
+       for(;it1.More();it1.Next())       
+         aList.Append(it1.Value());
+    const TopTools_ListOfShape& aListOfGen = aBuilder->Generated(anIt.Value());
+       TopTools_ListIteratorOfListOfShape it2(aListOfGen);    
+       for(;it2.More();it2.Next())     
+         aList.Append(it2.Value());
+
+       aDM1.Bind(anIt.Value(), aList);
        //cout << "NB_Face = " << aList.Extent() <<endl;
        //TopExp_Explorer exp (anIt.Value(), TopAbs_EDGE);
        //for (;exp.More();exp.Next()) {
@@ -148,6 +157,7 @@ HYDROData_SplitToZonesTool::SplitDataList
         // cout << "NB_EDGE = " << aList2.Extent() <<endl;
        //}
   }
+
   // aDM2: NewShape ==> ListOfOldShapes
   HYDROData_DataMapOfShapeListOfShape aDM2;
   HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape aMIt(aDM1);
@@ -166,7 +176,7 @@ HYDROData_SplitToZonesTool::SplitDataList
          }
        }
   }
-
+  //cout << "DM2 Ext = " <<aDM2.Extent() <<endl;
   // Step 4. Fill output structure.
   aMIt.Initialize(aDM2);
   for(;aMIt.More();aMIt.Next()) {