]> OCCT Git - occt-copy.git/commitdiff
0026567: Exception in Boolean intersection command
authorpkv <pkv@opencascade.com>
Tue, 18 Aug 2015 07:06:11 +0000 (10:06 +0300)
committeremv <emv@opencascade.com>
Thu, 27 Aug 2015 10:03:35 +0000 (13:03 +0300)
Correcting the usage of NCollection_IncAllocator

24 files changed:
src/BOPAlgo/BOPAlgo_BOP.cxx
src/BOPAlgo/BOPAlgo_Builder.cxx
src/BOPAlgo/BOPAlgo_BuilderSolid.cxx
src/BOPAlgo/BOPAlgo_Builder_2.cxx
src/BOPAlgo/BOPAlgo_Builder_3.cxx
src/BOPAlgo/BOPAlgo_MakerVolume.cxx
src/BOPAlgo/BOPAlgo_PaveFiller.cdl
src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_10.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/BOPAlgo/BOPAlgo_PaveFiller_7.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx
src/BOPAlgo/BOPAlgo_Section.cxx
src/BOPDS/BOPDS_DS.cxx
src/BOPDS/BOPDS_Iterator.cxx
src/BOPDS/BOPDS_IteratorSI.cxx
src/BOPDS/BOPDS_SubIterator.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/BOPTest/BOPTest_Objects.cxx
src/BOPTest/BOPTest_PartitionCommands.cxx
src/IntTools/IntTools_Context.cxx

index ec88eab219b22d95172a93826047fa07125129c2..c24adf3ea37bba3238b92191a8356cbb3138f70a 100644 (file)
@@ -38,7 +38,6 @@
 #include <BOPAlgo_BuilderSolid.hxx>
 
 #include <BRep_Tool.hxx>
-#include <NCollection_IncAllocator.hxx>
 //
 #include <BOPTools_Set.hxx>
 #include <BOPTools_SetMapHasher.hxx>
@@ -364,7 +363,8 @@ void BOPAlgo_BOP::Perform()
     }
   }
   //
-  aAllocator=new NCollection_IncAllocator;
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPCol_ListOfShape aLS(aAllocator);
   //
   aItLS.Initialize(myArguments);
index 8e7bb8f66c1f0599ef904444616c1bf2eefce931..089f47ccd4200ebff727132f2aaf1768244ccaee 100644 (file)
@@ -20,8 +20,6 @@
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_Failure.hxx>
 
-#include <NCollection_IncAllocator.hxx>
-
 #include <TopoDS_Compound.hxx>
 #include <BRep_Builder.hxx>
 
@@ -267,7 +265,8 @@ void BOPAlgo_Builder::Perform()
     }
   }
   //
-  Handle(NCollection_BaseAllocator) aAllocator=new NCollection_IncAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPAlgo_PaveFiller* pPF=new BOPAlgo_PaveFiller(aAllocator);
   //
index c361954c153ce2fd5a670c222de9b3ab0f27da82..a6f4763baeeff6fa8ff495ea59e9a1f1dd5dd302 100644 (file)
@@ -20,7 +20,6 @@
 #include <NCollection_List.hxx>
 #include <NCollection_DataMap.hxx>
 #include <NCollection_UBTreeFiller.hxx>
-#include <NCollection_IncAllocator.hxx>
 //
 #include <gp_Pnt2d.hxx>
 #include <gp_Pln.hxx>
@@ -457,7 +456,8 @@ void BOPAlgo_BuilderSolid::PerformLoops()
   myErrorStatus=0;
   myLoops.Clear();
   //
-  aAlr=new NCollection_IncAllocator();
+  aAlr=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPAlgo_ShellSplitter aSSp(aAlr);
   //
   // 1. Shells Usual
index 7ba2e5c29b2cfe1d1b6728c84f8f1b1c703ed1c9..07c4dc1f5f36b5d3433aa147465578882021dfce 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <BOPAlgo_Builder.ixx>
 //
-#include <NCollection_IncAllocator.hxx>
-//
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Edge.hxx>
@@ -68,11 +66,11 @@ static
   void FillMap(const TopoDS_Shape& aS1,
                const TopoDS_Shape& aS2,
                BOPCol_IndexedDataMapOfShapeListOfShape& aDMSLS,
-               Handle(NCollection_IncAllocator)& aAllocator);
+               Handle(NCollection_BaseAllocator)& aAllocator);
 static
   void MakeBlocksCnx(const BOPCol_IndexedDataMapOfShapeListOfShape& aMILI,
                      BOPCol_DataMapOfIntegerListOfShape& aMBlocks,
-                     Handle(NCollection_IncAllocator)& aAllocator);
+                     Handle(NCollection_BaseAllocator)& aAllocator);
 //
 typedef BOPCol_NCVector<TopoDS_Shape> BOPAlgo_VectorOfShape;
 //
@@ -270,7 +268,8 @@ void BOPAlgo_Builder::BuildSplitFaces()
   myErrorStatus=0;
   //
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~scope f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_ListOfShape aLE(aAllocator);
   BOPCol_MapOfShape aMDE(100, aAllocator);
@@ -444,7 +443,6 @@ void BOPAlgo_Builder::BuildSplitFaces()
     mySplits.Bind(aF, aLFIm); 
   }// for (k=0; k<aNbBF; ++k) {
   //
-  aAllocator.Nullify();
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~scope t
 }
 //=======================================================================
@@ -455,7 +453,7 @@ void BOPAlgo_Builder::FillSameDomainFaces()
 {
   Standard_Boolean bFlag;
   Standard_Integer i, j, k, aNbFFs, aNbCurves, aNbPoints, nF1, nF2, aNbS;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_ListIteratorOfListOfShape aItF;
   BOPCol_MapOfShape aMFence;
   BOPAlgo_IndexedDataMapOfSetInteger aIDMSS;
@@ -604,7 +602,8 @@ void BOPAlgo_Builder::FillSameDomainFaces()
   //================================================================
   BOPAlgo_BuilderSDFaceCnt::Perform(myRunParallel, aVPSB, myContext);
   //================================================================
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPCol_IndexedDataMapOfShapeListOfShape aDMSLS(100, aAllocator);
   BOPCol_DataMapOfIntegerListOfShape aMBlocks(100, aAllocator);
   //
@@ -648,7 +647,6 @@ void BOPAlgo_Builder::FillSameDomainFaces()
   }
   aMBlocks.Clear();
   aDMSLS.Clear();
-  aAllocator.Nullify();
 }
 //=======================================================================
 // function: FillImagesFaces1
@@ -754,7 +752,7 @@ void BOPAlgo_Builder::FillImagesFaces1()
 //=======================================================================
 void MakeBlocksCnx(const BOPCol_IndexedDataMapOfShapeListOfShape& aMILI,
                    BOPCol_DataMapOfIntegerListOfShape& aMBlocks,
-                   Handle(NCollection_IncAllocator)& aAllocator)
+                   Handle(NCollection_BaseAllocator)& aAllocator)
 {
   Standard_Integer aNbV, aNbVS, aNbVP, aNbEC, k, i, j;
   BOPCol_ListIteratorOfListOfShape aItLI;
@@ -836,7 +834,7 @@ void MakeBlocksCnx(const BOPCol_IndexedDataMapOfShapeListOfShape& aMILI,
 void FillMap(const TopoDS_Shape& aS1,
              const TopoDS_Shape& aS2,
              BOPCol_IndexedDataMapOfShapeListOfShape& aDMSLS,
-             Handle(NCollection_IncAllocator)& aAllocator)
+             Handle(NCollection_BaseAllocator)& aAllocator)
 {
   if (aDMSLS.Contains(aS1)) {
     BOPCol_ListOfShape& aLS=aDMSLS.ChangeFromKey(aS1);
index 6bd36a448c9b6a80baaa589ee9f816deec976f66..92bf8c957bc57abaef05d88533ae16f2c818dd27 100644 (file)
@@ -19,7 +19,6 @@
 //
 #include <Precision.hxx>
 //
-#include <NCollection_IncAllocator.hxx>
 #include <NCollection_UBTreeFiller.hxx>
 //
 #include <Bnd_Box.hxx>
@@ -253,7 +252,7 @@ class BOPAlgo_FillIn3DParts : public BOPAlgo_Algo  {
 //=======================================================================
 void BOPAlgo_FillIn3DParts::Perform() 
 {
-  Handle(NCollection_IncAllocator) aAlr1;
+  Handle(NCollection_BaseAllocator) aAlr1;
   BOPAlgo_Algo::UserBreak();
   //  
   Standard_Integer aNbFP, k, nFP, iIsIN;
@@ -262,7 +261,8 @@ void BOPAlgo_FillIn3DParts::Perform()
   BOPCol_ListIteratorOfListOfShape aItLS;
   BOPCol_BoxBndTreeSelector aSelector; 
   //
-  aAlr1=new NCollection_IncAllocator();
+  aAlr1=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_ListOfShape aLFP(aAlr1);
   BOPCol_ListOfShape aLCBF(aAlr1);
@@ -518,10 +518,11 @@ void BOPAlgo_Builder::FillImagesSolids()
   if (!bHasSolids) {
     return;
   }
+  // 
+  Handle(NCollection_BaseAllocator) aAlr;
   //
-  Handle(NCollection_IncAllocator) aAlr;
+  aAlr=NCollection_BaseAllocator::CommonBaseAllocator();
   //
-  aAlr=new NCollection_IncAllocator();
   BOPCol_DataMapOfShapeListOfShape theInParts(100, aAlr);
   BOPCol_DataMapOfShapeShape theDraftSolids(100, aAlr);
   //
@@ -543,7 +544,7 @@ void BOPAlgo_Builder::FillIn3DParts
 {
   Standard_Boolean bHasImage;
   Standard_Integer i, k, aNbS, aNbLIF, aNbFIN, aNbVSB, aNbVFIP;
-  Handle(NCollection_IncAllocator) aAlr0;
+  Handle(NCollection_BaseAllocator) aAlr0;
   TopoDS_Solid aSD;
   TopoDS_Iterator aIt;
   BRep_Builder aBB; 
@@ -551,7 +552,8 @@ void BOPAlgo_Builder::FillIn3DParts
   BOPCol_ListIteratorOfListOfInteger aItLI, aItLI1;
   BOPCol_ListIteratorOfListOfShape aItLS;
   //
-  aAlr0=new NCollection_IncAllocator();
+  aAlr0=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_MapOfShape aMFence(100, aAlr0);
   BOPAlgo_VectorOfShapeBox aVSB(256, aAlr0);
@@ -803,8 +805,8 @@ void BOPAlgo_Builder::BuildSplitSolids
   BOPCol_ListIteratorOfListOfShape aIt;
   BOPCol_DataMapIteratorOfDataMapOfShapeShape aIt1;
   //
-  Handle(NCollection_IncAllocator) aAlr0;
-  aAlr0=new NCollection_IncAllocator();
+  Handle(NCollection_BaseAllocator) aAlr0;
+  aAlr0=NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_ListOfShape aSFS(aAlr0), aLSEmpty(aAlr0);
   BOPCol_MapOfShape aMFence(100, aAlr0);
@@ -870,10 +872,7 @@ void BOPAlgo_Builder::BuildSplitSolids
       aSFS.Append(aF);
     }
     //
-    // 1.3 Build new solids   
-    Handle(NCollection_IncAllocator) aAlr1;
-    aAlr1=new NCollection_IncAllocator();  
-    //
+    // 1.3 Build new solids  
     BOPAlgo_BuilderSolid& aBS=aVBS.Append1();
     aBS.SetSolid(aSolid);
     aBS.SetShapes(aSFS);
@@ -936,9 +935,9 @@ void BOPAlgo_Builder::FillInternalShapes()
   BOPCol_MapIteratorOfMapOfShape aItM;
   BOPCol_ListIteratorOfListOfShape aIt, aIt1;
   //
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   //-----------------------------------------------------scope f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_IndexedDataMapOfShapeListOfShape aMSx(100, aAllocator);
   BOPCol_IndexedMapOfShape aMx(100, aAllocator);
index 3e4f1a81893d82418ae592120ed833c84fac7393..04b910c5d89c43c25107939609ceaf78863eed06 100644 (file)
@@ -14,8 +14,6 @@
 
 #include <BOPAlgo_MakerVolume.ixx>
 
-#include <NCollection_IncAllocator.hxx>
-
 #include <Bnd_Box.hxx>
 
 #include <TopoDS_Solid.hxx>
@@ -81,7 +79,8 @@ void BOPAlgo_MakerVolume::Perform()
     }
   }
   //
-  Handle(NCollection_BaseAllocator) aAllocator = new NCollection_IncAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator = 
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPAlgo_PaveFiller* pPF = new BOPAlgo_PaveFiller(aAllocator);
   //
   if (!myIntersect) {
index 237f49d1fe1e4d828a21ba196c82027597596bf9..7dd03af03e4415c71d09f1b86a40c789cc9f132f 100644 (file)
@@ -148,6 +148,10 @@ is
     PerformZZ(me:out) 
       is virtual protected;  
       --Purpose: Computes Solid/Solid interferences  
+  
+    PerformSZ(me:out; 
+        aTS:ShapeEnum from TopAbs) 
+      is virtual protected;
  
     TreatVerticesEE(me:out) 
       is protected; 
index e918fc915acf827c6e7f7eb2eb257b8de3c536e2..06f5323ba18b9a5f28d74e65292475f101f7425b 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <BOPAlgo_PaveFiller.ixx>
 
-#include <NCollection_IncAllocator.hxx>
 #include <NCollection_BaseAllocator.hxx>
 
 #include <Bnd_Box.hxx>
 // function: PerformVV
 // purpose: 
 //=======================================================================
-  void BOPAlgo_PaveFiller::PerformVV() 
+void BOPAlgo_PaveFiller::PerformVV() 
 {
   Standard_Boolean bWithSubShape;
   Standard_Integer n1, n2, iFlag, nX, n, aSize, i, j, k, aNbBlocks;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItMILI;
   BOPCol_ListIteratorOfListOfInteger aItLI, aItLI2;
   TopoDS_Vertex aVn;
@@ -65,7 +64,8 @@
   aVVs.SetIncrement(aSize);
   //
   //-----------------------------------------------------scope f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPCol_IndexedDataMapOfIntegerListOfInteger aMILI(100, aAllocator);
   BOPCol_DataMapOfIntegerListOfInteger aMBlocks(100, aAllocator);
   BOPCol_ListOfShape aLV(aAllocator);
   aLV.Clear();
   aMBlocks.Clear();
   aMILI.Clear();
-  aAllocator.Nullify();
 }
index de5af544af3aa0845a8075cdffb876e06903a315..308b40c659b858e940fcdbbe311b6740c316d180 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <BOPAlgo_PaveFiller.ixx>
 
+#include <BOPAlgo_PaveFiller.hxx>
+#include <BOPAlgo_SectionAttribute.hxx>
+#include <BOPDS_Curve.hxx>
+#include <BOPDS_DS.hxx>
+#include <BOPDS_Interf.hxx>
+#include <BOPDS_IteratorSI.hxx>
+#include <BOPDS_PaveBlock.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
 #include <gp_Pnt.hxx>
-
+#include <IntTools_Context.hxx>
 #include <TopAbs_State.hxx>
-
-#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Face.hxx>
 #include <TopoDS_Solid.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
+#include <TopoDS_Vertex.hxx>
 
-#include <IntTools_Context.hxx>
+#include <BOPCol_NCVector.hxx>
+#include <BOPCol_Parallel.hxx>
 
-#include <BOPDS_DS.hxx>
-#include <BOPDS_IteratorSI.hxx>
-#include <BOPDS_Interf.hxx>
+/////////////////////////////////////////////////////////////////////////
+//=======================================================================
+//class    : BOPAlgo_VertexSolid
+//purpose  : 
+//=======================================================================
+class BOPAlgo_VertexSolid  {
+ public:
+  DEFINE_STANDARD_ALLOC
+  
+  BOPAlgo_VertexSolid()
+    : myIV(-1), myIZ(-1), myState(TopAbs_UNKNOWN) {
+  };
+  //
+  virtual ~BOPAlgo_VertexSolid(){
+  };
+  //
+  void SetIndices(const Standard_Integer nV,
+                  const Standard_Integer nZ){
+    myIV=nV;
+    myIZ=nZ;
+  }
+  //
+  void Indices(Standard_Integer& nV,
+               Standard_Integer& nZ) const {
+    nV=myIV;
+    nZ=myIZ;
+  }
+  //
+  void SetVertex(const TopoDS_Vertex& aV) {
+    myV=aV;
+  }
+  //
+  const TopoDS_Vertex& Vertex()const {
+    return myV;
+  }
+  //
+  void SetSolid(const TopoDS_Solid& aZ) {
+    myZ=aZ;
+  }
+  //
+  const TopoDS_Solid& Solid()const {
+    return myZ;
+  }
+  //
+  void SetContext(const Handle(IntTools_Context)& aContext) {
+    myContext=aContext;
+  }
+  //
+  const Handle(IntTools_Context)& Context()const {
+    return myContext;
+  }
+  //
+  TopAbs_State State() const{
+    return myState;
+  };
+  //
+  void Perform() {
+    Standard_Real aTol;
+    gp_Pnt aPV;
+    //
+    BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(myZ);
+    //
+    aPV=BRep_Tool::Pnt(myV);
+    aTol=BRep_Tool::Tolerance(myV);
+    //
+    aSC.Perform(aPV, aTol);
+    //
+    myState=aSC.State();
+  };
+  //
+ protected:
+  Standard_Integer myIV;
+  Standard_Integer myIZ;
+  TopAbs_State myState;
+  TopoDS_Vertex myV;
+  TopoDS_Solid myZ;
+  Handle(IntTools_Context) myContext;
+};
+//=======================================================================
+typedef BOPCol_NCVector
+  <BOPAlgo_VertexSolid> BOPAlgo_VectorOfVertexSolid; 
+//
+typedef BOPCol_ContextFunctor 
+  <BOPAlgo_VertexSolid,
+  BOPAlgo_VectorOfVertexSolid,
+  Handle(IntTools_Context), 
+  IntTools_Context> BOPAlgo_VertexSolidFunctor;
+//
+typedef BOPCol_ContextCnt 
+  <BOPAlgo_VertexSolidFunctor,
+  BOPAlgo_VectorOfVertexSolid,
+  Handle(IntTools_Context)> BOPAlgo_VertexSolidCnt;
+/////////////////////////////////////////////////////////////////////////
+//=======================================================================
+//class    : BOPAlgo_ShapeSolid
+//purpose  : 
+//=======================================================================
+class BOPAlgo_ShapeSolid  {
+ public:
+  DEFINE_STANDARD_ALLOC
+
+  BOPAlgo_ShapeSolid() : 
+    myIE(-1), 
+    myIZ(-1), 
+    myHasInterf(Standard_False), 
+    myDS(NULL) {
+  };
+  //
+  virtual ~BOPAlgo_ShapeSolid(){
+  };
+  //
+  void SetIndices(const Standard_Integer nE,
+                  const Standard_Integer nZ){
+    myIE=nE;
+    myIZ=nZ;
+  }
+  //
+  void Indices(Standard_Integer& nE,
+               Standard_Integer& nZ) const {
+    nE=myIE;
+    nZ=myIZ;
+  }
+  //
+  void SetDS(BOPDS_DS* pDS) {
+    myDS=pDS;
+  }
+  //
+  Standard_Boolean HasInterf() const{
+    return myHasInterf;
+  };
+  //
+  virtual void Perform() {
+    Standard_Boolean bHasInterf;
+    //
+    myHasInterf=Standard_False;
+    //
+    bHasInterf=myDS->HasInterfShapeSubShapes(myIE, myIZ);
+    if (!bHasInterf) {
+      myHasInterf=myDS->HasInterfShapeSubShapes(myIZ, myIE);
+    }
+  };
+  //
+ protected:
+  Standard_Integer myIE;
+  Standard_Integer myIZ;
+  Standard_Boolean myHasInterf;
+  BOPDS_DS* myDS;
+};
+//=======================================================================
+typedef BOPCol_NCVector
+  <BOPAlgo_ShapeSolid> BOPAlgo_VectorOfShapeSolid; 
+//
+typedef BOPCol_Functor 
+  <BOPAlgo_ShapeSolid,
+  BOPAlgo_VectorOfShapeSolid> BOPAlgo_ShapeSolidFunctor;
+//
+typedef BOPCol_Cnt 
+  <BOPAlgo_ShapeSolidFunctor,
+  BOPAlgo_VectorOfShapeSolid> BOPAlgo_ShapeSolidCnt;
+//
+/////////////////////////////////////////////////////////////////////////
+//=======================================================================
+//class    : BOPAlgo_SolidSolid
+//purpose  : 
+//=======================================================================
+class BOPAlgo_SolidSolid : public  BOPAlgo_ShapeSolid {
+ public:
+  DEFINE_STANDARD_ALLOC
+
+  BOPAlgo_SolidSolid() : 
+    BOPAlgo_ShapeSolid() {
+  };
+  //
+  virtual ~BOPAlgo_SolidSolid(){
+  };
+  //
+  virtual void Perform() {
+    Standard_Boolean bFlag;
+    //
+    bFlag=Standard_False;
+    myHasInterf=Standard_False;
+    //
+    myHasInterf=myDS->HasInterfShapeSubShapes(myIZ, myIE, bFlag);
+    if (!myHasInterf) {
+      myHasInterf=myDS->HasInterfShapeSubShapes(myIE, myIZ, bFlag);
+    }
+  };
+};
+//=======================================================================
+typedef BOPCol_NCVector
+  <BOPAlgo_SolidSolid> BOPAlgo_VectorOfSolidSolid; 
+//
+typedef BOPCol_Functor 
+  <BOPAlgo_SolidSolid,
+  BOPAlgo_VectorOfSolidSolid> BOPAlgo_SolidSolidFunctor;
+//
+typedef BOPCol_Cnt 
+  <BOPAlgo_SolidSolidFunctor,
+  BOPAlgo_VectorOfSolidSolid> BOPAlgo_SolidSolidCnt;
+//
+/////////////////////////////////////////////////////////////////////////
 
 //=======================================================================
 //function : PerformVZ
 void BOPAlgo_PaveFiller::PerformVZ()
 {
   Standard_Boolean bJustAdd;
-  Standard_Integer iSize, nV, nZ;
-  Standard_Real aTol;
-  gp_Pnt aPV;
+  Standard_Integer iSize, nV, nZ, k, aNbVVS;
   TopAbs_State aState;
   //
   myErrorStatus=0;
@@ -55,6 +258,8 @@ void BOPAlgo_PaveFiller::PerformVZ()
   BOPDS_VectorOfInterfVZ& aVZs=myDS->InterfVZ();
   aVZs.SetIncrement(iSize);
   //
+  BOPAlgo_VectorOfVertexSolid aVVS;
+  //
   for (; myIterator->More(); myIterator->Next()) {
     myIterator->Value(nV, nZ, bJustAdd);
     if(bJustAdd) {
@@ -67,15 +272,22 @@ void BOPAlgo_PaveFiller::PerformVZ()
     const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aSIV.Shape()); 
     const TopoDS_Solid& aZ=*((TopoDS_Solid*)&aSIZ.Shape()); 
     //
-    BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aZ);
-    //
-    aPV=BRep_Tool::Pnt(aV);
-    aTol=BRep_Tool::Tolerance(aV);
-    //
-    aSC.Perform(aPV, aTol);
-    //
-    aState=aSC.State();
+    BOPAlgo_VertexSolid& aVertexSolid=aVVS.Append1();
+    aVertexSolid.SetIndices(nV, nZ);
+    aVertexSolid.SetVertex(aV);
+    aVertexSolid.SetSolid(aZ);
+  }
+  //
+  aNbVVS=aVVS.Extent();
+  //=============================================================
+  BOPAlgo_VertexSolidCnt::Perform(myRunParallel, aVVS, myContext);
+  //=============================================================
+  for (k=0; k < aNbVVS; ++k) {
+    const BOPAlgo_VertexSolid& aVertexSolid=aVVS(k);
+    aState=aVertexSolid.State();
     if (aState==TopAbs_IN)  {
+      aVertexSolid.Indices(nV, nZ);
+      //
       BOPDS_InterfVZ& aVZ=aVZs.Append1();
       aVZ.SetIndices(nV, nZ);
       //
@@ -88,124 +300,130 @@ void BOPAlgo_PaveFiller::PerformVZ()
 //purpose  : 
 //=======================================================================
 void BOPAlgo_PaveFiller::PerformEZ()
-{
-  Standard_Boolean bJustAdd, bHasInterf;
-  Standard_Integer iSize, nE, nZ;
-  //
-  myErrorStatus=0;
-  //
-  myIterator->Initialize(TopAbs_EDGE, TopAbs_SOLID);
-  iSize=myIterator->ExpectedLength();
-  if (!iSize) {
-    return; 
-  }
-  //
-  BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ();
-  aEZs.SetIncrement(iSize);
-  //
-  for (; myIterator->More(); myIterator->Next()) {
-    myIterator->Value(nE, nZ, bJustAdd);
-    if(bJustAdd) {
-      continue;
-    }
-    //
-    bHasInterf=myDS->HasInterfShapeSubShapes(nE, nZ);
-    if (bHasInterf) {
-      continue;
-    }
-    //
-    bHasInterf=myDS->HasInterfShapeSubShapes(nZ, nE);
-    if (!bHasInterf) {
-      continue;
-    }
-    //
-    BOPDS_InterfEZ& aEZ=aEZs.Append1();
-    aEZ.SetIndices(nE, nZ);
-    //
-    myDS->AddInterf(nE, nZ);
-  }
+{ 
+  PerformSZ(TopAbs_EDGE);
 }
 //=======================================================================
 //function : PerformFZ
 //purpose  : 
 //=======================================================================
 void BOPAlgo_PaveFiller::PerformFZ()
+{ 
+  PerformSZ(TopAbs_FACE);
+}
+//=======================================================================
+//function : PerformZZ
+//purpose  : 
+//=======================================================================
+void BOPAlgo_PaveFiller::PerformZZ()
 {
   Standard_Boolean bJustAdd, bHasInterf;
-  Standard_Integer iSize, nF, nZ;
+  Standard_Integer iSize, nZ1, nZ, k, aNbSolidSolid;
   //
   myErrorStatus=0;
   //
-  myIterator->Initialize(TopAbs_FACE, TopAbs_SOLID);
+  myIterator->Initialize(TopAbs_SOLID, TopAbs_SOLID);
   iSize=myIterator->ExpectedLength();
   if (!iSize) {
     return; 
   }
   //
-  BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ();
-  aFZs.SetIncrement(iSize);
+  BOPAlgo_VectorOfSolidSolid aVSolidSolid;
   //
   for (; myIterator->More(); myIterator->Next()) {
-    myIterator->Value(nF, nZ, bJustAdd);
+    myIterator->Value(nZ1, nZ, bJustAdd);
     if(bJustAdd) {
       continue;
     }
     //
-    bHasInterf=myDS->HasInterfShapeSubShapes(nF, nZ);
+    BOPAlgo_SolidSolid& aSolidSolid=aVSolidSolid.Append1();
+    aSolidSolid.SetIndices(nZ1, nZ);
+    aSolidSolid.SetDS(myDS);
+  }
+  //
+  aNbSolidSolid=aVSolidSolid.Extent();
+  //======================================================
+  BOPAlgo_SolidSolidCnt::Perform(myRunParallel, aVSolidSolid);
+  //======================================================
+  //
+  BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ();
+  //
+  aZZs.SetIncrement(iSize);
+  //
+  for (k=0; k < aNbSolidSolid; ++k) {
+    const BOPAlgo_SolidSolid& aSolidSolid=aVSolidSolid(k);
+    bHasInterf=aSolidSolid.HasInterf();
     if (bHasInterf) {
-      continue;
-    }
-    //
-    bHasInterf=myDS->HasInterfShapeSubShapes(nZ, nF);
-    if (!bHasInterf) {
-      continue;
+      aSolidSolid.Indices(nZ1, nZ);
+      //
+      BOPDS_InterfZZ& aZZ=aZZs.Append1();
+      aZZ.SetIndices(nZ1, nZ);
+      //
+      myDS->AddInterf(nZ1, nZ);
     }
-    //
-    BOPDS_InterfFZ& aFZ=aFZs.Append1();
-    aFZ.SetIndices(nF, nZ);
-    //
-    myDS->AddInterf(nF, nZ);
   }
 }
 //=======================================================================
-//function : PerformZZ
+//function : PerformSZ
 //purpose  : 
 //=======================================================================
-void BOPAlgo_PaveFiller::PerformZZ()
+void BOPAlgo_PaveFiller::PerformSZ(const TopAbs_ShapeEnum aTS)
 {
-  Standard_Boolean bJustAdd, bHasInterf, bFlag;
-  Standard_Integer iSize, nZ1, nZ;
+  Standard_Boolean bJustAdd, bHasInterf;
+  Standard_Integer iSize, nS, nZ, k, aNbShapeSolid;
   //
   myErrorStatus=0;
   //
-  myIterator->Initialize(TopAbs_SOLID, TopAbs_SOLID);
+  myIterator->Initialize(aTS, TopAbs_SOLID);
   iSize=myIterator->ExpectedLength();
   if (!iSize) {
     return; 
   }
   //
-  BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ();
-  aZZs.SetIncrement(iSize);
-  //
-  bFlag=Standard_False;
+  BOPAlgo_VectorOfShapeSolid aVShapeSolid;
   //
   for (; myIterator->More(); myIterator->Next()) {
-    myIterator->Value(nZ1, nZ, bJustAdd);
+    myIterator->Value(nS, nZ, bJustAdd);
     if(bJustAdd) {
       continue;
     }
     //
-    bHasInterf=myDS->HasInterfShapeSubShapes(nZ, nZ1, bFlag);
-    if (!bHasInterf) {
-      bHasInterf=myDS->HasInterfShapeSubShapes(nZ1, nZ, bFlag);
-    }
-    if (!bHasInterf) {
-      continue; 
+    BOPAlgo_ShapeSolid& aShapeSolid=aVShapeSolid.Append1();
+    aShapeSolid.SetIndices(nS, nZ);
+    aShapeSolid.SetDS(myDS);
+  }
+  //
+  aNbShapeSolid=aVShapeSolid.Extent();
+  //======================================================
+  BOPAlgo_ShapeSolidCnt::Perform(myRunParallel, aVShapeSolid);
+  //======================================================
+  //
+  BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ();
+  BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ();
+  //
+  if (aTS==TopAbs_EDGE) {
+    aEZs.SetIncrement(iSize);
+  }
+  else {//if (aTS==TopAbs_FACE)
+    aFZs.SetIncrement(iSize);
+  }
+  //
+  for (k=0; k < aNbShapeSolid; ++k) {
+    const BOPAlgo_ShapeSolid& aShapeSolid=aVShapeSolid(k);
+    bHasInterf=aShapeSolid.HasInterf();
+    if (bHasInterf) {
+      aShapeSolid.Indices(nS, nZ);
+      //
+      if (aTS==TopAbs_EDGE) {
+        BOPDS_InterfEZ& aEZ=aEZs.Append1();
+        aEZ.SetIndices(nS, nZ);
+      }
+      else  {//if (aTS==TopAbs_FACE)
+        BOPDS_InterfFZ& aFZ=aFZs.Append1();
+        aFZ.SetIndices(nS, nZ);
+      }
+      //
+      myDS->AddInterf(nS, nZ);
     }
-    //
-    BOPDS_InterfZZ& aZZ=aZZs.Append1();
-    aZZ.SetIndices(nZ1, nZ);
-    //
-    myDS->AddInterf(nZ1, nZ);
   }
 }
index dffce44d40861d1913c01d5ad82091acf9e63503..04f17d509bc8902b03ac9916ac6f4b20e7c9fbf2 100644 (file)
@@ -18,7 +18,7 @@
 #include <BOPAlgo_PaveFiller.ixx>
 
 #include <Precision.hxx>
-#include <NCollection_IncAllocator.hxx>
+
 #include <NCollection_UBTreeFiller.hxx>
 
 #include <Bnd_Box.hxx>
@@ -288,11 +288,12 @@ void BOPAlgo_PaveFiller::PerformEE()
   Standard_Real aTS11, aTS12, aTS21, aTS22, aT11, aT12, aT21, aT22;
   TopAbs_ShapeEnum aType;
   BOPDS_ListIteratorOfListOfPaveBlock aIt1, aIt2;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPDS_MapOfPaveBlock aMPBToUpdate;
   BOPAlgo_VectorOfEdgeEdge aVEdgeEdge;
   BOPDS_MapIteratorOfMapOfPaveBlock aItPB; 
   //
+  aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
   //-----------------------------------------------------scope f
   BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock aMPBLPB(100, aAllocator);
   BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks aMVCPB(100, aAllocator);
index 1bd5fc03195859f4af808a7ea5a38ca3fc262213..65d6f55f294650f4997933f1140bf2f9319a75bc 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <BOPAlgo_PaveFiller.ixx>
 //
-#include <NCollection_IncAllocator.hxx>
-//
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS_Face.hxx>
 #include <BRep_Tool.hxx>
@@ -249,9 +247,10 @@ void BOPAlgo_PaveFiller::TreatVerticesEE()
   Standard_Integer i, aNbS,aNbEEs, nF, nV, iFlag;
   Standard_Real aT1, aT2;
   BOPCol_ListIteratorOfListOfInteger aItLI;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   //
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPCol_ListOfInteger aLIV(aAllocator), aLIF(aAllocator);
   BOPCol_MapOfInteger aMI(100, aAllocator);
   BOPDS_MapOfPaveBlock aMPBF(100, aAllocator);
@@ -322,6 +321,4 @@ void BOPAlgo_PaveFiller::TreatVerticesEE()
       }
     }
   }
-  //
-  aAllocator.Nullify();
 }
index 9a1f5b66fe034d51c26b92357531ceb00a8513ff..18bf7ba3b4f3685af72e1d43329b20944c0a723e 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <BOPAlgo_PaveFiller.ixx>
 
-#include <NCollection_IncAllocator.hxx>
-//
 #include <GeomAPI_ProjectPointOnSurf.hxx>
 //
 #include <Bnd_Box.hxx>
@@ -152,15 +150,15 @@ void BOPAlgo_PaveFiller::PerformEF()
   Standard_Integer nE, nF, aDiscretize, i, aNbCPrts, iX, nV[2];
   Standard_Integer aNbEdgeFace, k;
   Standard_Real aTolE, aTolF, aTS1, aTS2, aT1, aT2, aDeflection;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   TopAbs_ShapeEnum aType;
   BOPDS_ListIteratorOfListOfPaveBlock aIt;
   BOPAlgo_VectorOfEdgeFace aVEdgeFace; 
   BRep_Builder aBB;
   //-----------------------------------------------------scope f
   //
-  ////aAllocator=new NCollection_IncAllocator();
-  
+  aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
+  //
   BOPCol_MapOfInteger aMIEFC(100, aAllocator);
   BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks aMVCPB(100, aAllocator);
   BOPDS_IndexedDataMapOfPaveBlockListOfInteger aMPBLI(100, aAllocator);
index 850f5828b2a8541afd97a8d8a507edd47938ea7e..0fbd23127f6b09bde125f40117b1764252a06e21 100644 (file)
@@ -18,7 +18,6 @@
 #include <BOPAlgo_PaveFiller.ixx>
 //
 #include <Precision.hxx>
-#include <NCollection_IncAllocator.hxx>
 #include <Bnd_Box.hxx>
 
 #include <Geom_Curve.hxx>
@@ -366,13 +365,14 @@ void BOPAlgo_PaveFiller::MakeBlocks()
   Standard_Integer i, nF1, nF2, aNbC, aNbP, j;
   Standard_Integer nV1, nV2;
   Standard_Real aTolR3D, aT1, aT2, aTol;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TopoDS_Edge aES;
   Handle(BOPDS_PaveBlock) aPBOut;
   //
   //-----------------------------------------------------scope f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_ListOfInteger aLSE(aAllocator), aLBV(aAllocator);
   BOPCol_MapOfInteger aMVOnIn(100, aAllocator), aMF(100, aAllocator),
@@ -610,7 +610,6 @@ void BOPAlgo_PaveFiller::MakeBlocks()
   aDMExEdges.Clear();
   aMI.Clear();
   aDMI.Clear();
-  aAllocator.Nullify();
 }
 
 //=======================================================================
index 445f7ec23374de929174e379d17a860ac6368fd0..07a16ee7ee5f5c73d4903d5725a61a696f178685 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <BOPAlgo_PaveFiller.ixx>
 
-#include <NCollection_IncAllocator.hxx>
-
 #include <Geom_RectangularTrimmedSurface.hxx>
 #include <Geom_Plane.hxx>
 #include <Geom_Surface.hxx>
index 8d784a6e4f6b2181fbd8d3b4230e6ff0d4c9ddb9..b6ab92665619a750ac3e33747f38e2d4e0b337cf 100644 (file)
@@ -19,8 +19,6 @@
 
 #include <Precision.hxx>
 
-#include <NCollection_IncAllocator.hxx>
-
 #include <gp_Pnt2d.hxx>
 #include <gp_Lin2d.hxx>
 #include <ElCLib.hxx>
@@ -62,10 +60,10 @@ static
 //function : ProcessDE
 //purpose  : 
 //=======================================================================
-  void BOPAlgo_PaveFiller::ProcessDE()
+void BOPAlgo_PaveFiller::ProcessDE()
 {
   Standard_Integer nF, aNb, nE, nV, nVSD, aNbPB;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   Handle(BOPDS_PaveBlock) aPBD;
   BOPCol_ListIteratorOfListOfInteger aItLI;
   //
@@ -74,7 +72,8 @@ static
   // 1. Find degnerated edges
   //-----------------------------------------------------scope f
   //
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPDS_ListOfPaveBlock aLPBOut(aAllocator);
   //
   aNb=myDS->NbSourceShapes();
index f7a1f597f3097ed56dbda68660abef87b62e504a..06a4ccd9170332711b7bab372de9e688474ec379 100644 (file)
@@ -14,8 +14,6 @@
 
 #include <BOPAlgo_Section.ixx>
 
-#include <NCollection_IncAllocator.hxx>
-
 #include <TopAbs_ShapeEnum.hxx>
 
 #include <TopoDS_Compound.hxx>
index f4e133a7cc5314a09d8e91fe82be0060153778bf..c15d78e13b9ece23b66e18fdced902e93284591b 100644 (file)
@@ -16,7 +16,6 @@
 //
 #include <Standard_Assert.hxx>
 //
-#include <NCollection_IncAllocator.hxx>
 #include <NCollection_BaseAllocator.hxx>
 
 #include <gp_Pnt.hxx>
@@ -354,7 +353,7 @@ void BOPDS_DS::Init()
   BOPCol_ListIteratorOfListOfInteger aIt1, aIt2, aIt3;
   BOPCol_ListIteratorOfListOfShape aIt;
   BOPDS_IndexRange aR;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   //
   // 1 Append Source Shapes
   aNb=myArguments.Extent();
@@ -382,7 +381,8 @@ void BOPDS_DS::Init()
   //
   myLines.SetIncrement(2*aNbS);
   //-----------------------------------------------------scope_1 f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_DataMapOfShapeInteger& aMSI=myMapShapeIndex;
   //
@@ -647,7 +647,6 @@ void BOPDS_DS::Init()
   }//for (j=0; j<myNbSourceShapes; ++j) {
   //
   aMI.Clear();
-  aAllocator.Nullify();
   //-----------------------------------------------------scope_1 t
   // 3 myPaveBlocksPool
   // 4. myFaceInfoPool
index 9029348157789c0c75f72310610feb77a089e58a..dde20505ca413a32f9ea6c328328ff5f7c75fb0f 100644 (file)
@@ -19,7 +19,6 @@
 //
 #include <Bnd_Box.hxx>
 //
-#include <NCollection_IncAllocator.hxx>
 #include <NCollection_UBTreeFiller.hxx>
 //
 #include <TopoDS_Shape.hxx>
@@ -270,11 +269,11 @@ void BOPDS_Iterator::Intersect()
   Standard_Integer aNb, i, aNbR, iTi, iTj;
   Standard_Integer i1, i2, aNbSD, iX, j, iR;
   TopAbs_ShapeEnum aTi, aTj;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_ListIteratorOfListOfInteger aIt;
   //
   //-----------------------------------------------------scope_1 f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPDS_MapOfPassKeyBoolean aMPKXB(100, aAllocator);
   BOPDS_PassKeyBoolean aPKXB; 
@@ -373,6 +372,5 @@ void BOPDS_Iterator::Intersect()
   //
   aMPKXB.Clear();
   aVTSR.Clear();
-  aAllocator.Nullify();
   //-----------------------------------------------------scope_1 t
 }
index c3ab3c1894c0b3f2c732504d95e54c704fd275b3..cab6c3e8eee9710c600e343bcb2c9e78be7478e0 100644 (file)
@@ -24,7 +24,6 @@
 #include <BRep_Tool.hxx>
 
 #include <NCollection_UBTreeFiller.hxx>
-#include <NCollection_IncAllocator.hxx>
 
 #include <BOPCol_BoxBndTree.hxx>
 #include <BOPDS_IndexRange.hxx>
@@ -91,12 +90,13 @@ void BOPDS_IteratorSI::Intersect()
   Standard_Integer aNbS, i, aNbB;
   Standard_Integer aNbSD, iX, j, iDS, jB;
   TopAbs_ShapeEnum aTi, aTj;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_ListIteratorOfListOfInteger aIt;
   BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD;
   //
   //-----------------------------------------------------scope_1 f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_DataMapOfShapeInteger aMSI(100, aAllocator);
   BOPCol_DataMapOfIntegerInteger aMII(100, aAllocator);
@@ -124,10 +124,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);
       }
     }
     //
@@ -206,6 +206,5 @@ void BOPDS_IteratorSI::Intersect()
   aMPKXB.Clear();
   aMSB.Clear();
   //
-  aAllocator.Nullify();
   //-----------------------------------------------------scope_1 t
 }
index 69aaa97c84d1a39613b3869aa9d64d42a9093101..7ff898894a0d2b11ac3166366e776ea1544cf782 100644 (file)
@@ -16,7 +16,6 @@
 //
 #include <Bnd_Box.hxx>
 //
-#include <NCollection_IncAllocator.hxx>
 #include <NCollection_UBTreeFiller.hxx>
 //
 #include <TopoDS.hxx>
 // purpose: 
 //=======================================================================
   void BOPDS_SubIterator::Value(Standard_Integer& theI1,
-                               Standard_Integer& theI2) const
+                                Standard_Integer& theI2) const
 {
   Standard_Integer iT1, iT2, n1, n2;
   //
   void BOPDS_SubIterator::Intersect()
 {
   Standard_Integer i, aNbB, aNbSD, j, iDS, jB;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_ListIteratorOfListOfInteger aIt, aIt1, aIt2;
   BOPDS_PassKeyBoolean aPKXB; 
   //
   //-----------------------------------------------------scope_1 f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_DataMapOfShapeInteger aMSI(100, aAllocator);
   BOPCol_DataMapOfIntegerInteger aMII(100, aAllocator);
       //
       aPKXB.SetIds(i, j);
       if (aMPKXB.Add(aPKXB)) {
-       myList.Append(aPKXB);
+        myList.Append(aPKXB);
       }// if (aMPKXB.Add(aPKXB)) {
     }// for (; aIt.More(); aIt.Next()) {
   }
   aMPKXB.Clear();
   aMSB.Clear();
   //
-  aAllocator.Nullify();
   //-----------------------------------------------------scope_1 t
 }
index 9a5600cdd463b4d3cfc60969d0a5d7bef6c98684..d679f98c88990bbc1efead4fc4cb0fdbd3b0afc6 100644 (file)
@@ -25,7 +25,6 @@
 #include <Draw.hxx>
 
 #include <NCollection_BaseAllocator.hxx>
-#include <NCollection_IncAllocator.hxx>
 
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Compound.hxx>
@@ -160,7 +159,8 @@ Standard_Integer bop(Draw_Interpretor& di,
     delete pPF;
     pPF=NULL;
   }
-  Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
+  Handle(NCollection_BaseAllocator)aAL=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   pPF=new BOPAlgo_PaveFiller(aAL);
   //
   pPF->SetArguments(aLC);
@@ -491,7 +491,8 @@ Standard_Integer bsmt (Draw_Interpretor& di,
   aTol=BOPTest_Objects::FuzzyValue();
   bRunParallel = BOPTest_Objects::RunParallel();
   //
-  Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
+  Handle(NCollection_BaseAllocator)aAL=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   //---------------------------------------------------------------
   BOPAlgo_PaveFiller aPF(aAL);
index 4aa124c50c3a3444b1fe148643765fd94fee5366..a30ba44307f68734a2649b42e8c3be83c9feeee0 100644 (file)
@@ -15,7 +15,6 @@
 #include <BOPTest_Objects.ixx>
 
 #include <NCollection_BaseAllocator.hxx>
-#include <NCollection_IncAllocator.hxx>
 
 static Handle(NCollection_BaseAllocator)& Allocator1();
 
@@ -38,8 +37,8 @@ class BOPTest_Session {
   void Init() {
     Handle(NCollection_BaseAllocator) pA1, pA2;
     //
-    pA1=new NCollection_IncAllocator;
-    pA2=new NCollection_IncAllocator;
+    pA1=NCollection_BaseAllocator::CommonBaseAllocator();
+    pA2=NCollection_BaseAllocator::CommonBaseAllocator();
     //
     myPaveFiller=new BOPAlgo_PaveFiller(pA1);
     myBuilderDefault=new BOPAlgo_Builder(pA2);
@@ -275,6 +274,6 @@ Standard_Real BOPTest_Objects::FuzzyValue()
 Handle(NCollection_BaseAllocator)& Allocator1() 
 {
   static Handle(NCollection_BaseAllocator) sAL1=
-    new NCollection_IncAllocator;
+    NCollection_BaseAllocator::CommonBaseAllocator();
   return sAL1;
 }
index 82bf7f7ccb43765caa37e5b7973fc85a9fdee396..6453d01b69af82b76d9aa1126aae92b7b939707d 100644 (file)
@@ -16,9 +16,6 @@
 
 #include <stdio.h>
 #include <string.h>
-
-#include <NCollection_IncAllocator.hxx>
-
 #include <DBRep.hxx>
 #include <Draw.hxx>
 #include <Draw_Color.hxx>
index 6c3ad6a99c9d9e2dbb8ba6fef899fdc652d39e6c..4f5ec08913bb7fa8d5aad1c68418afd2bf6c7ee3 100644 (file)
@@ -39,7 +39,7 @@
 #include <Extrema_LocateExtPC.hxx>
 
 #include <Geom2d_Curve.hxx>
-#include <NCollection_IncAllocator.hxx>
+
 #include <IntTools_SurfaceRangeLocalizeData.hxx>
 
 
@@ -49,7 +49,7 @@
 //=======================================================================
 IntTools_Context::IntTools_Context()
 :
-  myAllocator(new NCollection_IncAllocator()),
+  myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
   myFClass2dMap(100, myAllocator),
   myProjPSMap(100, myAllocator),
   myProjPCMap(100, myAllocator),