]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
A fix by PKV for a problem with element removal from a being iterated TCollection_Map
authorjfa <jfa@opencascade.com>
Wed, 27 Mar 2013 08:53:12 +0000 (08:53 +0000)
committerjfa <jfa@opencascade.com>
Wed, 27 Mar 2013 08:53:12 +0000 (08:53 +0000)
src/GEOMAlgo/GEOMAlgo_Builder_3.cxx

index 066cc9c7d6cc23a520c50abf174afd46e995e323..16d41220d7908190c4b509da72803cb2477b670c 100755 (executable)
@@ -282,9 +282,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
       else {
         //aMS.Add(aShell);
         TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
-        //modified by NIZNHY-PKV Fri Dec 03 11:18:45 2010f
         TopExp::MapShapes(aShell, TopAbs_EDGE, aMS);
-        //modified by NIZNHY-PKV Fri Dec 03 11:18:51 2010t
         TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
       }
     }
@@ -513,11 +511,9 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
     }
     const TopTools_ListOfShape& aSFS1=aSSi.GetSet();
     aNbSFS=aSFS1.Extent();
-    //modified by NIZNHY-PKV Wed Oct 27 09:53:15 2010f
     if (!aNbSFS) {
       continue;
     }
-    //modified by NIZNHY-PKV Wed Oct 27 09:53:18 2010t
     //
     // 1.3 Build new solids
     aSB.SetContext(aCtx);
@@ -695,7 +691,12 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
       const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
       aNbSx=aLSx.Extent();
       if (aNbSx) {
-        aMSI.Remove(aSI);
+       //modified by NIZNHY-PKV Wed Mar 27 11:39:15 2013f
+       //aMSI.Remove(aSI);
+        if (aMSI.Remove(aSI)) {
+         aItM.Initialize(aMSI);
+       }
+       //modified by NIZNHY-PKV Wed Mar 27 11:39:18 2013t
       }
     }
   }