0025769: Replace BOPCol_Array1 with NCollection_Vector
authorpkv <pkv@opencascade.com>
Fri, 30 Jan 2015 11:02:21 +0000 (14:02 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 5 Feb 2015 11:32:08 +0000 (14:32 +0300)
New features:
1. class NCollection_BaseVector
    method:
    void SetIncrement(const Standard_Integer aIncrement)
    has been added.
    The method allows to set the size of increment dynamically
    [ not in constructor ].

2 class BOPCol_Array1
    has been removed.

Changes:
1. classes
BOPDS_DS
BOPDS_InterfFF
BOPDS_Iterator
BOPDS_VectorOfCurve
BOPDS_VectorOfFaceInfo
BOPDS_VectorOfIndexRange
BOPDS_VectorOfInterfEE
BOPDS_VectorOfInterfEF
BOPDS_VectorOfInterfEZ
BOPDS_VectorOfInterfFF
BOPDS_VectorOfInterfFZ
BOPDS_VectorOfInterfVE
BOPDS_VectorOfInterfVF
BOPDS_VectorOfInterfVV
BOPDS_VectorOfInterfVZ
BOPDS_VectorOfInterfZZ
BOPDS_VectorOfListOfPassKeyBoolean
BOPDS_VectorOfListOfPaveBlock
BOPDS_VectorOfPoint
BOPDS_VectorOfShapeInfo
BOPAlgo_PaveFiller
QANewModTopOpe_Tools
have been modified to take into account New features: 1 and 2

2. class BOPTest_Chronometer
has been modified to use the driver of the type
OSD_Timer instead OSD_Chronometer

33 files changed:
src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/BOPCol/BOPCol.cdl
src/BOPCol/BOPCol_Array1.hxx [deleted file]
src/BOPCol/FILES
src/BOPDS/BOPDS_DS.cxx
src/BOPDS/BOPDS_Interf.hxx
src/BOPDS/BOPDS_Iterator.cxx
src/BOPDS/BOPDS_VectorOfCurve.hxx
src/BOPDS/BOPDS_VectorOfFaceInfo.hxx
src/BOPDS/BOPDS_VectorOfIndexRange.hxx
src/BOPDS/BOPDS_VectorOfInterfEE.hxx
src/BOPDS/BOPDS_VectorOfInterfEF.hxx
src/BOPDS/BOPDS_VectorOfInterfEZ.hxx
src/BOPDS/BOPDS_VectorOfInterfFF.hxx
src/BOPDS/BOPDS_VectorOfInterfFZ.hxx
src/BOPDS/BOPDS_VectorOfInterfVE.hxx
src/BOPDS/BOPDS_VectorOfInterfVF.hxx
src/BOPDS/BOPDS_VectorOfInterfVV.hxx
src/BOPDS/BOPDS_VectorOfInterfVZ.hxx
src/BOPDS/BOPDS_VectorOfInterfZZ.hxx
src/BOPDS/BOPDS_VectorOfListOfPassKeyBoolean.hxx
src/BOPDS/BOPDS_VectorOfListOfPaveBlock.hxx
src/BOPDS/BOPDS_VectorOfPoint.hxx
src/BOPDS/BOPDS_VectorOfShapeInfo.hxx
src/BOPTest/BOPTest_Chronometer.hxx
src/NCollection/NCollection_BaseVector.hxx
src/QANewModTopOpe/QANewModTopOpe_Tools.cxx

index 39a363e..e918fc9 100644 (file)
@@ -44,7 +44,7 @@
   void BOPAlgo_PaveFiller::PerformVV() 
 {
   Standard_Boolean bWithSubShape;
-  Standard_Integer n1, n2, iFlag, nX, n, aSize, i, j, iX, k, aNbBlocks;
+  Standard_Integer n1, n2, iFlag, nX, n, aSize, i, j, k, aNbBlocks;
   Handle(NCollection_IncAllocator) aAllocator;
   BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItMILI;
   BOPCol_ListIteratorOfListOfInteger aItLI, aItLI2;
@@ -62,9 +62,7 @@
   aSIn.SetShapeType(TopAbs_VERTEX);
   
   BOPDS_VectorOfInterfVV& aVVs=myDS->InterfVV();
-  aVVs.SetStartSize(aSize);
   aVVs.SetIncrement(aSize);
-  aVVs.Init();
   //
   //-----------------------------------------------------scope f
   aAllocator=new NCollection_IncAllocator();
           n2=aItLI2.Value();
           //
           myDS->AddInterf(n1, n2);
-          iX=aVVs.Append()-1;
-          BOPDS_InterfVV& aVV=aVVs(iX);
+          BOPDS_InterfVV& aVV=aVVs.Append1();
+          //
           aVV.SetIndices(n1, n2);
           aVV.SetIndexNew(n);
         }
index 90787bf..de5af54 100644 (file)
@@ -39,7 +39,7 @@
 void BOPAlgo_PaveFiller::PerformVZ()
 {
   Standard_Boolean bJustAdd;
-  Standard_Integer iSize, nV, nZ, i;
+  Standard_Integer iSize, nV, nZ;
   Standard_Real aTol;
   gp_Pnt aPV;
   TopAbs_State aState;
@@ -53,9 +53,7 @@ void BOPAlgo_PaveFiller::PerformVZ()
   }
   //
   BOPDS_VectorOfInterfVZ& aVZs=myDS->InterfVZ();
-  aVZs.SetStartSize(iSize);
   aVZs.SetIncrement(iSize);
-  aVZs.Init();
   //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nV, nZ, bJustAdd);
@@ -78,8 +76,7 @@ void BOPAlgo_PaveFiller::PerformVZ()
     //
     aState=aSC.State();
     if (aState==TopAbs_IN)  {
-      i=aVZs.Append()-1;
-      BOPDS_InterfVZ& aVZ=aVZs(i);
+      BOPDS_InterfVZ& aVZ=aVZs.Append1();
       aVZ.SetIndices(nV, nZ);
       //
       myDS->AddInterf(nV, nZ);
@@ -92,8 +89,8 @@ void BOPAlgo_PaveFiller::PerformVZ()
 //=======================================================================
 void BOPAlgo_PaveFiller::PerformEZ()
 {
-   Standard_Boolean bJustAdd, bHasInterf;
-  Standard_Integer iSize, nE, nZ, i;
+  Standard_Boolean bJustAdd, bHasInterf;
+  Standard_Integer iSize, nE, nZ;
   //
   myErrorStatus=0;
   //
@@ -104,9 +101,7 @@ void BOPAlgo_PaveFiller::PerformEZ()
   }
   //
   BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ();
-  aEZs.SetStartSize(iSize);
   aEZs.SetIncrement(iSize);
-  aEZs.Init();
   //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nE, nZ, bJustAdd);
@@ -124,8 +119,7 @@ void BOPAlgo_PaveFiller::PerformEZ()
       continue;
     }
     //
-    i=aEZs.Append()-1;
-    BOPDS_InterfEZ& aEZ=aEZs(i);
+    BOPDS_InterfEZ& aEZ=aEZs.Append1();
     aEZ.SetIndices(nE, nZ);
     //
     myDS->AddInterf(nE, nZ);
@@ -138,7 +132,7 @@ void BOPAlgo_PaveFiller::PerformEZ()
 void BOPAlgo_PaveFiller::PerformFZ()
 {
   Standard_Boolean bJustAdd, bHasInterf;
-  Standard_Integer iSize, nF, nZ, i;
+  Standard_Integer iSize, nF, nZ;
   //
   myErrorStatus=0;
   //
@@ -149,9 +143,7 @@ void BOPAlgo_PaveFiller::PerformFZ()
   }
   //
   BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ();
-  aFZs.SetStartSize(iSize);
   aFZs.SetIncrement(iSize);
-  aFZs.Init();
   //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nF, nZ, bJustAdd);
@@ -169,8 +161,7 @@ void BOPAlgo_PaveFiller::PerformFZ()
       continue;
     }
     //
-    i=aFZs.Append()-1;
-    BOPDS_InterfFZ& aFZ=aFZs(i);
+    BOPDS_InterfFZ& aFZ=aFZs.Append1();
     aFZ.SetIndices(nF, nZ);
     //
     myDS->AddInterf(nF, nZ);
@@ -183,7 +174,7 @@ void BOPAlgo_PaveFiller::PerformFZ()
 void BOPAlgo_PaveFiller::PerformZZ()
 {
   Standard_Boolean bJustAdd, bHasInterf, bFlag;
-  Standard_Integer iSize, nZ1, nZ, i;
+  Standard_Integer iSize, nZ1, nZ;
   //
   myErrorStatus=0;
   //
@@ -194,9 +185,7 @@ void BOPAlgo_PaveFiller::PerformZZ()
   }
   //
   BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ();
-  aZZs.SetStartSize(iSize);
   aZZs.SetIncrement(iSize);
-  aZZs.Init();
   //
   bFlag=Standard_False;
   //
@@ -214,8 +203,7 @@ void BOPAlgo_PaveFiller::PerformZZ()
       continue; 
     }
     //
-    i=aZZs.Append()-1;
-    BOPDS_InterfZZ& aZZ=aZZs(i);
+    BOPDS_InterfZZ& aZZ=aZZs.Append1();
     aZZ.SetIndices(nZ1, nZ);
     //
     myDS->AddInterf(nZ1, nZ);
index 51c3ace..c0584d1 100644 (file)
@@ -136,7 +136,7 @@ typedef BOPCol_TBBContextCnt
 void BOPAlgo_PaveFiller::PerformVE()
 {
   Standard_Boolean bJustAdd;
-  Standard_Integer iSize, nV, nE, nVSD, iFlag, nVx, i, k, aNbVE;;
+  Standard_Integer iSize, nV, nE, nVSD, iFlag, nVx,  k, aNbVE;
   Standard_Real aT, aTolE, aTolV;
   BOPDS_Pave aPave;
   BOPDS_PassKey aPK;
@@ -153,9 +153,7 @@ void BOPAlgo_PaveFiller::PerformVE()
   }
   //
   BOPDS_VectorOfInterfVE& aVEs=myDS->InterfVE();
-  aVEs.SetStartSize(iSize);
   aVEs.SetIncrement(iSize);
-  aVEs.Init();
   //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nV, nE, bJustAdd);
@@ -213,8 +211,7 @@ void BOPAlgo_PaveFiller::PerformVE()
       const TopoDS_Vertex& aV=aVESolver.Vertex();
       const TopoDS_Edge& aE=aVESolver.Edge();
       // 1
-      i=aVEs.Append()-1;
-      BOPDS_InterfVE& aVE=aVEs(i);
+      BOPDS_InterfVE& aVE=aVEs.Append1();
       aVE.SetIndices(nV, nE);
       aVE.SetParameter(aT);
       // 2
index d45b936..c20af59 100644 (file)
@@ -298,9 +298,7 @@ void BOPAlgo_PaveFiller::PerformEE()
   BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks aMVCPB(100, aAllocator);
   //
   BOPDS_VectorOfInterfEE& aEEs=myDS->InterfEE();
-  aEEs.SetStartSize(iSize);
   aEEs.SetIncrement(iSize);
-  aEEs.Init();
   //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nE1, nE2, bJustAdd);
@@ -489,10 +487,10 @@ void BOPAlgo_PaveFiller::PerformEE()
               continue;
             }
           }
-          
+          //
           // 1
-          iX=aEEs.Append()-1;
-          BOPDS_InterfEE& aEE=aEEs(iX);
+          BOPDS_InterfEE& aEE=aEEs.Append1();
+          iX=aEEs.Extent()-1;
           aEE.SetIndices(nE1, nE2);
           aEE.SetCommonPart(aCPart);
           // 2
@@ -517,8 +515,8 @@ void BOPAlgo_PaveFiller::PerformEE()
             break;
           }
           // 1
-          iX=aEEs.Append()-1;
-          BOPDS_InterfEE& aEE=aEEs(iX);
+          BOPDS_InterfEE& aEE=aEEs.Append1();
+          iX=aEEs.Extent()-1;
           aEE.SetIndices(nE1, nE2);
           aEE.SetCommonPart(aCPart);
           // 2
@@ -911,7 +909,7 @@ void BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV,
   aNbPnt = aProjector.NbPoints();
   if (aNbPnt) {
     Standard_Real aT, aDist;
-    Standard_Integer i;
+    //Standard_Integer i;
     BRep_Builder aBB;
     BOPDS_Pave aPave;
     //
@@ -919,12 +917,7 @@ void BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV,
     aT=aProjector.LowerDistanceParameter();
     //
     BOPDS_VectorOfInterfVE& aVEs=myDS->InterfVE();
-    if (aVEs.Extent() == 0) {
-      aVEs.Init();
-    }
-    //
-    i=aVEs.Append()-1;
-    BOPDS_InterfVE& aVE=aVEs(i);
+    BOPDS_InterfVE& aVE=aVEs.Append1();
     aVE.SetIndices(nV, nE);
     aVE.SetParameter(aT);
     //
index 0cb860b..5b92b5e 100644 (file)
@@ -143,7 +143,7 @@ typedef BOPCol_TBBContextCnt
 void BOPAlgo_PaveFiller::PerformVF()
 {
   Standard_Boolean bJustAdd;
-  Standard_Integer iSize, nV, nF, nVSD, iFlag, nVx, i, aNbVF, k;
+  Standard_Integer iSize, nV, nF, nVSD, iFlag, nVx, aNbVF, k;
   Standard_Real aT1, aT2, aTolF, aTolV;
   BRep_Builder aBB;
   BOPAlgo_VectorOfVertexFace aVVF; 
@@ -155,9 +155,7 @@ void BOPAlgo_PaveFiller::PerformVF()
   if (iSize) {
     //
     BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
-    aVFs.SetStartSize(iSize);
     aVFs.SetIncrement(iSize);
-    aVFs.Init();
     //
     for (; myIterator->More(); myIterator->Next()) {
       myIterator->Value(nV, nF, bJustAdd);
@@ -214,8 +212,7 @@ void BOPAlgo_PaveFiller::PerformVF()
       const TopoDS_Vertex& aV=aVertexFace.Vertex();
       const TopoDS_Face& aF=aVertexFace.Face();
       // 1
-      i=aVFs.Append()-1;
-      BOPDS_InterfVF& aVF=aVFs(i);
+      BOPDS_InterfVF& aVF=aVFs.Append1();
       aVF.SetIndices(nVx, nF);
       aVF.SetUV(aT1, aT2);
       // 2
@@ -238,9 +235,7 @@ void BOPAlgo_PaveFiller::PerformVF()
   else {
     iSize=10;
     BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
-    aVFs.SetStartSize(iSize);
     aVFs.SetIncrement(iSize);
-    aVFs.Init();
   }
   //
   TreatVerticesEE();
@@ -251,7 +246,7 @@ void BOPAlgo_PaveFiller::PerformVF()
 //=======================================================================
 void BOPAlgo_PaveFiller::TreatVerticesEE()
 {
-  Standard_Integer i, aNbS, aNbEEs, nF, nV, iFlag;
+  Standard_Integer i, aNbS,aNbEEs, nF, nV, iFlag;
   Standard_Real aT1, aT2;
   BOPCol_ListIteratorOfListOfInteger aItLI;
   Handle(NCollection_IncAllocator) aAllocator;
@@ -315,8 +310,8 @@ void BOPAlgo_PaveFiller::TreatVerticesEE()
       iFlag=myContext->ComputeVF(aV, aF, aT1, aT2);
       if (!iFlag) {
         // 1
-        i=aVFs.Append()-1;
-        BOPDS_InterfVF& aVF=aVFs(i);
+        BOPDS_InterfVF& aVF=aVFs.Append1();
+        i=aVFs.Extent()-1;
         aVF.SetIndices(nV, nF);
         aVF.SetUV(aT1, aT2);
         // 2
index 9b1b320..b3f45d3 100644 (file)
@@ -169,9 +169,7 @@ void BOPAlgo_PaveFiller::PerformEF()
   aDeflection=0.01;
   //
   BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
-  aEFs.SetStartSize(iSize);
   aEFs.SetIncrement(iSize);
-  aEFs.Init();
   //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nE, nF, bJustAdd);
@@ -297,10 +295,10 @@ void BOPAlgo_PaveFiller::PerformEF()
             bV[0]=CheckFacePaves(nV[0], aMIFOn, aMIFIn);
             bV[1]=CheckFacePaves(nV[1], aMIFOn, aMIFIn);
             if (bV[0] && bV[1]) {
-              iX=aEFs.Append()-1;
               IntTools_CommonPrt aCP = aCPart;
               aCP.SetType(TopAbs_EDGE);
-              BOPDS_InterfEF& aEF=aEFs(iX);
+              BOPDS_InterfEF& aEF=aEFs.Append1();
+              iX=aEFs.Extent()-1;
               aEF.SetIndices(nE, nF);
               aEF.SetCommonPart(aCP);
               myDS->AddInterf(nE, nF);
@@ -344,8 +342,8 @@ void BOPAlgo_PaveFiller::PerformEF()
             //
             aMIEFC.Add(nF);
             // 1
-            iX=aEFs.Append()-1;
-            BOPDS_InterfEF& aEF=aEFs(iX);
+            BOPDS_InterfEF& aEF=aEFs.Append1();
+            iX=aEFs.Extent()-1;
             aEF.SetIndices(nE, nF);
             aEF.SetCommonPart(aCPart);
             // 2
@@ -363,8 +361,8 @@ void BOPAlgo_PaveFiller::PerformEF()
           aMIEFC.Add(nF);
           //
           // 1
-          iX=aEFs.Append()-1;
-          BOPDS_InterfEF& aEF=aEFs(iX);
+          BOPDS_InterfEF& aEF=aEFs.Append1();
+          iX=aEFs.Extent()-1;
           aEF.SetIndices(nE, nF);
           //
           bV[0]=CheckFacePaves(nV[0], aMIFOn, aMIFIn);
@@ -637,16 +635,11 @@ Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVF
   gp_Pnt2d aP2d(U, V);
   bRet = myContext->IsPointInFace (aF, aP2d);
   if (bRet) {
-    Standard_Integer i;
+    //Standard_Integer i;
     BRep_Builder aBB;
     //
     BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
-    if (aVFs.Extent() == 0) {
-      aVFs.Init();
-    }
-    //
-    i=aVFs.Append()-1;
-    BOPDS_InterfVF& aVF=aVFs(i);
+    BOPDS_InterfVF& aVF=aVFs.Append1();
     aVF.SetIndices(nV, nF);
     aVF.SetUV(U, V);
     //
index 90f4aa3..4e1c129 100644 (file)
@@ -195,7 +195,7 @@ void BOPAlgo_PaveFiller::PerformFF()
   //
   Standard_Boolean bJustAdd, bApp, bCompC2D1, bCompC2D2, bIsDone;
   Standard_Boolean bToSplit, bTangentFaces;
-  Standard_Integer nF1, nF2, aNbCurves, aNbPoints, iX, i, iP, iC, aNbLP;
+  Standard_Integer nF1, nF2, aNbCurves, aNbPoints, i, aNbLP;
   Standard_Integer aNbFaceFace, k;
   Standard_Real aApproxTol, aTolR3D, aTolR2D, aTolFF;
   BRepAdaptor_Surface aBAS1, aBAS2;
@@ -203,9 +203,7 @@ void BOPAlgo_PaveFiller::PerformFF()
   BOPAlgo_VectorOfFaceFace aVFaceFace;
   //
   BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
-  aFFs.SetStartSize(iSize);
   aFFs.SetIncrement(iSize);
-  aFFs.Init();
   //
   bApp=mySectionAttribute.Approximation();
   bCompC2D1=mySectionAttribute.PCurveOnS1();
@@ -241,8 +239,7 @@ void BOPAlgo_PaveFiller::PerformFF()
       bToIntersect = CheckPlanes(nF1, nF2);
       if (!bToIntersect) {
         myDS->AddInterf(nF1, nF2);
-        iX=aFFs.Append()-1;
-        BOPDS_InterfFF& aFF=aFFs(iX);
+        BOPDS_InterfFF& aFF=aFFs.Append1();
         aFF.SetIndices(nF1, nF2);
         aFF.Init(0, 0);
         continue;
@@ -304,8 +301,7 @@ void BOPAlgo_PaveFiller::PerformFF()
         myDS->AddInterf(nF1, nF2);
       } 
       //
-      iX=aFFs.Append()-1;
-      BOPDS_InterfFF& aFF=aFFs(iX);
+      BOPDS_InterfFF& aFF=aFFs.Append1();
       aFF.SetIndices(nF1, nF2);
       //
       aFF.SetTolR3D(aTolR3D);
@@ -324,8 +320,7 @@ void BOPAlgo_PaveFiller::PerformFF()
         const Handle(Geom_Curve)& aC3D= aIC.Curve();
         bValid=IntTools_Tools::CheckCurve(aC3D, aTolR3D, aBox);
         if (bValid) {
-          iC=aVNC.Append()-1;
-          BOPDS_Curve& aNC=aVNC(iC);
+          BOPDS_Curve& aNC=aVNC.Append1();
           aNC.SetCurve(aIC);
           aNC.SetBox(aBox);
         }
@@ -337,15 +332,13 @@ void BOPAlgo_PaveFiller::PerformFF()
         const IntTools_PntOn2Faces& aPi=aPntsX(i);
         const gp_Pnt& aP=aPi.P1().Pnt();
         //
-        iP=aVNP.Append()-1;
-        BOPDS_Point& aNP=aVNP(iP);
+        BOPDS_Point& aNP=aVNP.Append1();
         aNP.SetPnt(aP);
       }
     //}// if (aNbCs || aNbPs)
     }// if (bIsDone) {
     else {// 904/L1
-      iX=aFFs.Append()-1;
-      BOPDS_InterfFF& aFF=aFFs(iX);
+      BOPDS_InterfFF& aFF=aFFs.Append1();
       aFF.SetIndices(nF1, nF2);
       aNbCurves=0;
       aNbPoints=0;
@@ -2050,9 +2043,10 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
      BOPCol_DataMapOfShapeInteger& aMVI,
      BOPDS_VectorOfCurve& aVC) 
 {
-  Standard_Integer nV1, nV2;
+  Standard_Integer nV1, nV2, iC;
   //
-  Standard_Integer iC=aVC.Append()-1;
+  aVC.Append1();
+  iC=aVC.Extent()-1;
   BOPDS_ListOfPaveBlock& aLPBC = aVC(iC).ChangePaveBlocks();
   aLPBC.Append(aPB);
   //
index 0204c52..05654dc 100644 (file)
 
 package BOPCol 
 
      ---Purpose:  
-       -- The package contains collection classes 
-       -- that are used by  
-       -- partition and  boolean operation algorithms     
+ ---Purpose:  
+     -- The package contains collection classes 
+     -- that are used by  
+     -- partition and  boolean operation algorithms     
 uses 
     TCollection
  
@@ -37,7 +37,6 @@ is
     imported DataMapOfShapeAddress from BOPCol;   
     imported DataMapOfTransientAddress from BOPCol;   
     imported PListOfInteger from BOPCol;  
-    imported VectorOfInteger from BOPCol;  
     imported MapOfShape from BOPCol;  
     imported DataMapOfShapeShape from BOPCol;  
     imported DataMapOfShapeListOfShape from BOPCol;  
diff --git a/src/BOPCol/BOPCol_Array1.hxx b/src/BOPCol/BOPCol_Array1.hxx
deleted file mode 100755 (executable)
index 1fea94d..0000000
+++ /dev/null
@@ -1,427 +0,0 @@
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 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_Array1_HeaderFile
-#define BOPCol_Array1_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <Standard.hxx>
-#include <NCollection_BaseAllocator.hxx>
-
-/**
-* Class BOPCol_Array1 (dynamic array of objects)
-*
-*   1. The Array1 uses the allocator (in terms of NCollection_BaseAllocator)
-*      to allocate the memory.
-*   2. The memory is allocated as a list of memory blocks. The size of the first
-*      block is myStartSize. The size of the other blocks is myIncrement  
-*   3  The Array1 is  created with 0 length. 
-*   4. The Array1 must be initiated by invoke the method Init(). 
-*      Init() allocates the memory block for initial myStartSize elements. 
-*   5. The elements can be added by the method Append(theElement). the method 
-*      Append(theElement) arranges theElement in 
-*       a) previously allocated memory block (if it is possible)     
-*       b) new allocated memory block (otherwise). The size of new blocks to 
-*          allocate can be set [once only] by the method SetIncrement(theSize). 
-*   6. The contents of the element with index "i" can be queried or modified 
-*      by the methods  
-*      SetValue(i, theElement), Value(i), ChangeValue(i), operator()(i)
-*/
-
-//=======================================================================
-//class : MemBlock
-//
-//=======================================================================
-template <class Type> class BOPCol_MemBlock {
- public:
-  // Ctor
-  BOPCol_MemBlock(const Handle(NCollection_BaseAllocator)& theAllocator) {
-    myI1=0;
-    myI2=0;
-    mySize=0;
-    myData=NULL;
-    myAllocator=theAllocator;
-    myNext=NULL;
-  }
-  // ~
-  ~BOPCol_MemBlock(){
-    Clear();
-  }
-  // Clear
-  void Clear() {
-    if (myData) {
-      //Standard_Integer i;
-      Standard_Size i;
-      //
-      for (i=0; i<mySize; ++i) {
-        myData[i].~Type();
-      }
-      myAllocator->Free(myData);
-      //
-      myData=NULL;
-      mySize=0;
-      myNext=NULL;
-    }
-  }
-  // Allocate
-  void Allocate(const Standard_Size theSize) { 
-    //Standard_Integer i;
-    Standard_Size i;
-    //
-    Clear();
-    mySize=theSize;
-    myData=(Type*)myAllocator->Allocate(theSize*sizeof(Type));
-    for (i=0; i<mySize; ++i) {
-#ifdef BOPCol_Array1_Use_Allocator
-      new (myData+i) Type (myAllocator);
-#else
-      new (myData+i) Type;
-#endif
-    }
-  }
-  // SetRange
-  void SetRange(const Standard_Integer theI1,
-                const Standard_Integer theI2) {
-    myI1=theI1;
-    myI2=theI2;
-  }
-  // Range
-  void Range(Standard_Integer& theI1,
-             Standard_Integer& theI2) const {
-    theI1=myI1;
-    theI2=myI2;
-  }
-  // Contains
-  Standard_Boolean Contains(const Standard_Integer theIndex)const {
-    return (theIndex>=myI1 && theIndex<=myI2);
-  }
-  // SetValue
-  void SetValue(const Standard_Integer theIndex,
-                const Type& theValue) {
-    *(myData+theIndex-myI1)=theValue;
-  }
-  // Value
-  const Type& Value(const Standard_Integer theIndex)const {
-    return *(myData+theIndex-myI1);
-  }
-  // ChangeValue
-  Type& ChangeValue(const Standard_Integer theIndex) {
-    return *(myData+theIndex-myI1);
-  }
-  // SetNext
-  void SetNext(BOPCol_MemBlock<Type>* pNext) {
-    myNext=pNext;
-  }
-  // Next
-  BOPCol_MemBlock<Type>* Next() {
-    return myNext;
-  }
-  //
- public:
-  BOPCol_MemBlock<Type>* myNext;
- protected:
-  Standard_Integer myI1;
-  Standard_Integer myI2;
-  Standard_Size mySize;
-  Type *myData;
-  Handle(NCollection_BaseAllocator) myAllocator;
-};
-
-//=======================================================================
-//class  : BOPCol_Array1
-//
-//=======================================================================
-template <class Type> class BOPCol_Array1 {
-
- public:
-  typedef BOPCol_MemBlock<Type>*  BOPCol_PMemBlock;
-  typedef BOPCol_MemBlock<Type>   BOPCol_XMemBlock;
-  //=========
-  // Ctor
-  BOPCol_Array1(const Handle(NCollection_BaseAllocator)& theAllocator=0L) {
-    myStartSize=32;
-    myIncrement=8;
-    myExtent=0;
-    myPBlock=NULL;
-    myPBlock1=NULL;
-    //
-    if (theAllocator.IsNull()) {
-      myAllocator = NCollection_BaseAllocator::CommonBaseAllocator();
-    }
-    else {
-      myAllocator=theAllocator;
-    }
-  }
-  // ~
-  ~BOPCol_Array1() {
-    Clear();
-  }
-  //===========
-  // Clear
-  void Clear() {
-    BOPCol_PMemBlock pBlock, pNext;
-    //
-    pBlock=myPBlock1;
-    while(pBlock) {
-      pNext=pBlock->Next();
-      //
-      pBlock->~BOPCol_XMemBlock();
-      myAllocator->Free(pBlock);
-      //
-      pBlock=pNext;
-    }
-    myPBlock1=NULL;
-    myPBlock=NULL;
-    myExtent=0;
-  }
-  // SetStartSize
-  void SetStartSize(const Standard_Integer theSize) {
-    if (theSize>0) {
-      myStartSize=theSize;
-    }
-  }
-  // SetIncrement
-  void SetIncrement(const Standard_Integer theSize){
-    if (theSize>0) {
-      myIncrement=theSize;
-    }
-  }
-  // Increment
-  Standard_Integer Increment()const {
-    return myIncrement;
-  }
-  // Extent
-  Standard_Integer Extent()const {
-    return myExtent;
-  }
-  // Size
-  Standard_Integer Size()const {
-    return myExtent;
-  }
-  // Size
-  Standard_Integer Length()const {
-    return myExtent;
-  }
-  // Init
-  void Init();
-  // Append(const Type& theValue)
-  Standard_Integer Append(const Type& theValue);
-  // Append()
-  Standard_Integer Append();
-  // SetValue
-  void SetValue(const Standard_Integer theIndex,
-                const Type& theValue);
-  // Value
-  const Type& operator()(const Standard_Integer theIndex)const;
-  //
-  const Type& Value(const Standard_Integer theIndex)const;
-  // ChangeValue
-  Type& operator()(const Standard_Integer theIndex);
-  //
-  Type& ChangeValue(const Standard_Integer theIndex);
- //
- // protected
- protected:
-  //===========
-  //FindBlock
-  Standard_Boolean FindBlock(const Standard_Integer theIndex)const ;
-  //Copy ctor
-  BOPCol_Array1(const BOPCol_Array1&);
-  //Assign operator
-  BOPCol_Array1& operator =(const BOPCol_Array1& theOther);
-  //==========
-  // fields
- protected:
-  Standard_Integer myStartSize;
-  Standard_Integer myIncrement;
-  Standard_Integer myExtent;
-  Type myDfltItem;
-  BOPCol_MemBlock<Type> * myPBlock; 
-  BOPCol_MemBlock<Type> * myPBlock1; 
-  Handle(NCollection_BaseAllocator) myAllocator;
-};
-//
-//=======================================================================
-//function : Init
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  void BOPCol_Array1<Type>::Init() {
-    BOPCol_PMemBlock pBlock;
-    //
-    pBlock=(BOPCol_PMemBlock)myAllocator->Allocate(sizeof(BOPCol_MemBlock<Type>));
-    new (pBlock) BOPCol_MemBlock<Type>(myAllocator);
-    //
-    pBlock->Allocate(myStartSize);
-    pBlock->SetRange(0, myStartSize-1);
-    myPBlock1=pBlock;
-    myPBlock=pBlock;
-  }
-//=======================================================================
-//function : Append
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  Standard_Integer BOPCol_Array1<Type>::Append(const Type& theValue) {
-    BOPCol_PMemBlock pBlock, pNext;
-    //
-    pBlock=myPBlock1;
-    for(;;) {
-      pNext=pBlock->myNext;
-      if(!pNext) {
-        myPBlock=pBlock;
-        break;
-      }
-      pBlock=pNext;
-    }
-    //
-    if (!myPBlock->Contains(myExtent)) {
-      //
-      pBlock=(BOPCol_PMemBlock)myAllocator->Allocate(sizeof(BOPCol_MemBlock<Type>));
-      new (pBlock) BOPCol_MemBlock<Type>(myAllocator);
-      //
-      pBlock->Allocate(myIncrement);
-      pBlock->SetRange(myExtent, myExtent+myIncrement-1);
-      //
-      myPBlock->myNext=pBlock;
-      //
-      myPBlock=pBlock;
-    }
-    //
-    myPBlock->SetValue(myExtent, theValue);
-    //
-    ++myExtent;
-    //
-    return myExtent;
-  }
-//=======================================================================
-//function : Append
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  Standard_Integer BOPCol_Array1<Type>::Append() {
-    BOPCol_PMemBlock pBlock, pNext;
-    //
-    pBlock=myPBlock1;
-    for(;;) {
-      pNext=pBlock->myNext;
-      if(!pNext) {
-        myPBlock=pBlock;
-        break;
-      }
-      pBlock=pNext;
-    }
-    //
-    if (!myPBlock->Contains(myExtent)) {
-      //
-      pBlock=(BOPCol_PMemBlock)myAllocator->Allocate(sizeof(BOPCol_MemBlock<Type>));
-      new (pBlock) BOPCol_MemBlock<Type>(myAllocator);
-      //
-      pBlock->Allocate(myIncrement);
-      pBlock->SetRange(myExtent, myExtent+myIncrement-1);
-      //
-      myPBlock->myNext=pBlock;
-      //
-      myPBlock=pBlock;
-    }
-    ++myExtent;
-    //
-    return myExtent;
-  }
-//=======================================================================
-//function : SetValue
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  void BOPCol_Array1<Type>::SetValue(const Standard_Integer theIndex,
-                                     const Type& theValue) {
-    if (FindBlock(theIndex)) {
-      myPBlock->SetValue(theIndex, theValue);
-    }
-  }
-//=======================================================================
-//function : operator()
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  const Type& BOPCol_Array1<Type>::operator()(const Standard_Integer theIndex)const {
-    if (FindBlock(theIndex)) {
-      return myPBlock->Value(theIndex);
-    }
-    return myDfltItem;
-  }
-//=======================================================================
-//function : Value
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  const Type& BOPCol_Array1<Type>::Value(const Standard_Integer theIndex)const {
-    return operator()(theIndex);
-  }
-//=======================================================================
-//function : operator
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  Type& BOPCol_Array1<Type>::operator()(const Standard_Integer theIndex) {
-    if (FindBlock(theIndex)) {
-      return myPBlock->ChangeValue(theIndex);
-    }
-    return myDfltItem;
-  }
-//=======================================================================
-//function : ChangeValue
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  Type& BOPCol_Array1<Type>::ChangeValue(const Standard_Integer theIndex) {
-    return operator()(theIndex);
-  }
-//=======================================================================
-//function : FindBlock
-//purpose  : 
-//=======================================================================
-template <class Type> 
-  Standard_Boolean BOPCol_Array1<Type>::FindBlock(const Standard_Integer theIndex)const {
-    Standard_Boolean bRet;
-    //
-    bRet=myPBlock->Contains(theIndex);
-    if(bRet) {
-      return bRet;
-    }
-    //
-    Standard_Integer i1, i2;
-    BOPCol_PMemBlock pBlock, *xPBlock;
-    //
-    xPBlock=(BOPCol_PMemBlock*)&myPBlock;
-    pBlock=myPBlock1;
-    //
-    i1=0;
-    i2=myStartSize-1;
-    do {
-      if (theIndex>=i1 && theIndex<=i2) {
-        *xPBlock=pBlock;
-        return !bRet;
-      }
-      //
-      i1=i2+1;
-      i2=i1+myIncrement-1;
-      pBlock=pBlock->myNext;
-    } while(pBlock);
-    //
-    return bRet;
-  }
-
-#endif
index fde2995..412ba99 100644 (file)
@@ -1,4 +1,3 @@
-BOPCol_Array1.hxx
 BOPCol_DataMapOfShapeInteger.hxx
 BOPCol_DataMapOfShapeReal.hxx
 BOPCol_MapOfInteger.hxx
@@ -14,7 +13,6 @@ BOPCol_ListOfShape.hxx
 BOPCol_DataMapOfShapeAddress.hxx
 BOPCol_DataMapOfTransientAddress.hxx
 BOPCol_PListOfInteger.hxx
-BOPCol_VectorOfInteger.hxx
 BOPCol_MapOfShape.hxx
 BOPCol_DataMapOfShapeShape.hxx
 BOPCol_DataMapOfShapeListOfShape.hxx
index c0df289..f4e133a 100644 (file)
@@ -91,24 +91,24 @@ BOPDS_DS::BOPDS_DS()
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
   myArguments(myAllocator),
-  myRanges(myAllocator),
-  myLines(myAllocator),
+  myRanges(0,myAllocator),
+  myLines(0, myAllocator), 
   myMapShapeIndex(100, myAllocator),
-  myPaveBlocksPool(myAllocator),
+  myPaveBlocksPool(0,myAllocator),
   myMapPBCB(100, myAllocator),
-  myFaceInfoPool(myAllocator),
+  myFaceInfoPool(0, myAllocator),
   myShapesSD(100, myAllocator),
   myInterfTB(100, myAllocator),
-  myInterfVV(myAllocator),
-  myInterfVE(myAllocator),
-  myInterfVF(myAllocator),
-  myInterfEE(myAllocator),
-  myInterfEF(myAllocator),
-  myInterfFF(myAllocator),
-  myInterfVZ(myAllocator),
-  myInterfEZ(myAllocator),
-  myInterfFZ(myAllocator),
-  myInterfZZ(myAllocator),
+  myInterfVV(0, myAllocator),
+  myInterfVE(0, myAllocator),
+  myInterfVF(0, myAllocator),
+  myInterfEE(0, myAllocator),
+  myInterfEF(0, myAllocator),
+  myInterfFF(0, myAllocator),
+  myInterfVZ(0, myAllocator),
+  myInterfEZ(0, myAllocator),
+  myInterfFZ(0, myAllocator),
+  myInterfZZ(0, myAllocator),
   myFuzzyValue(0.),
   myToleranceMap(100, myAllocator)
 {
@@ -123,24 +123,24 @@ BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
   myArguments(myAllocator),
-  myRanges(myAllocator),
-  myLines(myAllocator),
+  myRanges(0, myAllocator),
+  myLines(0, myAllocator),
   myMapShapeIndex(100, myAllocator),
-  myPaveBlocksPool(myAllocator),
+  myPaveBlocksPool(0, myAllocator),
   myMapPBCB(100, myAllocator),
-  myFaceInfoPool(myAllocator),
+  myFaceInfoPool(0, myAllocator),
   myShapesSD(100, myAllocator),
   myInterfTB(100, myAllocator),
-  myInterfVV(myAllocator),
-  myInterfVE(myAllocator),
-  myInterfVF(myAllocator),
-  myInterfEE(myAllocator),
-  myInterfEF(myAllocator),
-  myInterfFF(myAllocator),
-  myInterfVZ(myAllocator),
-  myInterfEZ(myAllocator),
-  myInterfFZ(myAllocator),
-  myInterfZZ(myAllocator),
+  myInterfVV(0, myAllocator),
+  myInterfVE(0, myAllocator),
+  myInterfVF(0, myAllocator),
+  myInterfEE(0, myAllocator),
+  myInterfEF(0, myAllocator),
+  myInterfFF(0, myAllocator),
+  myInterfVZ(0, myAllocator),
+  myInterfEZ(0, myAllocator),
+  myInterfFZ(0, myAllocator),
+  myInterfZZ(0, myAllocator),
   myFuzzyValue(0.),
   myToleranceMap(100, myAllocator)
 {
@@ -277,8 +277,9 @@ Standard_Integer BOPDS_DS::Append(const BOPDS_ShapeInfo& theSI)
 {
   Standard_Integer iX;
   //
-  iX=myLines.Append()-1;
-  myLines(iX)=theSI;
+  myLines.Append1()=theSI;
+  iX=myLines.Extent()-1;
+  //
   return iX;
 }
 //=======================================================================
@@ -289,8 +290,8 @@ Standard_Integer BOPDS_DS::Append(const TopoDS_Shape& theS)
 {
   Standard_Integer iX;
   //
-  iX=myLines.Append()-1;
-  myLines(iX).SetShape(theS);
+  myLines.Append1().SetShape(theS);
+  iX=myLines.Extent()-1;
   return iX;
 }
 //=======================================================================
@@ -320,6 +321,7 @@ BOPDS_ShapeInfo& BOPDS_DS::ChangeShapeInfo(const Standard_Integer theI)
 //=======================================================================
 const TopoDS_Shape& BOPDS_DS::Shape(const Standard_Integer theI)const
 {
+  
   const TopoDS_Shape& aS=ShapeInfo(theI).Shape();
   return aS;
 }
@@ -360,8 +362,7 @@ void BOPDS_DS::Init()
     return;
   }
   //
-  myRanges.SetStartSize(aNb);
-  myRanges.Init();
+  myRanges.SetIncrement(aNb);
   //
   aIt.Initialize(myArguments);
   for (; aIt.More(); aIt.Next()) {
@@ -379,10 +380,7 @@ void BOPDS_DS::Init()
     aNbS=aNbS+aNbSx;
   }
   //
-  myLines.SetStartSize(2*aNbS);
-  myLines.SetIncrement(aNbS);
-  myLines.Init();
-  //
+  myLines.SetIncrement(2*aNbS);
   //-----------------------------------------------------scope_1 f
   aAllocator=new NCollection_IncAllocator();
   //
@@ -651,17 +649,10 @@ void BOPDS_DS::Init()
   aMI.Clear();
   aAllocator.Nullify();
   //-----------------------------------------------------scope_1 t
-  //
   // 3 myPaveBlocksPool
-  myPaveBlocksPool.SetStartSize(aNbE);
-  myPaveBlocksPool.SetIncrement(aNbE);
-  myPaveBlocksPool.Init();
-  //
   // 4. myFaceInfoPool
-  myFaceInfoPool.SetStartSize(aNbF);
+  myPaveBlocksPool.SetIncrement(aNbE);
   myFaceInfoPool.SetIncrement(aNbF);
-  myFaceInfoPool.Init();
-  //
 }
 //=======================================================================
 //function : InitShape
@@ -934,8 +925,8 @@ void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
     }
   }
   //
-  iRef = myPaveBlocksPool.Append() - 1;
-  BOPDS_ListOfPaveBlock &aLPB=myPaveBlocksPool(iRef);
+  BOPDS_ListOfPaveBlock &aLPB=myPaveBlocksPool.Append1();
+  iRef=myPaveBlocksPool.Extent()-1;
   //
   aPB->Update(aLPB, Standard_False);
   aSI.SetReference(iRef);
@@ -1265,8 +1256,8 @@ void BOPDS_DS::InitFaceInfo(const Standard_Integer theI)
   Standard_Integer iRef;
   //
   BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
-  iRef=myFaceInfoPool.Append()-1;
-  BOPDS_FaceInfo &aFI=myFaceInfoPool(iRef);
+  BOPDS_FaceInfo &aFI=myFaceInfoPool.Append1();
+  iRef=myFaceInfoPool.Extent()-1;
   aSI.SetReference(iRef);
   //
   aFI.SetIndex(theI);
index 1ad9797..5fc69d3 100644 (file)
@@ -496,27 +496,11 @@ class BOPDS_InterfFF  : public BOPDS_Interf {
       myTangentFaces(Standard_False),
       myTolR3D(1.e-7),
       myTolR2D(1.e-7),
-      myCurves(myAllocator),
-      myPoints(myAllocator) {
+      myCurves(0, myAllocator),
+      myPoints(0, myAllocator) 
+  {
   }
   //
-  /**
-   *  Constructor
-   * @param theAllocator
-   *   allocator to manage the memory
-   */
-  /*
-  BOPDS_InterfFF(const Handle(NCollection_BaseAllocator)& theAllocator)
-    : 
-      BOPDS_Interf(theAllocator),
-      myTangentFaces(Standard_False),
-      myTolR3D(1.e-7),
-      myTolR2D(1.e-7),
-      myCurves(myAllocator),
-      myPoints(myAllocator) {
-  }
-  */
-  //
   /**
    *  Destructor
    */
@@ -530,8 +514,17 @@ class BOPDS_InterfFF  : public BOPDS_Interf {
    * @param theNbPoints
    *   number of intersection points
    */
+  
   void Init(const Standard_Integer theNbCurves,
             const Standard_Integer theNbPoints) {
+    //modified by NIZNHY-PKV Mon Jan 26 09:01:06 2015f
+    if (theNbCurves>0) {
+      myCurves.SetIncrement(theNbCurves);
+    }
+    if (theNbPoints>0) {
+      myPoints.SetIncrement(theNbPoints);
+    }
+    /*
     if (theNbCurves>0) {
       myCurves.SetStartSize(theNbCurves);
       myCurves.SetIncrement(theNbCurves);
@@ -542,6 +535,8 @@ class BOPDS_InterfFF  : public BOPDS_Interf {
       myPoints.SetIncrement(theNbPoints);
       myPoints.Init();
     }
+    */
+    //modified by NIZNHY-PKV Mon Jan 26 09:01:12 2015t
   }
   /**
    * Modifier
index 5b240f9..29237d3 100644 (file)
@@ -84,11 +84,16 @@ BOPDS_Iterator::BOPDS_Iterator()
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
   myRunParallel(Standard_False)
 {
+  Standard_Integer i, aNb;
+  //
   myDS=NULL; 
   myLength=0;
   //
-  myLists.SetStartSize(BOPDS_DS::NbInterfTypes());
-  myLists.Init();
+  aNb=BOPDS_DS::NbInterfTypes();
+  myLists.SetIncrement(aNb);
+  for (i=0; i<aNb; ++i) {
+    myLists.Append1();
+  }
 }
 //=======================================================================
 //function : 
@@ -98,14 +103,19 @@ BOPDS_Iterator::BOPDS_Iterator
   (const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
-  myLists(theAllocator),
+  myLists(0, theAllocator),
   myRunParallel(Standard_False)
 {
+  Standard_Integer i, aNb;
+  //
   myDS=NULL; 
   myLength=0;
   //
-  myLists.SetStartSize(BOPDS_DS::NbInterfTypes());
-  myLists.Init();
+  aNb=BOPDS_DS::NbInterfTypes();
+  myLists.SetIncrement(aNb);
+  for (i=0; i<aNb; ++i) {
+    myLists.Append1();
+  }
 }
 //=======================================================================
 //function : ~
index 954481d..3364b08 100644 (file)
 #ifndef BOPDS_VectorOfCurve_HeaderFile
 #define BOPDS_VectorOfCurve_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Curve.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-
-typedef BOPCol_Array1<BOPDS_Curve> BOPDS_VectorOfCurve;
-
-#undef BOPCol_Array1_Use_Allocator
-
+typedef BOPCol_NCVector<BOPDS_Curve> BOPDS_VectorOfCurve;
 
 #endif
index 1b09deb..a7f49dd 100644 (file)
 #ifndef BOPDS_VectorOfFaceInfo_HeaderFile
 #define BOPDS_VectorOfFaceInfo_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_FaceInfo.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-
-typedef BOPCol_Array1<BOPDS_FaceInfo> BOPDS_VectorOfFaceInfo;
-
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_FaceInfo> BOPDS_VectorOfFaceInfo;
 
 #endif
index 23e694a..4dcfc40 100644 (file)
@@ -15,9 +15,9 @@
 #ifndef BOPDS_VectorOfIndexRange_HeaderFile
 #define BOPDS_VectorOfIndexRange_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_IndexRange.hxx>
 
-typedef BOPCol_Array1<BOPDS_IndexRange> BOPDS_VectorOfIndexRange;
+typedef BOPCol_NCVector<BOPDS_IndexRange> BOPDS_VectorOfIndexRange;
 
 #endif
index 4bb181b..16237b7 100644 (file)
 #ifndef BOPDS_VectorOfInterfEE_HeaderFile
 #define BOPDS_VectorOfInterfEE_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfEE> BOPDS_VectorOfInterfEE;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfEE> BOPDS_VectorOfInterfEE;
 
 #endif
index 606357e..103d289 100644 (file)
 #ifndef BOPDS_VectorOfInterfEF_HeaderFile
 #define BOPDS_VectorOfInterfEF_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfEF> BOPDS_VectorOfInterfEF;
-#undef BOPCol_Array1_Use_Allocator
-
+typedef BOPCol_NCVector<BOPDS_InterfEF> BOPDS_VectorOfInterfEF;
 
 #endif
index 4fbb614..e1dbfa2 100644 (file)
 #ifndef BOPDS_VectorOfInterfEZ_HeaderFile
 #define BOPDS_VectorOfInterfEZ_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfEZ> BOPDS_VectorOfInterfEZ;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfEZ> BOPDS_VectorOfInterfEZ;
 
 #endif
index cb88301..2b49fb3 100644 (file)
 #ifndef BOPDS_VectorOfInterfFF_HeaderFile
 #define BOPDS_VectorOfInterfFF_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfFF> BOPDS_VectorOfInterfFF;
-#undef BOPCol_Array1_Use_Allocator
-
+typedef BOPCol_NCVector<BOPDS_InterfFF> BOPDS_VectorOfInterfFF;
 
 #endif
index 9261e6f..cf2e470 100644 (file)
 #ifndef BOPDS_VectorOfInterfFZ_HeaderFile
 #define BOPDS_VectorOfInterfFZ_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfFZ> BOPDS_VectorOfInterfFZ;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfFZ> BOPDS_VectorOfInterfFZ;
 
 #endif
index a8f2fb7..fe2a890 100644 (file)
 #ifndef BOPDS_VectorOfInterfVE_HeaderFile
 #define BOPDS_VectorOfInterfVE_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfVE> BOPDS_VectorOfInterfVE;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfVE> BOPDS_VectorOfInterfVE;
 
 #endif
index bcac147..9154507 100644 (file)
 #ifndef BOPDS_VectorOfInterfVF_HeaderFile
 #define BOPDS_VectorOfInterfVF_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfVF> BOPDS_VectorOfInterfVF;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfVF> BOPDS_VectorOfInterfVF;
 
 #endif
index fe0dea2..772ae84 100644 (file)
 #ifndef BOPDS_VectorOfInterfVV_HeaderFile
 #define BOPDS_VectorOfInterfVV_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfVV> BOPDS_VectorOfInterfVV;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfVV> BOPDS_VectorOfInterfVV;
 
 #endif
index 206b79c..f2f3dad 100644 (file)
 #ifndef BOPDS_VectorOfInterfVZ_HeaderFile
 #define BOPDS_VectorOfInterfVZ_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfVZ> BOPDS_VectorOfInterfVZ;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfVZ> BOPDS_VectorOfInterfVZ;
 
 #endif
index c412864..82928b1 100644 (file)
 #ifndef BOPDS_VectorOfInterfZZ_HeaderFile
 #define BOPDS_VectorOfInterfZZ_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Interf.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-typedef BOPCol_Array1<BOPDS_InterfZZ> BOPDS_VectorOfInterfZZ;
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_InterfZZ> BOPDS_VectorOfInterfZZ;
 
 #endif
index 4a058be..e2644e1 100644 (file)
 #ifndef BOPDS_VectorOfListOfPassKeyBoolean_HeaderFile
 #define BOPDS_VectorOfListOfPassKeyBoolean_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_ListOfPassKeyBoolean.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-
-typedef BOPCol_Array1<BOPDS_ListOfPassKeyBoolean> BOPDS_VectorOfListOfPassKeyBoolean;
-
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_ListOfPassKeyBoolean> BOPDS_VectorOfListOfPassKeyBoolean;
 
 #endif
index fc5245c..39389a6 100644 (file)
 #ifndef BOPDS_VectorOfListOfPaveBlock_HeaderFile
 #define BOPDS_VectorOfListOfPaveBlock_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_PaveBlock.hxx>
 #include <BOPDS_ListOfPaveBlock.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-
-typedef BOPCol_Array1<BOPDS_ListOfPaveBlock> BOPDS_VectorOfListOfPaveBlock;
-
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_ListOfPaveBlock> BOPDS_VectorOfListOfPaveBlock;
 
 #endif
index 504f0c7..2bbe1f3 100644 (file)
 #ifndef BOPDS_VectorOfPnt_HeaderFile
 #define BOPDS_VectorOfPnt_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_Point.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-
-typedef BOPCol_Array1<BOPDS_Point> BOPDS_VectorOfPoint;
-
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_Point> BOPDS_VectorOfPoint;
 
 
 #endif
index c32e0e0..236a14d 100644 (file)
 #ifndef BOPDS_VectorOfShapeInfo_HeaderFile
 #define BOPDS_VectorOfShapeInfo_HeaderFile
 
-#include <BOPCol_Array1.hxx>
+#include <BOPCol_NCVector.hxx>
 #include <BOPDS_ShapeInfo.hxx>
 
-#define BOPCol_Array1_Use_Allocator
-
-typedef BOPCol_Array1<BOPDS_ShapeInfo> BOPDS_VectorOfShapeInfo;
-
-#undef BOPCol_Array1_Use_Allocator
+typedef BOPCol_NCVector<BOPDS_ShapeInfo> BOPDS_VectorOfShapeInfo;
 
 #endif
index 16821d0..ba88bf0 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef  BOPTest_Chronometer_HeaderFile
 #define  BOPTest_Chronometer_HeaderFile
 //
-#include <OSD_Chronometer.hxx>
+#include <OSD_Timer.hxx>
 //=======================================================================
 //class    : BOPTest_Chronometer
 //purpose  : 
@@ -35,7 +35,7 @@ class BOPTest_Chronometer {
   //
   void Stop() {
     myChronometer.Stop();
-    myChronometer.Show(myTime);
+    myTime=myChronometer.ElapsedTime();
   }
   //
   double Time() const{
@@ -43,7 +43,7 @@ class BOPTest_Chronometer {
   };
   //
  protected:
-  OSD_Chronometer myChronometer;
+  OSD_Timer myChronometer;
   double myTime;
 };
 
index eefdd2a..7e8be30 100755 (executable)
@@ -200,6 +200,14 @@ public: //! @name public API
 
   //! Empty the vector of its objects
   Standard_EXPORT void Clear();
+  // to set the size of increment dynamically
+  void SetIncrement(const Standard_Integer aIncrement) {
+    if (aIncrement > 0) {
+      if (!myIncrement) {
+        myIncrement=aIncrement;
+      }
+    }
+  }
 
 protected: //! @name Protected fields
 
index aece47c..6470325 100644 (file)
@@ -453,6 +453,11 @@ Standard_Boolean QANewModTopOpe_Tools::EdgeSectionAncestors(const BOPAlgo_PPaveF
   nb = pDS->NbSourceShapes();
 
   nE = pDS->Index(theEdge);
+  //
+  if (nE<0) {
+    return Standard_False;
+  }
+  //
   const BOPDS_ListOfPaveBlock& aLPB1 = pDS->PaveBlocks(nE);
   if (!aLPB1.Extent()) {
     return Standard_False;