diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx index 71c0e1e6e9..61d8d2240f 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx @@ -14,6 +14,31 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,18 +55,6 @@ #include #include #include - -#include -#include -#include -#include -#include - -#include -#include - -#include -// #include #include #include @@ -63,6 +76,8 @@ #include #include +#include + // ================================================================================ // function: Constructor // purpose: @@ -825,10 +840,9 @@ void BOPAlgo_ArgumentAnalyzer::TestMergeEdge() // ================================================================================ void BOPAlgo_ArgumentAnalyzer::TestContinuity() { - Standard_Integer i; + Standard_Integer i, j, aNbS; Standard_Real f, l; TopExp_Explorer aExp; - BOPCol_MapIteratorOfMapOfShape aIt; // for (i = 0; i < 2; ++i) { const TopoDS_Shape& aS = !i ? myShape1 : myShape2; @@ -836,7 +850,7 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity() continue; } // - BOPCol_MapOfShape aMS; + BOPCol_IndexedMapOfShape aMS; //Edges aExp.Init(aS, TopAbs_EDGE); for (; aExp.More(); aExp.Next()) { @@ -860,9 +874,9 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity() } // //add shapes with continuity C0 to result - aIt.Initialize(aMS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aFS = aIt.Value(); + aNbS = aMS.Extent(); + for (j = 1; j <= aNbS; ++j) { + const TopoDS_Shape& aFS = aMS(j); BOPAlgo_CheckResult aResult; if(i == 0) { aResult.SetShape1(myShape1); diff --git a/src/BOPAlgo/BOPAlgo_BOP.cxx b/src/BOPAlgo/BOPAlgo_BOP.cxx index ec88eab219..25d20a8846 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.cxx +++ b/src/BOPAlgo/BOPAlgo_BOP.cxx @@ -45,14 +45,11 @@ #include #include -typedef NCollection_DataMap - BOPTools_DataMapOfSetShape; +typedef NCollection_IndexedDataMap + BOPTools_IndexedDataMapOfSetShape; // -typedef BOPTools_DataMapOfSetShape::Iterator - BOPTools_DataMapIteratorOfDataMapOfSetShape; - static TopAbs_ShapeEnum TypeToExplore(const Standard_Integer theDim); @@ -535,7 +532,7 @@ void BOPAlgo_BOP::BuildRC() BOPCol_ListIteratorOfListOfShape aItLS, aItIm; Standard_Boolean bHasInterf; Standard_Integer iX; - BOPTools_DataMapOfSetShape aDMSTS; + BOPTools_IndexedDataMapOfSetShape aDMSTS; // myErrorStatus=0; // @@ -595,7 +592,7 @@ void BOPAlgo_BOP::BuildRC() // aST.Add(aSIm, TopAbs_FACE); // - aDMSTS.Bind(aST, aSIm); + aDMSTS.Add(aST, aSIm); } } } @@ -660,8 +657,8 @@ void BOPAlgo_BOP::BuildRC() // aST.Add(aSIm, TopAbs_FACE); // - if (aDMSTS.IsBound(aST)) { - const TopoDS_Shape& aSImA=aDMSTS.Find(aST); + if (aDMSTS.Contains(aST)) { + const TopoDS_Shape& aSImA=aDMSTS.FindFromKey(aST); aBB.Add(aC, aSImA); } } @@ -674,7 +671,7 @@ void BOPAlgo_BOP::BuildRC() // aST.Add(aSIm, TopAbs_FACE); // - bIsBound=aDMSTS.IsBound(aST); + bIsBound=aDMSTS.Contains(aST); } // if (!bIsBound) { @@ -841,8 +838,7 @@ void BOPAlgo_BOP::BuildSolid() BOPCol_ListOfShape aSFS; BOPAlgo_BuilderSolid aSB; BOPCol_MapOfShape aMSA, aMZ; - BOPTools_DataMapOfSetShape aDMSTS; - BOPTools_DataMapIteratorOfDataMapOfSetShape aItDMSTS; + BOPTools_IndexedDataMapOfSetShape aDMSTS; // myErrorStatus=0; // @@ -898,8 +894,8 @@ void BOPAlgo_BOP::BuildSolid() // aST.Add(aSx, TopAbs_FACE); // - if (!aDMSTS.IsBound(aST)) { - aDMSTS.Bind(aST, aSx); + if (!aDMSTS.Contains(aST)) { + aDMSTS.Add(aST, aSx); } continue; @@ -996,9 +992,9 @@ void BOPAlgo_BOP::BuildSolid() aBB.Add(aRC, aSR); } // - aItDMSTS.Initialize(aDMSTS); - for (; aItDMSTS.More(); aItDMSTS.Next()) { - const TopoDS_Shape& aSx=aItDMSTS.Value(); + aNbSx = aDMSTS.Extent(); + for (i = 1; i <= aNbSx; ++i) { + const TopoDS_Shape& aSx = aDMSTS(i); aBB.Add(aRC, aSx); } // diff --git a/src/BOPAlgo/BOPAlgo_BuilderArea.cdl b/src/BOPAlgo/BOPAlgo_BuilderArea.cdl index 7d6fa7876b..40b61e8194 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderArea.cdl +++ b/src/BOPAlgo/BOPAlgo_BuilderArea.cdl @@ -25,7 +25,7 @@ uses Shape from TopoDS, BaseAllocator from BOPCol, ListOfShape from BOPCol, - MapOfOrientedShape from BOPCol, + IndexedMapOfOrientedShape from BOPCol, Context from IntTools --raises @@ -73,7 +73,7 @@ fields myLoopsInternal : ListOfShape from BOPCol is protected; myAreas : ListOfShape from BOPCol is protected; - myShapesToAvoid : MapOfOrientedShape from BOPCol is protected; + myShapesToAvoid : IndexedMapOfOrientedShape from BOPCol is protected; end BuilderArea; diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 09acefd67f..4b98a2aeef 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -16,16 +16,25 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -// -#include -#include -// -#include -// -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include // @@ -58,18 +67,8 @@ #include #include #include +#include // -#include -#include -#include -// -#include -#include -#include -#include -// -#include - static Standard_Boolean IsGrowthWire(const TopoDS_Shape& , const BOPCol_IndexedMapOfShape& ); @@ -79,7 +78,7 @@ static const TopoDS_Shape& , Handle(IntTools_Context)& ); static - void MakeInternalWires(const BOPCol_MapOfShape& , + void MakeInternalWires(const BOPCol_IndexedMapOfShape& , BOPCol_ListOfShape& ); static void GetWire(const TopoDS_Shape& , @@ -132,8 +131,7 @@ class BOPAlgo_ShapeBox2D { // typedef NCollection_IndexedDataMap BOPAlgo_IndexedDataMapOfIntegerShapeBox2D; + BOPAlgo_ShapeBox2D> BOPAlgo_IndexedDataMapOfIntegerShapeBox2D; typedef NCollection_IndexedDataMap -// -#include -#include -#include -#include -// -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include // @@ -47,34 +61,12 @@ #include #include -// -#include -#include -// -#include -#include -// -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// -#include -#include -#include -#include -// +#include #include +#include +#include + // -#include - - static Standard_Boolean IsGrowthShell(const TopoDS_Shape& , const BOPCol_IndexedMapOfShape& ); @@ -86,7 +78,7 @@ static const TopoDS_Shape& , Handle(IntTools_Context)& ); static - void MakeInternalShells(const BOPCol_MapOfShape& , + void MakeInternalShells(const BOPCol_IndexedMapOfShape& , BOPCol_ListOfShape& ); //======================================================================= @@ -261,14 +253,7 @@ typedef BOPCol_ContextCnt Handle(IntTools_Context)> BOPAlgo_FaceSolidCnt; // //======================================================================= -typedef NCollection_DataMap - BOPAlgo_DataMapOfShapePnt; -typedef BOPAlgo_DataMapOfShapePnt::Iterator - BOPAlgo_DataMapIteratorOfDataMapOfShapePnt; -// //======================================================================= //function : //purpose : @@ -448,10 +433,9 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid() //======================================================================= void BOPAlgo_BuilderSolid::PerformLoops() { - Standard_Integer iErr; + Standard_Integer iErr, i, aNbSh; BOPCol_ListIteratorOfListOfShape aIt; TopoDS_Iterator aItS; - BOPCol_MapIteratorOfMapOfOrientedShape aItM; Handle(NCollection_BaseAllocator) aAlr; // myErrorStatus=0; @@ -512,9 +496,9 @@ void BOPAlgo_BuilderSolid::PerformLoops() } // // b. collect all edges that are to avoid - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aF=aItM.Key(); + aNbSh = myShapesToAvoid.Extent(); + for (i = 1; i <= aNbSh; ++i) { + const TopoDS_Shape& aF = myShapesToAvoid(i); aMP.Add(aF); } // @@ -536,17 +520,16 @@ void BOPAlgo_BuilderSolid::PerformLoops() aEFMap.Clear(); AddedFacesMap.Clear(); // - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aFF=aItM.Key(); + aNbSh = myShapesToAvoid.Extent(); + for (i = 1; i <= aNbSh; ++i) { + const TopoDS_Shape& aFF = myShapesToAvoid(i); BOPTools::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap); } // - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aFF=aItM.Key(); + for (i = 1; i <= aNbSh; ++i) { + const TopoDS_Shape& aFF = myShapesToAvoid(i); if (!AddedFacesMap.Add(aFF)) { continue; } @@ -585,11 +568,11 @@ void BOPAlgo_BuilderSolid::PerformLoops() void BOPAlgo_BuilderSolid::PerformAreas() { Standard_Boolean bIsGrowth, bIsHole; - Standard_Integer k; + Standard_Integer i, k, aNbInOut, aNbMSH; BRep_Builder aBB; BOPCol_ListIteratorOfListOfShape aItLS; BOPCol_ListOfShape aNewSolids, aHoleShells; - BOPCol_DataMapOfShapeShape aInOutMap; + BOPCol_IndexedDataMapOfShapeShape aInOutMap; BOPCol_IndexedMapOfShape aMHF; BOPCol_ListIteratorOfListOfInteger aItLI; BOPCol_BoxBndTreeSelector aSelector; @@ -597,10 +580,8 @@ void BOPAlgo_BuilderSolid::PerformAreas() NCollection_UBTreeFiller aTreeFiller(aBBTree); BOPAlgo_DataMapOfIntegerBSSB aDMISB(100); + BOPCol_IndexedDataMapOfShapeListOfShape aMSH; BOPAlgo_DataMapIteratorOfDataMapOfIntegerBSSB aItDMISB; - BOPCol_DataMapOfShapeListOfShape aMSH; - BOPCol_DataMapIteratorOfDataMapOfShapeShape aItDMSS; - BOPCol_DataMapIteratorOfDataMapOfShapeListOfShape aItMSH; // myErrorStatus=0; // @@ -698,42 +679,41 @@ void BOPAlgo_BuilderSolid::PerformAreas() continue; } // - if (aInOutMap.IsBound (aHole)){ - const TopoDS_Shape& aSolidWas=aInOutMap(aHole); + if (aInOutMap.Contains (aHole)){ + const TopoDS_Shape& aSolidWas = aInOutMap.FindFromKey(aHole); if (IsInside(aSolid, aSolidWas, myContext)) { - aInOutMap.UnBind(aHole); - aInOutMap.Bind (aHole, aSolid); + aInOutMap.ChangeFromKey(aHole) = aSolid; } } else{ - aInOutMap.Bind(aHole, aSolid); + aInOutMap.Add(aHole, aSolid); } } - }//for (; aItDMISB.More(); aItDMISB.Next()) { + }//for (i = 1; i <= aNbDMISB; ++i) { // // 5. Map [Solid/Holes] -> aMSH - aItDMSS.Initialize(aInOutMap); - for (; aItDMSS.More(); aItDMSS.Next()) { - const TopoDS_Shape& aHole=aItDMSS.Key(); - const TopoDS_Shape& aSolid=aItDMSS.Value(); + aNbInOut = aInOutMap.Extent(); + for (i = 1; i <= aNbInOut; ++i) { + const TopoDS_Shape& aHole = aInOutMap.FindKey(i); + const TopoDS_Shape& aSolid = aInOutMap(i); // - if (aMSH.IsBound(aSolid)) { - BOPCol_ListOfShape& aLH=aMSH.ChangeFind(aSolid); + if (aMSH.Contains(aSolid)) { + BOPCol_ListOfShape& aLH = aMSH.ChangeFromKey(aSolid); aLH.Append(aHole); } else { BOPCol_ListOfShape aLH; aLH.Append(aHole); - aMSH.Bind(aSolid, aLH); + aMSH.Add(aSolid, aLH); } } // // 6. Add aHoles to Solids - aItMSH.Initialize(aMSH); - for (; aItMSH.More(); aItMSH.Next()) { - TopoDS_Solid aSolid=(*(TopoDS_Solid*)(&aItMSH.Key())); + aNbMSH = aMSH.Extent(); + for (i = 1; i <= aNbMSH; ++i) { + TopoDS_Solid aSolid=(*(TopoDS_Solid*)(&(aMSH.FindKey(i)))); + const BOPCol_ListOfShape& aLH = aMSH(i); // - const BOPCol_ListOfShape& aLH=aItMSH.Value(); aItLS.Initialize(aLH); for (; aItLS.More(); aItLS.Next()) { const TopoDS_Shape& aHole = aItLS.Value(); @@ -758,7 +738,7 @@ void BOPAlgo_BuilderSolid::PerformAreas() aItLS.Initialize(aHoleShells); for (; aItLS.More(); aItLS.Next()) { const TopoDS_Shape& aHole = aItLS.Value(); - if (!aInOutMap.IsBound(aHole)){ + if (!aInOutMap.Contains(aHole)){ TopoDS_Solid aSolid; // aBB.MakeSolid(aSolid); @@ -787,7 +767,7 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() TopoDS_Iterator aIt; TopExp_Explorer aExp; BOPCol_ListIteratorOfListOfShape aItLS; - BOPCol_MapOfShape aMFs; + BOPCol_IndexedMapOfShape aMFs; BOPCol_ListOfShape aLSI; BOPAlgo_VectorOfFaceSolid aVFS; BOPAlgo_VectorOfFacePnt aVFP; @@ -807,7 +787,9 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() for (; aIt.More(); aIt.Next()) { const TopoDS_Face& aF=*((TopoDS_Face*)&aIt.Value()); // - if (aMFs.Add(aF)) { + if (!aMFs.Contains(aF)) { + aMFs.Add(aF); + // gp_Pnt aP; gp_Pnt2d aP2D; // @@ -985,27 +967,25 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() //function : MakeInternalShells //purpose : //======================================================================= -void MakeInternalShells(const BOPCol_MapOfShape& theMF, +void MakeInternalShells(const BOPCol_IndexedMapOfShape& theMF, BOPCol_ListOfShape& theShells) { - BOPCol_ListIteratorOfListOfShape aItF; + Standard_Integer i, aNbF; BRep_Builder aBB; - // + BOPCol_ListIteratorOfListOfShape aItF; BOPCol_IndexedDataMapOfShapeListOfShape aMEF; - BOPCol_MapIteratorOfMapOfShape aItM; BOPCol_MapOfShape aAddedFacesMap; // - aItM.Initialize(theMF); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aF=aItM.Key(); + aNbF = theMF.Extent(); + for (i = 1; i <= aNbF; ++i) { + TopoDS_Shape aF = theMF(i); BOPTools::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); } // - aItM.Initialize(theMF); - for (; aItM.More(); aItM.Next()) { - TopoDS_Shape aFF=aItM.Key(); + for (i = 1; i <= aNbF; ++i) { + TopoDS_Shape aFF = theMF(i); if (!aAddedFacesMap.Add(aFF)) { continue; } diff --git a/src/BOPAlgo/BOPAlgo_Builder_1.cxx b/src/BOPAlgo/BOPAlgo_Builder_1.cxx index 5c1e98a35f..4206e105b0 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_1.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_1.cxx @@ -149,19 +149,19 @@ aType=aS.ShapeType(); if (aType==theType) { if (myImages.IsBound(aS)){ - const BOPCol_ListOfShape& aLSIm=myImages.Find(aS); - aItIm.Initialize(aLSIm); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aSIm=aItIm.Value(); - if (aM.Add(aSIm)) { - aBB.Add(myShape, aSIm); - } - } + const BOPCol_ListOfShape& aLSIm=myImages.Find(aS); + aItIm.Initialize(aLSIm); + for (; aItIm.More(); aItIm.Next()) { + const TopoDS_Shape& aSIm=aItIm.Value(); + if (aM.Add(aSIm)) { + aBB.Add(myShape, aSIm); + } + } } else { - if (aM.Add(aS)) { - aBB.Add(myShape, aS); - } + if (aM.Add(aS)) { + aBB.Add(myShape, aS); + } } } } @@ -296,9 +296,9 @@ const BOPCol_ListOfShape& aLFIm=myImages.Find(aSX); aItIm.Initialize(aLFIm); for (; aItIm.More(); aItIm.Next()) { - TopoDS_Shape aSXIm=aItIm.Value(); - aSXIm.Orientation(aOrX); - aBB.Add(aCIm, aSXIm); + TopoDS_Shape aSXIm=aItIm.Value(); + aSXIm.Orientation(aOrX); + aBB.Add(aCIm, aSXIm); } } else { diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index 7ba2e5c29b..342834bcd3 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -264,7 +264,6 @@ void BOPAlgo_Builder::BuildSplitFaces() BOPCol_MapOfShape aMFence; Handle(NCollection_BaseAllocator) aAllocator; BOPCol_ListOfShape aLFIm(myAllocator); - BOPCol_MapIteratorOfMapOfShape aItMS; BOPAlgo_VectorOfBuilderFace aVBF; // myErrorStatus=0; @@ -866,27 +865,27 @@ Standard_Boolean HasPaveBlocksOnIn(const BOPDS_FaceInfo& aFI1, const BOPDS_FaceInfo& aFI2) { Standard_Boolean bRet; - BOPDS_MapIteratorOfMapOfPaveBlock aItMPB; + Standard_Integer i, aNbPB; // bRet=Standard_False; - const BOPDS_IndexedMapOfPaveBlock& aMPBOn1=aFI1.PaveBlocksOn(); - const BOPDS_IndexedMapOfPaveBlock& aMPBIn1=aFI1.PaveBlocksIn(); + const BOPDS_IndexedMapOfPaveBlock& aMPBOn1 = aFI1.PaveBlocksOn(); + const BOPDS_IndexedMapOfPaveBlock& aMPBIn1 = aFI1.PaveBlocksIn(); // - const BOPDS_IndexedMapOfPaveBlock& aMPBOn2=aFI2.PaveBlocksOn(); - aItMPB.Initialize(aMPBOn2); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); - bRet=aMPBOn1.Contains(aPB) || aMPBIn1.Contains(aPB); + const BOPDS_IndexedMapOfPaveBlock& aMPBOn2 = aFI2.PaveBlocksOn(); + aNbPB = aMPBOn2.Extent(); + for (i = 1; i <= aNbPB; ++i) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBOn2(i); + bRet = aMPBOn1.Contains(aPB) || aMPBIn1.Contains(aPB); if (bRet) { return bRet; } } // - const BOPDS_IndexedMapOfPaveBlock& aMPBIn2=aFI2.PaveBlocksIn(); - aItMPB.Initialize(aMPBIn2); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); - bRet=aMPBOn1.Contains(aPB) || aMPBIn1.Contains(aPB); + const BOPDS_IndexedMapOfPaveBlock& aMPBIn2 = aFI2.PaveBlocksIn(); + aNbPB = aMPBIn2.Extent(); + for (i = 1; i <= aNbPB; ++i) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBIn2(i); + bRet = aMPBOn1.Contains(aPB) || aMPBIn1.Contains(aPB); if (bRet) { return bRet; } diff --git a/src/BOPAlgo/BOPAlgo_Builder_3.cxx b/src/BOPAlgo/BOPAlgo_Builder_3.cxx index 6bd36a448c..8570c4c437 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_3.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_3.cxx @@ -801,7 +801,6 @@ void BOPAlgo_Builder::BuildSplitSolids Standard_Integer i, aNbS; TopExp_Explorer aExp; BOPCol_ListIteratorOfListOfShape aIt; - BOPCol_DataMapIteratorOfDataMapOfShapeShape aIt1; // Handle(NCollection_IncAllocator) aAlr0; aAlr0=new NCollection_IncAllocator(); @@ -933,7 +932,6 @@ void BOPAlgo_Builder::FillInternalShapes() TopAbs_State aState; TopoDS_Iterator aItS; BRep_Builder aBB; - BOPCol_MapIteratorOfMapOfShape aItM; BOPCol_ListIteratorOfListOfShape aIt, aIt1; // Handle(NCollection_IncAllocator) aAllocator; @@ -942,12 +940,13 @@ void BOPAlgo_Builder::FillInternalShapes() // BOPCol_IndexedDataMapOfShapeListOfShape aMSx(100, aAllocator); BOPCol_IndexedMapOfShape aMx(100, aAllocator); - BOPCol_MapOfShape aMSI(100, aAllocator); + BOPCol_IndexedMapOfShape aMSI(100, aAllocator); BOPCol_MapOfShape aMFence(100, aAllocator); BOPCol_MapOfShape aMSOr(100, aAllocator); BOPCol_ListOfShape aLSd(aAllocator); BOPCol_ListOfShape aLArgs(aAllocator); BOPCol_ListOfShape aLSC(aAllocator); + BOPCol_ListOfShape aLSI(aAllocator); // // 1. Shapes to process // @@ -1066,20 +1065,23 @@ void BOPAlgo_Builder::FillInternalShapes() // // 3. Some shapes of aMSI can be already tied with faces of // split solids - aItM.Initialize(aMSI); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aSI=aItM.Key(); + aNbSI = aMSI.Extent(); + for (i = 1; i <= aNbSI; ++i) { + const TopoDS_Shape& aSI = aMSI(i); if (aMSx.Contains(aSI)) { const BOPCol_ListOfShape &aLSx=aMSx.FindFromKey(aSI); - aNbSx=aLSx.Extent(); - if (aNbSx) { - aMSI.Remove(aSI); + aNbSx = aLSx.Extent(); + if (!aNbSx) { + aLSI.Append(aSI); } } + else { + aLSI.Append(aSI); + } } // // 4. Just check it - aNbSI=aMSI.Extent(); + aNbSI = aLSI.Extent(); if (!aNbSI) { return; } @@ -1090,49 +1092,52 @@ void BOPAlgo_Builder::FillInternalShapes() for (; aIt.More(); aIt.Next()) { TopoDS_Solid aSd=TopoDS::Solid(aIt.Value()); // - aItM.Initialize(aMSI); - for (; aItM.More(); aItM.Next()) { - TopoDS_Shape aSI=aItM.Key(); + aIt1.Initialize(aLSI); + for (; aIt1.More();) { + TopoDS_Shape aSI = aIt1.Value(); aSI.Orientation(TopAbs_INTERNAL); // aState=BOPTools_AlgoTools::ComputeStateByOnePoint (aSI, aSd, 1.e-11, myContext); - if (aState==TopAbs_IN) { + // + if (aState != TopAbs_IN) { + aIt1.Next(); + continue; + } + // + if(aMSOr.Contains(aSd)) { // - if(aMSOr.Contains(aSd)) { - // - TopoDS_Solid aSdx; - // - aBB.MakeSolid(aSdx); - aItS.Initialize(aSd); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSh=aItS.Value(); - aBB.Add(aSdx, aSh); - } - // - aBB.Add(aSdx, aSI); - // - if (myImages.IsBound(aSdx)) { - BOPCol_ListOfShape& aLS=myImages.ChangeFind(aSdx); - aLS.Append(aSdx); - } - else { - BOPCol_ListOfShape aLS; - aLS.Append(aSdx); - myImages.Bind(aSd, aLS); - } - // - aMSOr.Remove(aSd); - aSd=aSdx; + TopoDS_Solid aSdx; + // + aBB.MakeSolid(aSdx); + aItS.Initialize(aSd); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Shape& aSh=aItS.Value(); + aBB.Add(aSdx, aSh); } + // + aBB.Add(aSdx, aSI); + // + if (myImages.IsBound(aSdx)) { + BOPCol_ListOfShape& aLS=myImages.ChangeFind(aSdx); + aLS.Append(aSdx); + } else { - aBB.Add(aSd, aSI); + BOPCol_ListOfShape aLS; + aLS.Append(aSdx); + myImages.Bind(aSd, aLS); } // - aMSI.Remove(aSI); - } //if (aState==TopAbs_IN) { - }// for (; aItM.More(); aItM.Next()) { - }//for (; aIt1.More(); aIt1.Next()) { + aMSOr.Remove(aSd); + aSd=aSdx; + } + else { + aBB.Add(aSd, aSI); + } + // + aLSI.Remove(aIt1); + }//for (; aIt1.More();) { + }//for (; aIt.More(); aIt.Next()) { // //-----------------------------------------------------scope t aLArgs.Clear(); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx index e918fc915a..5488251800 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx @@ -46,7 +46,6 @@ Standard_Boolean bWithSubShape; Standard_Integer n1, n2, iFlag, nX, n, aSize, i, j, k, aNbBlocks; Handle(NCollection_IncAllocator) aAllocator; - BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItMILI; BOPCol_ListIteratorOfListOfInteger aItLI, aItLI2; TopoDS_Vertex aVn; BOPDS_ShapeInfo aSIn; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index dffce44d40..71af23d2e5 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -737,8 +737,7 @@ void BOPAlgo_PaveFiller::TreatNewVertices BOPCol_IndexedMapOfShape aMVProcessed; BOPCol_MapOfInteger aMFence; BOPCol_ListIteratorOfListOfInteger aIt; - BOPCol_DataMapOfShapeListOfShape aDMVLV; - BOPCol_DataMapIteratorOfDataMapOfShapeListOfShape aItDMVLV; + BOPCol_IndexedDataMapOfShapeListOfShape aDMVLV; // BOPCol_BoxBndTreeSelector aSelector; BOPCol_BoxBndTree aBBTree; @@ -778,7 +777,6 @@ void BOPAlgo_PaveFiller::TreatNewVertices // Standard_Integer aIP, aNbIP1, aIP1; BOPCol_ListOfShape aLVSD; - BOPCol_MapIteratorOfMapOfInteger aItMI; BOPCol_ListOfInteger aLIP, aLIP1, aLIPC; BOPCol_ListIteratorOfListOfInteger aItLIP; // @@ -823,14 +821,14 @@ void BOPAlgo_PaveFiller::TreatNewVertices aLVSD.Append(aVP); } aVF=aLVSD.First(); - aDMVLV.Bind(aVF, aLVSD); + aDMVLV.Add(aVF, aLVSD); }// for (i=1; i<=aNbV; ++i) { // Make new vertices - aItDMVLV.Initialize(aDMVLV); - for(; aItDMVLV.More(); aItDMVLV.Next()) { - const TopoDS_Shape& aV=aItDMVLV.Key(); - const BOPCol_ListOfShape& aLVSD=aItDMVLV.Value(); + aNbV = aDMVLV.Extent(); + for (i = 1; i <= aNbV; ++i) { + const TopoDS_Shape& aV = aDMVLV.FindKey(i); + const BOPCol_ListOfShape& aLVSD = aDMVLV(i); if (aLVSD.IsEmpty()) { myImages.Add(aV, aLVSD); } diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index b51988c1ed..7f2de97830 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -65,8 +65,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx index 445f7ec233..23a274c92e 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx @@ -17,29 +17,9 @@ #include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include -#include - -#include -#include -#include - +#include +#include +#include #include #include #include @@ -63,6 +43,16 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + static Standard_Boolean IsBasedOnPlane(const TopoDS_Face& aF); @@ -472,8 +462,8 @@ void BOPAlgo_PaveFiller::MakePCurves() { Standard_Boolean bHasPC; Standard_Integer i, nF1, nF2, aNbC, k, nE, aNbFF, aNbFI, nEx; + Standard_Integer j, aNbPBIn, aNbPBOn; BOPDS_ListIteratorOfListOfPaveBlock aItLPB; - BOPDS_MapIteratorOfMapOfPaveBlock aItMPB; TopoDS_Face aF1F, aF2F; BOPAlgo_VectorOfMPC aVMPC; // @@ -491,9 +481,9 @@ void BOPAlgo_PaveFiller::MakePCurves() aF1F.Orientation(TopAbs_FORWARD); // In const BOPDS_IndexedMapOfPaveBlock& aMPBIn=aFI.PaveBlocksIn(); - aItMPB.Initialize(aMPBIn); - for(; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aNbPBIn = aMPBIn.Extent(); + for (j = 1; j <= aNbPBIn; ++j) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBIn(j); nE=aPB->Edge(); const TopoDS_Edge& aE=(*(TopoDS_Edge *)(&myDS->Shape(nE))); // @@ -505,9 +495,9 @@ void BOPAlgo_PaveFiller::MakePCurves() // // On const BOPDS_IndexedMapOfPaveBlock& aMPBOn=aFI.PaveBlocksOn(); - aItMPB.Initialize(aMPBOn); - for(; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aNbPBOn = aMPBOn.Extent(); + for (j = 1; j <= aNbPBOn; ++j) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBOn(j); nE=aPB->Edge(); const TopoDS_Edge& aE=(*(TopoDS_Edge *)(&myDS->Shape(nE))); bHasPC=BOPTools_AlgoTools2D::HasCurveOnSurface (aE, aF1F); @@ -715,10 +705,9 @@ void BOPAlgo_PaveFiller::Prepare() TopAbs_FACE }; Standard_Boolean bJustAdd, bIsBasedOnPlane; - Standard_Integer i, aNb, n1, nF; + Standard_Integer i, aNb, n1, nF, aNbF; TopExp_Explorer aExp; - BOPCol_MapOfShape aMF; - BOPCol_MapIteratorOfMapOfShape aItMF; + BOPCol_IndexedMapOfShape aMF; // myErrorStatus=0; // @@ -736,15 +725,15 @@ void BOPAlgo_PaveFiller::Prepare() } } // - if (aMF.IsEmpty()) { + aNbF = aMF.Extent(); + if (!aNbF) { return; } // BOPAlgo_VectorOfBPC aVBPC; // - aItMF.Initialize(aMF); - for (; aItMF.More(); aItMF.Next()) { - const TopoDS_Face& aF=*((TopoDS_Face *)&aItMF.Key()); + for (i = 1; i <= aNbF; ++i) { + const TopoDS_Face& aF = *(TopoDS_Face*)&aMF(i); aExp.Init(aF, aType[1]); for (; aExp.More(); aExp.Next()) { const TopoDS_Edge& aE=*((TopoDS_Edge *)&aExp.Current()); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx index 82b8e33f8f..3f42376e10 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx @@ -142,15 +142,14 @@ static const Standard_Integer nF, BOPDS_ListOfPaveBlock& aLPBOut) { - Standard_Integer nV1, nV2; - BOPDS_MapIteratorOfMapOfPaveBlock aItMPB; + Standard_Integer i, aNbPBOn, aNbPBIn, aNbPBSc, nV1, nV2; // const BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF); // In const BOPDS_IndexedMapOfPaveBlock& aMPBIn=aFI.PaveBlocksIn(); - aItMPB.Initialize(aMPBIn); - for(; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aNbPBIn = aMPBIn.Extent(); + for (i = 1; i <= aNbPBIn; ++i) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBIn(i); aPB->Indices(nV1, nV2); if (nV==nV1 || nV==nV2) { aLPBOut.Append(aPB); @@ -158,9 +157,9 @@ static } // On const BOPDS_IndexedMapOfPaveBlock& aMPBOn=aFI.PaveBlocksOn(); - aItMPB.Initialize(aMPBOn); - for(; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aNbPBOn = aMPBOn.Extent(); + for (i = 1; i <= aNbPBOn; ++i) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBOn(i); aPB->Indices(nV1, nV2); if (nV==nV1 || nV==nV2) { aLPBOut.Append(aPB); @@ -168,9 +167,9 @@ static } // Sections const BOPDS_IndexedMapOfPaveBlock& aMPBSc=aFI.PaveBlocksSc(); - aItMPB.Initialize(aMPBSc); - for(; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aNbPBSc = aMPBSc.Extent(); + for (i = 1; i <= aNbPBSc; ++i) { + const Handle(BOPDS_PaveBlock)& aPB = aMPBSc(i); aPB->Indices(nV1, nV2); if (nV==nV1 || nV==nV2) { aLPBOut.Append(aPB); diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx index c01423e88f..9c8020d73d 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx @@ -120,7 +120,6 @@ void BOPAlgo_WireSplitter::MakeConnexityBlocks() TopoDS_Iterator aItE; TopoDS_Shape aER; BOPCol_ListIteratorOfListOfShape aIt; - BOPCol_MapIteratorOfMapOfShape aItM; // BOPCol_IndexedDataMapOfShapeListOfShape aMVE(100, myAllocator); BOPCol_IndexedMapOfShape aMVP(100, myAllocator); @@ -184,7 +183,7 @@ void BOPAlgo_WireSplitter::MakeConnexityBlocks() } } } - }//for (; aItM.More(); aItM.Next()) { + }//for (k=1; k<=aNbVP; ++k) { // aNbVP=aMVAdd.Extent(); if (!aNbVP) { diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx index 34408661d9..697d1eb68e 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx @@ -14,15 +14,19 @@ #include -#include - -#include -#include -#include - -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -42,9 +46,6 @@ #include #include -#include -#include - #include #include @@ -848,8 +849,7 @@ void RefineAngles(const TopoDS_Face& myFace, BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo& mySmartMap) { Standard_Integer aNb, i; - BOPCol_DataMapOfShapeInteger aMSI; - BOPCol_DataMapIteratorOfDataMapOfShapeInteger aItMSI; + BOPCol_IndexedDataMapOfShapeInteger aMSI; BOPCol_MapOfShape aMBE; BOPCol_ListIteratorOfListOfShape aIt; // @@ -857,32 +857,29 @@ void RefineAngles(const TopoDS_Face& myFace, aIt.Initialize(myEdges); for(; aIt.More(); aIt.Next()) { const TopoDS_Shape& aE=aIt.Value(); - if(aMSI.IsBound(aE)) { - Standard_Integer& iCnt=aMSI.ChangeFind(aE); + if(aMSI.Contains(aE)) { + Standard_Integer& iCnt = aMSI.ChangeFromKey(aE); ++iCnt; } else { - Standard_Integer iCnt=1; - aMSI.Bind(aE, iCnt); + Standard_Integer iCnt = 1; + aMSI.Add(aE, iCnt); } } // - aItMSI.Initialize(aMSI); - for(; aItMSI.More(); aItMSI.Next()) { - Standard_Integer iCnt; - // - const TopoDS_Shape& aE=aItMSI.Key(); - iCnt=aItMSI.Value(); - if (iCnt==1) { + aNb = aMSI.Extent(); + for (i = 1; i <= aNb; ++i) { + Standard_Integer iCnt = aMSI(i); + if (iCnt == 1) { + const TopoDS_Shape& aE = aMSI.FindKey(i); aMBE.Add(aE); } - } // aMSI.Clear(); // - aNb=mySmartMap.Extent(); - for (i=1; i<=aNb; ++i) { + aNb = mySmartMap.Extent(); + for (i = 1; i <= aNb; ++i) { const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&mySmartMap.FindKey(i)); BOPAlgo_ListOfEdgeInfo& aLEI=mySmartMap(i); // diff --git a/src/BOPCol/BOPCol.cdl b/src/BOPCol/BOPCol.cdl index 05654dc891..1112492811 100644 --- a/src/BOPCol/BOPCol.cdl +++ b/src/BOPCol/BOPCol.cdl @@ -49,6 +49,7 @@ is imported DataMapOfIntegerListOfShape from BOPCol; imported IndexedDataMapOfIntegerListOfInteger from BOPCol; imported IndexedDataMapOfShapeInteger from BOPCol; - + imported IndexedDataMapOfShapeShape; + imported IndexedMapOfOrientedShape; end BOPCol; diff --git a/src/BOPCol/BOPCol_IndexedDataMapOfShapeShape.hxx b/src/BOPCol/BOPCol_IndexedDataMapOfShapeShape.hxx new file mode 100644 index 0000000000..8df38ff4b4 --- /dev/null +++ b/src/BOPCol/BOPCol_IndexedDataMapOfShapeShape.hxx @@ -0,0 +1,25 @@ +// Created by: Eugeny MALTCHIKOV +// Copyright (c) 2015 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef BOPCol_IndexedDataMapOfShapeShape_HeaderFile +#define BOPCol_IndexedDataMapOfShapeShape_HeaderFile + +#include +#include + +#include + +typedef NCollection_IndexedDataMap BOPCol_IndexedDataMapOfShapeShape; + +#endif diff --git a/src/BOPCol/BOPCol_IndexedMapOfOrientedShape.hxx b/src/BOPCol/BOPCol_IndexedMapOfOrientedShape.hxx new file mode 100644 index 0000000000..3848b37848 --- /dev/null +++ b/src/BOPCol/BOPCol_IndexedMapOfOrientedShape.hxx @@ -0,0 +1,25 @@ +// Created by: Eugeny MALTCHIKOV +// Copyright (c) 2015 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef BOPCol_IndexedMapOfOrientedShape_HeaderFile +#define BOPCol_IndexedMapOfOrientedShape_HeaderFile + +#include +#include + +#include + +typedef NCollection_IndexedMap BOPCol_IndexedMapOfOrientedShape; + +#endif diff --git a/src/BOPCol/FILES b/src/BOPCol/FILES index 8be3e7ddbd..e30dd413ed 100644 --- a/src/BOPCol/FILES +++ b/src/BOPCol/FILES @@ -19,6 +19,8 @@ BOPCol_DataMapOfShapeListOfShape.hxx BOPCol_MapOfOrientedShape.hxx BOPCol_IndexedDataMapOfShapeListOfShape.hxx BOPCol_IndexedMapOfShape.hxx +BOPCol_IndexedDataMapOfShapeShape.hxx +BOPCol_IndexedMapOfOrientedShape.hxx BOPCol_ListOfListOfShape.hxx BOPCol_SequenceOfShape.hxx BOPCol_SequenceOfPnt2d.hxx diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index f4e133a7cc..12f4440fb2 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -1363,7 +1363,7 @@ void BOPDS_DS::FaceInfoIn(const Standard_Integer theF, if (aSx.ShapeType()==TopAbs_VERTEX){ nV=Index(aSx); if (HasShapeSD(nV, nVSD)) { - nV=nVSD; + nV=nVSD; } theMI.Add(nV); } @@ -1446,20 +1446,19 @@ void BOPDS_DS::AloneVertices(const Standard_Integer theI, { if (HasFaceInfo(theI)) { // - Standard_Integer i, nV1, nV2, nV; - BOPDS_MapIteratorOfMapOfPaveBlock aItMPB; + Standard_Integer i, j, nV1, nV2, nV, aNbPB; BOPCol_MapIteratorOfMapOfInteger aItMI; // BOPCol_MapOfInteger aMI(100, myAllocator); // const BOPDS_FaceInfo& aFI=FaceInfo(theI); // - for (i=0; i<2; ++i) { + for (i = 0; i < 2; ++i) { const BOPDS_IndexedMapOfPaveBlock& aMPB= (!i) ? aFI.PaveBlocksIn() : aFI.PaveBlocksSc(); - aItMPB.Initialize(aMPB); - for (; aItMPB.More(); aItMPB.Next()) { - const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value(); + aNbPB = aMPB.Extent(); + for (j = 1; j <= aNbPB; ++j) { + const Handle(BOPDS_PaveBlock)& aPB = aMPB(j); aPB->Indices(nV1, nV2); aMI.Add(nV1); aMI.Add(nV2); diff --git a/src/BOPDS/BOPDS_IteratorSI.cxx b/src/BOPDS/BOPDS_IteratorSI.cxx index c3ab3c1894..bd477d0ff6 100644 --- a/src/BOPDS/BOPDS_IteratorSI.cxx +++ b/src/BOPDS/BOPDS_IteratorSI.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -93,7 +92,6 @@ void BOPDS_IteratorSI::Intersect() TopAbs_ShapeEnum aTi, aTj; Handle(NCollection_IncAllocator) aAllocator; BOPCol_ListIteratorOfListOfInteger aIt; - BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD; // //-----------------------------------------------------scope_1 f aAllocator=new NCollection_IncAllocator(); @@ -124,10 +122,10 @@ void BOPDS_IteratorSI::Intersect() const BOPCol_ListOfInteger& aLA=aSI.SubShapes(); aIt.Initialize(aLA); for (; aIt.More(); aIt.Next()) { - iX=aIt.Value(); - aPKXB.Clear(); - aPKXB.SetIds(i, iX); - aMPA.Add(aPKXB); + iX=aIt.Value(); + aPKXB.Clear(); + aPKXB.SetIds(i, iX); + aMPA.Add(aPKXB); } } //