0025609: Clean up the duplicate classes in TKBO project
[occt.git] / src / BOPAlgo / BOPAlgo_PaveFiller_2.cxx
index 9ac5e67..cea0789 100644 (file)
@@ -19,8 +19,6 @@
 #include <BOPAlgo_PaveFiller.hxx>
 #include <BOPAlgo_Alerts.hxx>
 #include <BOPAlgo_Tools.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
 #include <BOPDS_DS.hxx>
 #include <BOPDS_Interf.hxx>
 #include <BOPDS_Iterator.hxx>
 #include <BOPDS_PaveBlock.hxx>
 #include <BOPDS_VectorOfInterfVE.hxx>
 #include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <gp_Pnt.hxx>
 #include <IntTools_Context.hxx>
+#include <NCollection_Vector.hxx>
 #include <Precision.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
@@ -136,16 +136,16 @@ class BOPAlgo_VertexEdge : public BOPAlgo_Algo {
   Handle(BOPDS_PaveBlock) myPB;
 };
 //=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
   <BOPAlgo_VertexEdge> BOPAlgo_VectorOfVertexEdge; 
 //
-typedef BOPCol_ContextFunctor 
+typedef BOPTools_ContextFunctor 
   <BOPAlgo_VertexEdge,
   BOPAlgo_VectorOfVertexEdge,
   Handle(IntTools_Context), 
   IntTools_Context> BOPAlgo_VertexEdgeFunctor;
 //
-typedef BOPCol_ContextCnt 
+typedef BOPTools_ContextCnt 
   <BOPAlgo_VertexEdgeFunctor,
   BOPAlgo_VectorOfVertexEdge,
   Handle(IntTools_Context)> BOPAlgo_VertexEdgeCnt;
@@ -194,9 +194,9 @@ void BOPAlgo_PaveFiller::PerformVE()
       continue;
     }
     //
-    BOPCol_ListOfInteger* pLV = aMVEPairs.ChangeSeek(aPB);
+    TColStd_ListOfInteger* pLV = aMVEPairs.ChangeSeek(aPB);
     if (!pLV)
-      pLV = &aMVEPairs(aMVEPairs.Add(aPB, BOPCol_ListOfInteger()));
+      pLV = &aMVEPairs(aMVEPairs.Add(aPB, TColStd_ListOfInteger()));
     pLV->Append(nV);
   }
   //
@@ -227,14 +227,14 @@ void BOPAlgo_PaveFiller::IntersectVE
   // for all vertices having the same SD vertex.
   // It will also be used as a Fence map to avoid repeated
   // intersection of the same SD vertex with edge
-  NCollection_DataMap<BOPDS_Pair, BOPCol_ListOfInteger, BOPDS_PairMapHasher> aDMVSD;
+  NCollection_DataMap<BOPDS_Pair, TColStd_ListOfInteger, BOPDS_PairMapHasher> aDMVSD;
   //
   for (i = 1; i <= aNbVE; ++i) {
     const Handle(BOPDS_PaveBlock)& aPB = theVEPairs.FindKey(i);
     Standard_Integer nE = aPB->OriginalEdge();
     //
-    const BOPCol_ListOfInteger& aLV = theVEPairs(i);
-    BOPCol_ListIteratorOfListOfInteger aItLV(aLV);
+    const TColStd_ListOfInteger& aLV = theVEPairs(i);
+    TColStd_ListIteratorOfListOfInteger aItLV(aLV);
     for (; aItLV.More(); aItLV.Next()) {
       Standard_Integer nV = aItLV.Value();
       //
@@ -242,20 +242,20 @@ void BOPAlgo_PaveFiller::IntersectVE
       myDS->HasShapeSD(nV, nVSD);
       //
       BOPDS_Pair aPair(nVSD, nE);
-      BOPCol_ListOfInteger* pLI = aDMVSD.ChangeSeek(aPair);
+      TColStd_ListOfInteger* pLI = aDMVSD.ChangeSeek(aPair);
       if (pLI) {
         // Already added
         pLI->Append(nV);
         continue;
       }
       // New pair
-      pLI = aDMVSD.Bound(aPair, BOPCol_ListOfInteger());
+      pLI = aDMVSD.Bound(aPair, TColStd_ListOfInteger());
       pLI->Append(nV);
       //
       const TopoDS_Vertex& aV = TopoDS::Vertex(myDS->Shape(nVSD));
       const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(nE));
       //
-      BOPAlgo_VertexEdge& aVESolver = aVVE.Append1();
+      BOPAlgo_VertexEdge& aVESolver = aVVE.Appended();
       aVESolver.SetIndices(nVSD, nE);
       aVESolver.SetVertex(aV);
       aVESolver.SetEdge(aE);
@@ -271,10 +271,10 @@ void BOPAlgo_PaveFiller::IntersectVE
   //=============================================================
   //
   // Keep the modified edges for further update
-  BOPCol_MapOfInteger aMEdges;
+  TColStd_MapOfInteger aMEdges;
   //
   // Analyze intersections
-  aNbVE = aVVE.Extent();
+  aNbVE = aVVE.Length();
   for (i = 0; i < aNbVE; ++i) {
     const BOPAlgo_VertexEdge& aVESolver = aVVE(i);
     if (aVESolver.Flag() != 0) {
@@ -305,12 +305,12 @@ void BOPAlgo_PaveFiller::IntersectVE
     if (theAddInterfs) {
       // Add interferences into DS
       BOPDS_Pair aPair(nV, nE);
-      const BOPCol_ListOfInteger& aLI = aDMVSD.Find(aPair);
-      BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+      const TColStd_ListOfInteger& aLI = aDMVSD.Find(aPair);
+      TColStd_ListIteratorOfListOfInteger aItLI(aLI);
       for (; aItLI.More(); aItLI.Next()) {
         const Standard_Integer nVOld = aItLI.Value();
         // 3. Create interference V/E
-        BOPDS_InterfVE& aVE = aVEs.Append1();
+        BOPDS_InterfVE& aVE = aVEs.Appended();
         aVE.SetIndices(nVOld, nE);
         aVE.SetParameter(aT);
         // 2. Add a pair in the whole table of interferences
@@ -336,7 +336,7 @@ void BOPAlgo_PaveFiller::IntersectVE
 //=======================================================================
 static
   void MakeNewCommonBlock(const BOPDS_ListOfPaveBlock& theLPB,
-                          const BOPCol_ListOfInteger& theLFaces,
+                          const TColStd_ListOfInteger& theLFaces,
                           BOPDS_PDS& theDS)
 {
   // Make Common Block from the pave blocks in the list
@@ -354,7 +354,7 @@ static
 // function: SplitPaveBlocks
 // purpose: 
 //=======================================================================
-void BOPAlgo_PaveFiller::SplitPaveBlocks(const BOPCol_MapOfInteger& theMEdges,
+void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
                                          const Standard_Boolean theAddInterfs)
 {
   // Fence map to avoid unification of the same vertices twice
@@ -364,7 +364,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const BOPCol_MapOfInteger& theMEdges,
                              BOPDS_ListOfPaveBlock,
                              TColStd_MapTransientHasher> aMCBNewPB;
   //
-  BOPCol_MapIteratorOfMapOfInteger aItM(theMEdges);
+  TColStd_MapIteratorOfMapOfInteger aItM(theMEdges);
   for (; aItM.More(); aItM.Next()) {
     Standard_Integer nE = aItM.Value();
     BOPDS_ListOfPaveBlock& aLPB = myDS->ChangePaveBlocks(nE);
@@ -400,7 +400,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const BOPCol_MapOfInteger& theMEdges,
             BOPDS_Pair aPair;
             aPair.SetIndices(nV1, nV2);
             if (aMPairs.Add(aPair)) {
-              BOPCol_ListOfInteger aLV;
+              TColStd_ListOfInteger aLV;
               aLV.Append(nV1);
               aLV.Append(nV2);
               MakeSDVertices(aLV, theAddInterfs);