0024157: Parallelization of assembly part of BO
authorpkv <pkv@opencascade.com>
Thu, 26 Jun 2014 09:00:17 +0000 (13:00 +0400)
committerapn <apn@opencascade.com>
Thu, 26 Jun 2014 09:00:50 +0000 (13:00 +0400)
The branch CR24157_12 deals with the parallelization of building the solids in case of lot internal faces.
Test case for issue CR24157

src/BOPAlgo/BOPAlgo_BuilderSolid.cxx
src/BOPAlgo/BOPAlgo_Builder_3.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
tests/boolean/bfuse_complex/O6
tests/boolean/bfuse_complex/P1
tests/boolean/boptuc_complex/D5
tests/bugs/modalg_2/bug497_5
tests/bugs/modalg_4/bug62
tests/bugs/modalg_5/bug24157_10 [new file with mode: 0644]
tests/bugs/modalg_5/bug24558

index c087235..ce0ca26 100644 (file)
@@ -14,7 +14,7 @@
 //
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 //
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
-
+//
 #include <BOPAlgo_BuilderSolid.ixx>
 //
 #include <NCollection_List.hxx>
 #include <BOPAlgo_BuilderSolid.ixx>
 //
 #include <NCollection_List.hxx>
 #include <BOPCol_MapOfShape.hxx>
 #include <BOPCol_BoxBndTree.hxx>
 #include <BOPCol_ListOfInteger.hxx>
 #include <BOPCol_MapOfShape.hxx>
 #include <BOPCol_BoxBndTree.hxx>
 #include <BOPCol_ListOfInteger.hxx>
+#include <BOPCol_NCVector.hxx>
+#include <BOPCol_TBB.hxx>
 //
 #include <BOPTools.hxx>
 #include <BOPTools_CoupleOfShape.hxx>
 #include <BOPTools_AlgoTools.hxx>
 //
 #include <BOPTools.hxx>
 #include <BOPTools_CoupleOfShape.hxx>
 #include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_AlgoTools3D.hxx>
 //
 #include <IntTools_Context.hxx>
 //
 //
 #include <IntTools_Context.hxx>
 //
@@ -127,14 +130,143 @@ class BOPAlgo_BuilderSolid_ShapeBox {
   Bnd_Box myBox;
 };
 //
   Bnd_Box myBox;
 };
 //
-typedef NCollection_DataMap\
-  <Standard_Integer, BOPAlgo_BuilderSolid_ShapeBox, TColStd_MapIntegerHasher> \
-  BOPAlgo_DataMapOfIntegerBSSB; 
+typedef NCollection_DataMap
+  <Standard_Integer, 
+  BOPAlgo_BuilderSolid_ShapeBox, 
+  TColStd_MapIntegerHasher> BOPAlgo_DataMapOfIntegerBSSB; 
 //
 //
-typedef BOPAlgo_DataMapOfIntegerBSSB::Iterator \
+typedef BOPAlgo_DataMapOfIntegerBSSB::Iterator 
   BOPAlgo_DataMapIteratorOfDataMapOfIntegerBSSB; 
 //
 //=======================================================================
   BOPAlgo_DataMapIteratorOfDataMapOfIntegerBSSB; 
 //
 //=======================================================================
+//function : BOPAlgo_FacePnt
+//purpose  : 
+//=======================================================================
+class BOPAlgo_FacePnt {
+ public:
+  BOPAlgo_FacePnt() {
+  }
+  //
+  virtual ~BOPAlgo_FacePnt() {
+  }
+  //
+  void SetFace(const TopoDS_Face& aFace) {
+    myFace=aFace;
+  }
+  //
+  const TopoDS_Face& Face()const {
+    return myFace;
+  }
+  // 
+  void SetPnt(const gp_Pnt& aPnt) {
+    myPnt=aPnt;
+  }
+  //
+  const gp_Pnt& Pnt()const {
+    return myPnt;
+  }
+  //
+ protected:
+  gp_Pnt myPnt;
+  TopoDS_Face myFace;
+};
+//
+typedef BOPCol_NCVector
+  <BOPAlgo_FacePnt> BOPAlgo_VectorOfFacePnt; 
+//
+//=======================================================================
+//function : BOPAlgo_FaceSolid
+//purpose  : 
+//=======================================================================
+class BOPAlgo_FaceSolid : public BOPAlgo_Algo {
+ public:
+  DEFINE_STANDARD_ALLOC
+
+  BOPAlgo_FaceSolid() :
+    myIsInternalFace(Standard_False) {
+  }
+  //
+  virtual ~BOPAlgo_FaceSolid() {
+  }
+  //
+  void SetFace(const TopoDS_Face& aFace) {
+    myFace=aFace;
+  }
+  //
+  const TopoDS_Face& Face()const {
+    return myFace;
+  }
+  //
+  void SetSolid(const TopoDS_Solid& aSolid) {
+    mySolid=aSolid;
+  }
+  //
+  const TopoDS_Solid& Solid()const {
+    return mySolid;
+  }
+  //
+  void SetPnt(const gp_Pnt& aPnt) {
+    myPnt=aPnt;
+  }
+  //
+  const gp_Pnt& Pnt()const {
+    return myPnt;
+  }
+  void SetContext(const Handle(IntTools_Context)& aContext) {
+    myContext=aContext;
+  }
+  //
+  const Handle(IntTools_Context)& Context()const {
+    return myContext;
+  }
+  //
+  Standard_Boolean IsInternalFace() const {
+    return myIsInternalFace;
+  }
+  //
+  virtual void Perform () {
+    TopAbs_State aState;
+    //
+    BOPAlgo_Algo::UserBreak();
+    //
+    aState=BOPTools_AlgoTools::ComputeState(myPnt, mySolid, 
+                                            1.e-14, myContext);
+    //
+    myIsInternalFace=(aState==TopAbs_IN);
+  }
+  //
+ protected:
+  Standard_Boolean myIsInternalFace;
+  gp_Pnt myPnt;
+  TopoDS_Face myFace;
+  TopoDS_Solid mySolid;
+  Handle(IntTools_Context) myContext;
+};
+//=======================================================================
+typedef BOPCol_NCVector
+  <BOPAlgo_FaceSolid> BOPAlgo_VectorOfFaceSolid; 
+//
+typedef BOPCol_TBBContextFunctor 
+  <BOPAlgo_FaceSolid,
+  BOPAlgo_VectorOfFaceSolid,
+  Handle(IntTools_Context), 
+  IntTools_Context> BOPAlgo_FaceSolidFunctor;
+//
+typedef BOPCol_TBBContextCnt 
+  <BOPAlgo_FaceSolidFunctor,
+  BOPAlgo_VectorOfFaceSolid,
+  Handle(IntTools_Context)> BOPAlgo_FaceSolidCnt;
+//
+//=======================================================================
+typedef NCollection_DataMap
+  <TopoDS_Shape, 
+  gp_Pnt, 
+  TopTools_ShapeMapHasher> BOPAlgo_DataMapOfShapePnt; 
+
+typedef BOPAlgo_DataMapOfShapePnt::Iterator 
+  BOPAlgo_DataMapIteratorOfDataMapOfShapePnt; 
+//
+//=======================================================================
 //function : 
 //purpose  : 
 //=======================================================================
 //function : 
 //purpose  : 
 //=======================================================================
@@ -252,7 +384,10 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid()
     for (; aIt.More(); aIt.Next()) {
       const TopoDS_Shape& aF=aIt.Value();
       if (!myShapesToAvoid.Contains(aF)) {
     for (; aIt.More(); aIt.Next()) {
       const TopoDS_Shape& aF=aIt.Value();
       if (!myShapesToAvoid.Contains(aF)) {
-        BOPTools::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
+        BOPTools::MapShapesAndAncestors(aF, 
+                                        TopAbs_EDGE, 
+                                        TopAbs_FACE, 
+                                        aMEF);
       }
     }
     aNbE=aMEF.Extent();
       }
     }
     aNbE=aMEF.Extent();
@@ -442,7 +577,8 @@ void BOPAlgo_BuilderSolid::PerformAreas()
   BOPCol_ListIteratorOfListOfInteger aItLI;
   BOPCol_BoxBndTreeSelector aSelector;
   BOPCol_BoxBndTree aBBTree;
   BOPCol_ListIteratorOfListOfInteger aItLI;
   BOPCol_BoxBndTreeSelector aSelector;
   BOPCol_BoxBndTree aBBTree;
-  NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
+  NCollection_UBTreeFiller 
+    <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
   BOPAlgo_DataMapOfIntegerBSSB aDMISB(100);
   BOPAlgo_DataMapIteratorOfDataMapOfIntegerBSSB aItDMISB;
   BOPCol_DataMapOfShapeListOfShape aMSH;
   BOPAlgo_DataMapOfIntegerBSSB aDMISB(100);
   BOPAlgo_DataMapIteratorOfDataMapOfIntegerBSSB aItDMISB;
   BOPCol_DataMapOfShapeListOfShape aMSH;
@@ -628,101 +764,206 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes()
     return;
   }
   // 
     return;
   }
   // 
+  Standard_Boolean bIsInternalFace;
+  Standard_Integer k, aNbVFS, aNbSLF, aNbVFP, aNbF, aNbA;
   BRep_Builder aBB;
   TopoDS_Iterator aIt;
   BRep_Builder aBB;
   TopoDS_Iterator aIt;
-  BOPCol_ListIteratorOfListOfShape aShellIt, aSolidIt;
-  BOPCol_MapIteratorOfMapOfShape aItMF;
-  //
-  BOPCol_MapOfShape aMF, aMFP, aMFx;
-  BOPCol_IndexedDataMapOfShapeListOfShape aMEF;
+  TopExp_Explorer aExp;
+  BOPCol_ListIteratorOfListOfShape  aItLS;
+  BOPCol_MapOfShape aMFs;
   BOPCol_ListOfShape aLSI;
   BOPCol_ListOfShape aLSI;
+  BOPAlgo_VectorOfFaceSolid aVFS;
+  BOPAlgo_VectorOfFacePnt aVFP;
+  BOPCol_ListIteratorOfListOfInteger aItLI;
+  BOPCol_BoxBndTreeSelector aSelector;
+  BOPCol_BoxBndTree aBBTree;
+  NCollection_UBTreeFiller 
+    <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
   //
   //
-  // 1. All internal faces
-  aShellIt.Initialize(myLoopsInternal);
-  for (; aShellIt.More(); aShellIt.Next()) {
-    const TopoDS_Shape& aShell=aShellIt.Value();
+  aNbA=myAreas.Extent();
+  //
+  // 1. aVFP
+  aItLS.Initialize(myLoopsInternal);
+  for (; aItLS.More(); aItLS.Next()) {
+    const TopoDS_Shape& aShell=aItLS.Value();
     aIt.Initialize(aShell);
     for (; aIt.More(); aIt.Next()) {
     aIt.Initialize(aShell);
     for (; aIt.More(); aIt.Next()) {
-      const TopoDS_Shape& aF=aIt.Value();
-      aMF.Add(aF);
+      const TopoDS_Face& aF=*((TopoDS_Face*)&aIt.Value());
+      //
+      if (aMFs.Add(aF)) {
+        gp_Pnt aP;
+        gp_Pnt2d aP2D;
+        //
+        if (aNbA) {
+          BOPTools_AlgoTools3D::PointInFace(aF, aP, aP2D, myContext);
+        }
+        //
+        BOPAlgo_FacePnt& aFP=aVFP.Append1();
+        aFP.SetFace(aF);
+        aFP.SetPnt(aP);
+      }
     }
   }
     }
   }
-  aNbFI=aMF.Extent();
   //
   //
-  // 2 Process solids
-  aSolidIt.Initialize(myAreas);
-  for ( ; aSolidIt.More(); aSolidIt.Next()) {
-    TopoDS_Solid& aSolid=(*(TopoDS_Solid*)(&aSolidIt.Value()));
+  if (!aNbA) {
+    // 7b. "Rest" faces treatment
+    TopoDS_Solid aSolid;
+    aBB.MakeSolid(aSolid);
     //
     //
-    TopExp_Explorer anExpSol(aSolid, TopAbs_FACE);;
-    for (; anExpSol.More(); anExpSol.Next()) {
-      const TopoDS_Shape& aF = anExpSol.Current();
-      TopoDS_Shape aFF=aF;
-      //
-      aFF.Orientation(TopAbs_FORWARD);
-      aMFx.Add(aFF);
-      aFF.Orientation(TopAbs_REVERSED);
-      aMFx.Add(aFF);
+    MakeInternalShells(aMFs, aLSI);
+    //
+    aItLS.Initialize(aLSI);
+    for (; aItLS.More(); aItLS.Next()) {
+      const TopoDS_Shape& aSI=aItLS.Value();
+       aBB.Add (aSolid, aSI);
     }
     }
-    aMEF.Clear();
-    BOPTools::MapShapesAndAncestors(aSolid, 
-        TopAbs_EDGE, TopAbs_FACE, 
-        aMEF);
+    myAreas.Append(aSolid);
     //
     //
-    // 2.1 Separate faces to process aMFP
-    aMFP.Clear();
-    aItMF.Initialize(aMF);
-    for (; aItMF.More(); aItMF.Next()) {
-      const TopoDS_Face& aF=(*(TopoDS_Face*)(&aItMF.Key()));
-      if (!aMFx.Contains(aF)) {
-        if (BOPTools_AlgoTools::IsInternalFace(aF, 
-            aSolid, 
-            aMEF, 
-            1.e-14, 
-            myContext)) {
-          aMFP.Add(aF);
-        }
+    return; // =>
+  }//if (!aNbA) {
+  //
+  // 2. Prepare TreeFiller 
+  aNbVFP=aVFP.Extent();
+  for(k=0; k<aNbVFP; ++k) {
+    Bnd_Box aBox;
+    //
+    const BOPAlgo_FacePnt& aFP=aVFP(k);
+    const TopoDS_Face& aF=aFP.Face();
+    //
+    BRepBndLib::Add(aF, aBox);
+    aTreeFiller.Add(k, aBox);
+  }
+  //
+  aTreeFiller.Fill();
+  //
+  // 3. Face/Solid candidates: aVFS
+  aItLS.Initialize(myAreas);
+  for (; aItLS.More(); aItLS.Next()) {
+    Bnd_Box aBox;
+    //
+    TopoDS_Solid& aSolid=(*(TopoDS_Solid*)(&aItLS.Value()));
+    BRepBndLib::Add(aSolid, aBox);
+    //
+    aMFs.Clear();
+    aExp.Init(aSolid, TopAbs_FACE);
+    for (; aExp.More(); aExp.Next()) {
+      const TopoDS_Shape& aFs=aExp.Current();
+      aMFs.Add(aFs);
+    }
+    //
+    aSelector.Clear();
+    aSelector.SetBox(aBox);
+    //
+    aNbF=aBBTree.Select(aSelector);
+    //
+    const BOPCol_ListOfInteger& aLI=aSelector.Indices();
+    aItLI.Initialize(aLI);
+    for (; aItLI.More(); aItLI.Next()) {
+      k=aItLI.Value();
+      const BOPAlgo_FacePnt& aFP=aVFP(k);
+      const TopoDS_Face& aF=aFP.Face();
+      if (aMFs.Contains(aF)) {
+        continue;
       }
       }
+      //
+      const gp_Pnt& aP=aFP.Pnt();
+      //
+      BOPAlgo_FaceSolid& aFS=aVFS.Append1();
+      aFS.SetPnt(aP);
+      aFS.SetFace(aF);
+      aFS.SetSolid(aSolid);
     }
     }
-    aMFx.Clear();
+  }
+  //
+  aNbVFS=aVFS.Extent();
+  if (!aNbVFS) {
+    return;
+  }
+  // 4. Refine candidares
+  //=============================================================
+  BOPAlgo_FaceSolidCnt::Perform(myRunParallel, aVFS, myContext);
+  //=============================================================
+  // 
+  // 5. Solid/Faces:  aMSLF
+  BOPCol_IndexedDataMapOfShapeListOfShape aMSLF;
+  BOPCol_MapOfShape aMFProcessed;
+  //  
+  for (k=0; k < aNbVFS; ++k) {
+    const BOPAlgo_FaceSolid& aFS=aVFS(k);
     //
     //
-    // 2.2 Make Internal Shells
-    aLSI.Clear();
-    MakeInternalShells(aMFP, aLSI);
+    const TopoDS_Solid& aSolid=aFS.Solid();
+    const TopoDS_Face& aF=aFS.Face();
     //
     //
-    // 2.3 Add them to aSolid
-    aShellIt.Initialize(aLSI);
-    for (; aShellIt.More(); aShellIt.Next()) {
-      const TopoDS_Shape& aSI=aShellIt.Value();
-      aBB.Add (aSolid, aSI);
+    bIsInternalFace=aFS.IsInternalFace();
+    if (!bIsInternalFace) {
+      continue;
     }
     //
     }
     //
-    // 2.4 Remove faces aMFP from aMF
-    aItMF.Initialize(aMFP);
-    for (; aItMF.More(); aItMF.Next()) {
-      const TopoDS_Shape& aF=aItMF.Key();
-      aMF.Remove(aF);
+    if (aMSLF.Contains(aSolid)) {
+      BOPCol_ListOfShape& aLF=aMSLF.ChangeFromKey(aSolid);
+      aLF.Append(aF);
     }
     }
+    else {
+      BOPCol_ListOfShape aLF;
+      //
+      aLF.Append(aF);
+      aMSLF.Add(aSolid, aLF);
+    }
+  }// for (k=0; k < aNbVE; ++k) {
+  //
+  // 6. Update Solids by internal Faces
+  aNbSLF=aMSLF.Extent();
+  for (k=1; k <= aNbSLF; ++k) {
+    const TopoDS_Shape& aSolid=aMSLF.FindKey(k);
+    TopoDS_Shape *pSolid=(TopoDS_Shape*)&aSolid;
     //
     //
-    aNbFI=aMF.Extent();
-    if (!aNbFI) {
-      break;
+    const BOPCol_ListOfShape& aLF=aMSLF(k);
+    //
+    aMFs.Clear();
+    aItLS.Initialize(aLF);
+    for (; aItLS.More(); aItLS.Next()) {
+      const TopoDS_Shape& aF=aItLS.Value();
+      aMFs.Add(aF);
+      aMFProcessed.Add(aF);
     }
     }
-  } //for ( ; aSolidIt.More(); aSolidIt.Next()) {
+    //
+    aLSI.Clear();
+    MakeInternalShells(aMFs, aLSI);
+    //
+    aItLS.Initialize(aLSI);
+    for (; aItLS.More(); aItLS.Next()) {
+      const TopoDS_Shape& aSI=aItLS.Value();
+      aBB.Add (*pSolid, aSI);
+    }
+  }
+  // 
+  // 7. "Rest" faces treatment (if there are)
+  aMFs.Clear();
+  for (k=0; k < aNbVFS; ++k) {
+    const BOPAlgo_FaceSolid& aFS=aVFS(k);
+    //
+    const TopoDS_Face& aF=aFS.Face();
+    if (!aMFProcessed.Contains(aF)) {
+      aMFs.Add(aF);
+    }
+  }
+  //
+  aNbFI=aMFs.Extent();
   if (aNbFI) {
     TopoDS_Solid aSolid;
     aBB.MakeSolid(aSolid);
     //
   if (aNbFI) {
     TopoDS_Solid aSolid;
     aBB.MakeSolid(aSolid);
     //
-    MakeInternalShells(aMF, aLSI);
-    aShellIt.Initialize(aLSI);
-    for (; aShellIt.More(); aShellIt.Next()) {
-      const TopoDS_Shape& aSI=aShellIt.Value();
+    aLSI.Clear();
+    MakeInternalShells(aMFs, aLSI);
+    //
+    aItLS.Initialize(aLSI);
+    for (; aItLS.More(); aItLS.Next()) {
+      const TopoDS_Shape& aSI=aItLS.Value();
       aBB.Add (aSolid, aSI);
     }
     myAreas.Append(aSolid);
   }
 }
       aBB.Add (aSolid, aSI);
     }
     myAreas.Append(aSolid);
   }
 }
-
 //=======================================================================
 //function : MakeInternalShells
 //purpose  : 
 //=======================================================================
 //function : MakeInternalShells
 //purpose  : 
index 3bc4703..f43ab82 100644 (file)
@@ -14,7 +14,7 @@
 //
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 //
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
-
+//
 #include <BOPAlgo_Builder.hxx>
 //
 #include <NCollection_IncAllocator.hxx>
 #include <BOPAlgo_Builder.hxx>
 //
 #include <NCollection_IncAllocator.hxx>
@@ -121,11 +121,12 @@ class BOPAlgo_ShapeBox {
   Bnd_Box myBox;
 };
 //
   Bnd_Box myBox;
 };
 //
-typedef NCollection_DataMap\
-  <Standard_Integer, BOPAlgo_ShapeBox, TColStd_MapIntegerHasher> \
-  BOPAlgo_DataMapOfIntegerShapeBox; 
+typedef NCollection_DataMap
+  <Standard_Integer,
+  BOPAlgo_ShapeBox, 
+  TColStd_MapIntegerHasher> BOPAlgo_DataMapOfIntegerShapeBox; 
 //
 //
-typedef BOPAlgo_DataMapOfIntegerShapeBox::Iterator \
+typedef BOPAlgo_DataMapOfIntegerShapeBox::Iterator 
   BOPAlgo_DataMapIteratorOfDataMapOfIntegerShapeBox; 
 // 
 
   BOPAlgo_DataMapIteratorOfDataMapOfIntegerShapeBox; 
 // 
 
@@ -565,6 +566,7 @@ void BOPAlgo_Builder::BuildSplitSolids
     BOPAlgo_BuilderSolid& aBS=aVBS.Append1();
     aBS.SetSolid(aSolid);
     aBS.SetShapes(aSFS);
     BOPAlgo_BuilderSolid& aBS=aVBS.Append1();
     aBS.SetSolid(aSolid);
     aBS.SetShapes(aSFS);
+    aBS.SetRunParallel(myRunParallel);
     aBS.SetProgressIndicator(myProgressIndicator);
   }//for (i=0; i<aNbS; ++i) {
   //
     aBS.SetProgressIndicator(myProgressIndicator);
   }//for (i=0; i<aNbS; ++i) {
   //
index 2489e5c..7a5b84f 100644 (file)
@@ -16,7 +16,7 @@
 // commercial license or contractual agreement.
 
 #include <BOPAlgo_PaveFiller.ixx>
 // commercial license or contractual agreement.
 
 #include <BOPAlgo_PaveFiller.ixx>
-
+//
 #include <Precision.hxx>
 #include <NCollection_IncAllocator.hxx>
 #include <Bnd_Box.hxx>
 #include <Precision.hxx>
 #include <NCollection_IncAllocator.hxx>
 #include <Bnd_Box.hxx>
@@ -501,7 +501,8 @@ void BOPAlgo_PaveFiller::MakeBlocks()
           continue;
         }
         //
           continue;
         }
         //
-        bValid2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTolR3D);
+        bValid2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, 
+                                                 aF1, aF2, aTolR3D);
         if (!bValid2D) {
           continue;
         }
         if (!bValid2D) {
           continue;
         }
@@ -543,7 +544,8 @@ void BOPAlgo_PaveFiller::MakeBlocks()
         const TopoDS_Vertex& aV1=(*(TopoDS_Vertex *)(&myDS->Shape(nV1)));
         const TopoDS_Vertex& aV2=(*(TopoDS_Vertex *)(&myDS->Shape(nV2)));
         //
         const TopoDS_Vertex& aV1=(*(TopoDS_Vertex *)(&myDS->Shape(nV1)));
         const TopoDS_Vertex& aV2=(*(TopoDS_Vertex *)(&myDS->Shape(nV2)));
         //
-        BOPTools_AlgoTools::MakeEdge (aIC, aV1, aT1, aV2, aT2, aTolR3D, aES);
+        BOPTools_AlgoTools::MakeEdge (aIC, aV1, aT1, 
+                                      aV2, aT2, aTolR3D, aES);
         BOPTools_AlgoTools::MakePCurve(aES, aF1, aF2, aIC, 
                                        mySectionAttribute.PCurveOnS1(),
                                        mySectionAttribute.PCurveOnS2());
         BOPTools_AlgoTools::MakePCurve(aES, aF1, aF2, aIC, 
                                        mySectionAttribute.PCurveOnS1(),
                                        mySectionAttribute.PCurveOnS2());
@@ -578,7 +580,8 @@ void BOPAlgo_PaveFiller::MakeBlocks()
       aTol = aItMV.Value();
       //
       const TopoDS_Vertex& aV = *(TopoDS_Vertex*)&myDS->Shape(nV1);
       aTol = aItMV.Value();
       //
       const TopoDS_Vertex& aV = *(TopoDS_Vertex*)&myDS->Shape(nV1);
-      const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*)&aV.TShape());
+      const Handle(BRep_TVertex)& TV = 
+        *((Handle(BRep_TVertex)*)&aV.TShape());
       TV->Tolerance(aTol);
     }
     //
       TV->Tolerance(aTol);
     }
     //
@@ -643,8 +646,6 @@ Standard_Integer BOPAlgo_PaveFiller::PostTreatFF
   //
   BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
   //
   //
   BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
   //
-  // <-DEB f
-  //
   // 0
   if (aNbS==1) {
     const TopoDS_Shape& aS=theMSCPB.FindKey(1);
   // 0
   if (aNbS==1) {
     const TopoDS_Shape& aS=theMSCPB.FindKey(1);
@@ -695,7 +696,7 @@ Standard_Integer BOPAlgo_PaveFiller::PostTreatFF
   aPF.Perform();
   iErr=aPF.ErrorStatus();
   if (iErr) {
   aPF.Perform();
   iErr=aPF.ErrorStatus();
   if (iErr) {
-    iRet=1;
+    //iRet=1; //PKVft
     return iRet;
   }
   aPDS=aPF.PDS();
     return iRet;
   }
   aPDS=aPF.PDS();
@@ -833,7 +834,8 @@ Standard_Integer BOPAlgo_PaveFiller::PostTreatFF
                 nV=aPave[j].Index();
                 aV=aPDS->Shape(nV);
                 //
                 nV=aPave[j].Index();
                 aV=aPDS->Shape(nV);
                 //
-                if (!aMVI.IsBound(aV)) {// index of new vertex in theDS -> iV
+                if (!aMVI.IsBound(aV)) {
+                  // index of new vertex in theDS -> iV
                   aSI.SetShapeType(TopAbs_VERTEX);
                   aSI.SetShape(aV);
                   iV=myDS->Append(aSI);
                   aSI.SetShapeType(TopAbs_VERTEX);
                   aSI.SetShape(aV);
                   iV=myDS->Append(aSI);
@@ -844,7 +846,8 @@ Standard_Integer BOPAlgo_PaveFiller::PostTreatFF
                 }
               }
               const BOPDS_Pave& aP1 = !j ? aPB1->Pave1() : aPB1->Pave2();
                 }
               }
               const BOPDS_Pave& aP1 = !j ? aPB1->Pave1() : aPB1->Pave2();
-              if (aP1.Parameter() == aPave[j].Parameter() && aP1.Index() != iV) {
+              if (aP1.Parameter() == aPave[j].Parameter() && 
+                  aP1.Index() != iV) {
                 aDMI.Bind(aP1.Index(), iV);
                 myDS->AddShapeSD(aP1.Index(), iV);
               }
                 aDMI.Bind(aP1.Index(), iV);
                 myDS->AddShapeSD(aP1.Index(), iV);
               }
@@ -889,7 +892,8 @@ Standard_Integer BOPAlgo_PaveFiller::PostTreatFF
 //function : UpdateFaceInfo
 //purpose  : 
 //=======================================================================
 //function : UpdateFaceInfo
 //purpose  : 
 //=======================================================================
-void BOPAlgo_PaveFiller::UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME)
+void BOPAlgo_PaveFiller::UpdateFaceInfo
+  (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME)
 {
   Standard_Integer i, j, nV1, nF1, nF2, 
                    aNbFF, aNbC, aNbP, aNbS, aNbPBIn;
 {
   Standard_Integer i, j, nV1, nF1, nF2, 
                    aNbFF, aNbC, aNbP, aNbS, aNbPBIn;
@@ -1107,10 +1111,15 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock&
     const TopoDS_Edge& aSp=(*(TopoDS_Edge *)(&aSISp.Shape()));
     const Bnd_Box& aBoxSp=aSISp.Box();
     //
     const TopoDS_Edge& aSp=(*(TopoDS_Edge *)(&aSISp.Shape()));
     const Bnd_Box& aBoxSp=aSISp.Box();
     //
-    iFlag1 = (nV11 == nV21 || nV11 == nV22) ? 2 : (!aBoxSp.IsOut(aBoxP1) ? 1 : 0);
-    iFlag2 = (nV12 == nV21 || nV12 == nV22) ? 2 : (!aBoxSp.IsOut(aBoxP2) ? 1 : 0);
+    iFlag1 = (nV11 == nV21 || nV11 == nV22) ? 2 : 
+      (!aBoxSp.IsOut(aBoxP1) ? 1 : 0);
+    iFlag2 = (nV12 == nV21 || nV12 == nV22) ? 2 : 
+      (!aBoxSp.IsOut(aBoxP2) ? 1 : 0);
     if (iFlag1 && iFlag2) {
     if (iFlag1 && iFlag2) {
-      if (aBoxSp.IsOut(aBoxPm) || myContext->ComputePE(aPm, theTolR3D, aSp, aTx)) {
+      if (aBoxSp.IsOut(aBoxPm) || myContext->ComputePE(aPm, 
+                                                       theTolR3D, 
+                                                       aSp, 
+                                                       aTx)) {
         continue;
       }
       //
         continue;
       }
       //
@@ -1131,7 +1140,6 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock&
   }
   return bRet;
 }
   }
   return bRet;
 }
-
 //=======================================================================
 //function : PutBoundPaveOnCurve
 //purpose  : 
 //=======================================================================
 //function : PutBoundPaveOnCurve
 //purpose  : 
@@ -1237,14 +1245,15 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock&
 //function : PutPavesOnCurve
 //purpose  : 
 //=======================================================================
 //function : PutPavesOnCurve
 //purpose  : 
 //=======================================================================
-  void BOPAlgo_PaveFiller::PutPavesOnCurve(const BOPCol_MapOfInteger& aMVOnIn,
-                                           const Standard_Real aTolR3D,
-                                           BOPDS_Curve& aNC,
-                                           const Standard_Integer nF1,
-                                           const Standard_Integer nF2,
-                                           const BOPCol_MapOfInteger& aMI,
-                                           const BOPCol_MapOfInteger& aMVEF,
-                                           BOPCol_DataMapOfIntegerReal& aMVTol)
+  void BOPAlgo_PaveFiller::PutPavesOnCurve
+  (const BOPCol_MapOfInteger& aMVOnIn,
+   const Standard_Real aTolR3D,
+   BOPDS_Curve& aNC,
+   const Standard_Integer nF1,
+   const Standard_Integer nF2,
+   const BOPCol_MapOfInteger& aMI,
+   const BOPCol_MapOfInteger& aMVEF,
+   BOPCol_DataMapOfIntegerReal& aMVTol)
 {
   Standard_Boolean bInBothFaces;
   Standard_Integer nV;
 {
   Standard_Boolean bInBothFaces;
   Standard_Integer nV;
@@ -1293,10 +1302,11 @@ void BOPAlgo_PaveFiller::UpdateFaceInfo(BOPDS_DataMapOfPaveBlockListOfPaveBlock&
 //function : ExtendedTolerance
 //purpose  : 
 //=======================================================================
 //function : ExtendedTolerance
 //purpose  : 
 //=======================================================================
-Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV,
-                                                       const BOPCol_MapOfInteger& aMI,
-                                                       Standard_Real& aTolVExt,
-                                                       const Standard_Integer aType)
+Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance
+  (const Standard_Integer nV,
+   const BOPCol_MapOfInteger& aMI,
+   Standard_Real& aTolVExt,
+   const Standard_Integer aType)
 {
   Standard_Boolean bFound = Standard_False;
   if (!(myDS->IsNewShape(nV))) {
 {
   Standard_Boolean bFound = Standard_False;
   if (!(myDS->IsNewShape(nV))) {
@@ -1328,7 +1338,8 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV
       BOPDS_Interf *aInt = !k ? (BOPDS_Interf*) (&aEEs(i)) :
         (BOPDS_Interf*) (&aEFs(i));
       if (aInt->IndexNew() == nV) {
       BOPDS_Interf *aInt = !k ? (BOPDS_Interf*) (&aEEs(i)) :
         (BOPDS_Interf*) (&aEFs(i));
       if (aInt->IndexNew() == nV) {
-        if (aMI.Contains(aInt->Index1()) && aMI.Contains(aInt->Index2())) {
+        if (aMI.Contains(aInt->Index1()) && 
+            aMI.Contains(aInt->Index2())) {
           const IntTools_CommonPrt& aComPrt = !k ? aEEs(i).CommonPart() :
             aEFs(i).CommonPart();
           //
           const IntTools_CommonPrt& aComPrt = !k ? aEEs(i).CommonPart() :
             aEFs(i).CommonPart();
           //
@@ -1377,15 +1388,17 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV
         const IntTools_CommonPrt& aCP = aEF.CommonPart();
         Standard_Real aPar = aCP.VertexParameter1();
         const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&myDS->Shape(nE)));
         const IntTools_CommonPrt& aCP = aEF.CommonPart();
         Standard_Real aPar = aCP.VertexParameter1();
         const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&myDS->Shape(nE)));
-        const TopoDS_Face& aFOpposite = (*(TopoDS_Face*)(&myDS->Shape(nFOpposite)));
+        const TopoDS_Face& aFOpposite = 
+          (*(TopoDS_Face*)(&myDS->Shape(nFOpposite)));
         //
         const Handle(Geom_Curve)& aCurve = BRep_Tool::Curve(aE, f, l);
         //
         nF = (nFOpposite == nF1) ? nF2 : nF1;
         const TopoDS_Face& aF = (*(TopoDS_Face*)(&myDS->Shape(nF)));
         //
         const Handle(Geom_Curve)& aCurve = BRep_Tool::Curve(aE, f, l);
         //
         nF = (nFOpposite == nF1) ? nF2 : nF1;
         const TopoDS_Face& aF = (*(TopoDS_Face*)(&myDS->Shape(nF)));
-        Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(aE, aF, f, l);
+        Handle(Geom2d_Curve) aPCurve = 
+          BRep_Tool::CurveOnSurface(aE, aF, f, l);
         //
         //
-        GeomAPI_ProjectPointOnSurf& aProj = myContext->ProjPS(aFOpposite);
+        GeomAPI_ProjectPointOnSurf& aProj=myContext->ProjPS(aFOpposite);
         //
         gp_Pnt aPoint;
         aCurve->D0(aPar, aPoint);
         //
         gp_Pnt aPoint;
         aCurve->D0(aPar, aPoint);
@@ -1427,10 +1440,11 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV
 //function : ProcessUnUsedVertices
 //purpose  : 
 //=======================================================================
 //function : ProcessUnUsedVertices
 //purpose  : 
 //=======================================================================
-  void BOPAlgo_PaveFiller::PutEFPavesOnCurve(BOPDS_Curve& aNC,
-                                             const BOPCol_MapOfInteger& aMI,
-                                             const BOPCol_MapOfInteger& aMVEF,
-                                             BOPCol_DataMapOfIntegerReal& aMVTol)
+  void BOPAlgo_PaveFiller::PutEFPavesOnCurve
+  (BOPDS_Curve& aNC,
+   const BOPCol_MapOfInteger& aMI,
+   const BOPCol_MapOfInteger& aMVEF,
+   BOPCol_DataMapOfIntegerReal& aMVTol)
 {
   if (!aMVEF.Extent()) {
     return;
 {
   if (!aMVEF.Extent()) {
     return;
@@ -1477,12 +1491,13 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV
 //function : ProcessUnUsedVertices
 //purpose  : 
 //=======================================================================
 //function : ProcessUnUsedVertices
 //purpose  : 
 //=======================================================================
-  void BOPAlgo_PaveFiller::PutStickPavesOnCurve(const TopoDS_Face& aF1,
-                                                const TopoDS_Face& aF2,
-                                                const BOPCol_MapOfInteger& aMI,
-                                                BOPDS_Curve& aNC,
-                                                const BOPCol_MapOfInteger& aMVStick,
-                                                BOPCol_DataMapOfIntegerReal& aMVTol)
+  void BOPAlgo_PaveFiller::PutStickPavesOnCurve
+  (const TopoDS_Face& aF1,
+   const TopoDS_Face& aF2,
+   const BOPCol_MapOfInteger& aMI,
+   BOPDS_Curve& aNC,
+   const BOPCol_MapOfInteger& aMVStick,
+   BOPCol_DataMapOfIntegerReal& aMVTol)
 {
   BOPCol_MapOfInteger aMV;
   aMV.Assign(aMVStick);
 {
   BOPCol_MapOfInteger aMV;
   aMV.Assign(aMVStick);
@@ -1581,8 +1596,10 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV
   BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
   BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
   //
   BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
   BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
   //
-  Standard_Integer aNbLines[5] = {aVVs.Extent(), aVEs.Extent(), aEEs.Extent(),
-                                  aVFs.Extent(), aEFs.Extent()};
+  Standard_Integer aNbLines[5] = {
+    aVVs.Extent(), aVEs.Extent(), aEEs.Extent(),
+    aVFs.Extent(), aEFs.Extent()
+    };
   //collect indices of all shapes from nF1 and nF2.
   aMI.Clear();
   GetFullShapeMap(nF1, aMI);
   //collect indices of all shapes from nF1 and nF2.
   aMI.Clear();
   GetFullShapeMap(nF1, aMI);
@@ -1593,7 +1610,8 @@ Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance(const Standard_Integer nV
     for (i = 0; i < aNbLines[aTypeInt]; ++i) {
       BOPDS_Interf* aInt = (aTypeInt==0) ? (BOPDS_Interf*)(&aVVs(i)) : 
         ((aTypeInt==1) ? (BOPDS_Interf*)(&aVEs(i)) :
     for (i = 0; i < aNbLines[aTypeInt]; ++i) {
       BOPDS_Interf* aInt = (aTypeInt==0) ? (BOPDS_Interf*)(&aVVs(i)) : 
         ((aTypeInt==1) ? (BOPDS_Interf*)(&aVEs(i)) :
-         ((aTypeInt==2) ? (BOPDS_Interf*)(&aEEs(i)) : (BOPDS_Interf*)(&aVFs(i))));
+         ((aTypeInt==2) ? (BOPDS_Interf*)(&aEEs(i)) : 
+          (BOPDS_Interf*)(&aVFs(i))));
       if (aInt->HasIndexNew()) {
         aInt->Indices(nS1, nS2);
         if(aMI.Contains(nS1) && aMI.Contains(nS2)) {
       if (aInt->HasIndexNew()) {
         aInt->Indices(nS1, nS2);
         if(aMI.Contains(nS1) && aMI.Contains(nS2)) {
@@ -1666,12 +1684,13 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
 //function : PutPaveOnCurve
 //purpose  : 
 //=======================================================================
 //function : PutPaveOnCurve
 //purpose  : 
 //=======================================================================
-  void BOPAlgo_PaveFiller::PutPaveOnCurve(const Standard_Integer nV,
-                                          const Standard_Real aTolR3D,
-                                          BOPDS_Curve& aNC,
-                                          const BOPCol_MapOfInteger& aMI,
-                                          BOPCol_DataMapOfIntegerReal& aMVTol,
-                                          const Standard_Integer iCheckExtend)
+  void BOPAlgo_PaveFiller::PutPaveOnCurve
+  (const Standard_Integer nV,
+   const Standard_Real aTolR3D,
+   BOPDS_Curve& aNC,
+   const BOPCol_MapOfInteger& aMI,
+   BOPCol_DataMapOfIntegerReal& aMVTol,
+   const Standard_Integer iCheckExtend)
 {
   Standard_Boolean bIsVertexOnLine;
   Standard_Real aT, aTol, aTolNew;
 {
   Standard_Boolean bIsVertexOnLine;
   Standard_Real aT, aTol, aTolNew;
@@ -1769,7 +1788,6 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
     }
   }
 }
     }
   }
 }
-
 //=======================================================================
 //function : UpdateExistingPaveBlocks
 //purpose  : 
 //=======================================================================
 //function : UpdateExistingPaveBlocks
 //purpose  : 
@@ -1878,10 +1896,12 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
     Standard_Integer nF = (aMPBOn1.Contains(aPBf) || 
                            aMPBIn1.Contains(aPBf)) ? nF2 : nF1;
     const TopoDS_Face& aF = *(TopoDS_Face*)&myDS->Shape(nF);
     Standard_Integer nF = (aMPBOn1.Contains(aPBf) || 
                            aMPBIn1.Contains(aPBf)) ? nF2 : nF1;
     const TopoDS_Face& aF = *(TopoDS_Face*)&myDS->Shape(nF);
-    IntTools_Range aShrR(aPB->Pave1().Parameter(), aPB->Pave2().Parameter());
+    IntTools_Range aShrR(aPB->Pave1().Parameter(), 
+                         aPB->Pave2().Parameter());
     const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(aPB->Edge());
     //
     const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(aPB->Edge());
     //
-    Standard_Boolean bCom = BOPTools_AlgoTools::IsBlockInOnFace(aShrR, aF, aE, myContext);
+    Standard_Boolean bCom = 
+      BOPTools_AlgoTools::IsBlockInOnFace(aShrR, aF, aE, myContext);
     if (bCom) {
       if (bCB) {
         aCB = myDS->CommonBlock(aPB);
     if (bCom) {
       if (bCB) {
         aCB = myDS->CommonBlock(aPB);
@@ -1919,7 +1939,6 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
     }
   }
 }
     }
   }
 }
-
 //=======================================================================
 // function: PutClosingPaveOnCurve
 // purpose:
 //=======================================================================
 // function: PutClosingPaveOnCurve
 // purpose:
@@ -1975,7 +1994,6 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
     }
   }
 }
     }
   }
 }
-
 //=======================================================================
 //function : PreparePostTreatFF
 //purpose  : 
 //=======================================================================
 //function : PreparePostTreatFF
 //purpose  : 
@@ -2012,9 +2030,9 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
 //function : CheckPlanes
 //purpose  : 
 //=======================================================================
 //function : CheckPlanes
 //purpose  : 
 //=======================================================================
-Standard_Boolean 
-  BOPAlgo_PaveFiller::CheckPlanes(const Standard_Integer nF1,
-                                  const Standard_Integer nF2)const
+Standard_Boolean BOPAlgo_PaveFiller::CheckPlanes
+  (const Standard_Integer nF1,
+   const Standard_Integer nF2)const
 {
   Standard_Boolean bToIntersect;
   Standard_Integer i, nV2, iCnt;
 {
   Standard_Boolean bToIntersect;
   Standard_Integer i, nV2, iCnt;
@@ -2052,7 +2070,8 @@ Standard_Boolean
 //function : UpdatePaveBlocks
 //purpose  : 
 //=======================================================================
 //function : UpdatePaveBlocks
 //purpose  : 
 //=======================================================================
-void BOPAlgo_PaveFiller::UpdatePaveBlocks(const BOPCol_DataMapOfIntegerInteger& aDMI)
+void BOPAlgo_PaveFiller::UpdatePaveBlocks
+  (const BOPCol_DataMapOfIntegerInteger& aDMI)
 {
   if (aDMI.IsEmpty()) {
     return;
 {
   if (aDMI.IsEmpty()) {
     return;
index f50fb7d..84cb170 100644 (file)
@@ -3,4 +3,4 @@ restore [locate_data_file CTO908_topo106-n.brep] nervure
 
 bfuse result poche nervure
 
 
 bfuse result poche nervure
 
-set square 108943
+set square 105275
index b9194a1..cc85ebf 100644 (file)
@@ -1,3 +1,4 @@
+puts "TODO ?OCC24157 ALL: Error : The area of the resulting shape is"
 # cts17861
 
 restore [locate_data_file CTO900_cts17861a.rle] a
 # cts17861
 
 restore [locate_data_file CTO900_cts17861a.rle] a
index b838333..d9ec876 100644 (file)
@@ -1,3 +1,5 @@
+puts "TODO ?OCC24925 ALL: Error : The area of the resulting shape is"
+
 restore [locate_data_file a102] a
 restore [locate_data_file b136] b
 
 restore [locate_data_file a102] a
 restore [locate_data_file b136] b
 
index a99929b..c17b426 100755 (executable)
@@ -1,4 +1,4 @@
-puts "TODO OCC24861 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO ?OCC24861 ALL: Faulty shapes in variables faulty_1 to faulty_"
 puts "TODO OCC24861 ALL: Error : The square of result shape is"
 
 puts "========="
 puts "TODO OCC24861 ALL: Error : The square of result shape is"
 
 puts "========="
index 954192f..69f71b5 100755 (executable)
@@ -9,7 +9,7 @@ if {[string compare $os "MacOS"] == 0} {
   #puts "TODO #23828 MacOS: TEST INCOMPLETE"
 } else {
   #puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
   #puts "TODO #23828 MacOS: TEST INCOMPLETE"
 } else {
   #puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
-  #puts "TODO OCC12345 ALL: Error : The square of result shape is"
+  puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
 }
 
 puts "================"
 }
 
 puts "================"
diff --git a/tests/bugs/modalg_5/bug24157_10 b/tests/bugs/modalg_5/bug24157_10
new file mode 100644 (file)
index 0000000..e7cef59
--- /dev/null
@@ -0,0 +1,91 @@
+puts "============"
+puts "OCC24157"
+puts "============"
+puts ""
+############################################
+# Parallelization of assembly part of BO
+############################################
+
+box b0 10 10 10 
+box b 12 12 12 
+explode b f
+
+#--------------------------
+# 1
+copy b_1 f
+ttranslate f 0 -1 -1
+
+set q1 {}
+for {set i 1} {$i < 5} {incr i} {
+  tcopy f fx_$i 
+  ttranslate fx_$i [expr ($i*2)] 0. 0.    
+  lappend q1 fx_$i 
+}
+eval compound $q1 b1
+donly b0 b1 
+
+#--------------------------
+# 2
+copy b_3 f
+ttranslate f -1 0 -1
+
+set q2 {}
+for {set i 1} {$i < 5} {incr i} {
+  tcopy f fy_$i 
+  ttranslate fy_$i 0. [expr ($i*2)] 0.    
+  lappend q2 fy_$i 
+}
+eval compound $q2 b2
+donly b0 b1 b2
+
+#--------------------------
+# 3
+copy b_5 f
+ttranslate f -1 -1 0
+
+set q3 {}
+for {set i 1} {$i < 5} {incr i} {
+  tcopy f fz_$i 
+  ttranslate fz_$i 0. 0. [expr ($i*2)]
+  lappend q3 fz_$i 
+}
+eval compound $q3 b3
+
+#--------------------------
+# 4
+box bx .2 .2 .2 1.6 1.6 1.6 
+explode bx f
+
+set q4 {}
+for {set i 0} {$i < 5} {incr i} {
+  for {set j 0} {$j < 5} {incr j} {
+    for {set k 0} {$k < 5} {incr k} {
+       for {set m 1} {$m < 6} {incr m} {
+         tcopy bx_${m} sx1_${i}_${j}_${k}_${m}
+         ttranslate sx1_${i}_${j}_${k}_${m} [expr ($i)*2] [expr ($j)*2] [expr ($k)*2]. 
+         lappend q4 sx1_${i}_${j}_${k}_${m}
+       }
+    }
+  }
+}
+eval compound $q4 b4
+
+#--------------------------
+bclearobjects; bcleartools;
+baddobjects b0
+baddcompound b1
+baddcompound b2
+baddcompound b3
+baddcompound b4
+
+bfillds 
+
+regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time
+
+if { $tps_time > 5. } {
+  puts "Error: low performance"
+} else {
+  puts "OK: high performance"
+}
+
+set 2dviewer 1
index dc896c9..abd2633 100644 (file)
@@ -25,10 +25,10 @@ set nb_v_good 109
 set nb_e_good 189
 set nb_w_good 95
 set nb_f_good 88
 set nb_e_good 189
 set nb_w_good 95
 set nb_f_good 88
-set nb_sh_good 11
+set nb_sh_good 13
 set nb_sol_good 5
 set nb_compsol_good 0
 set nb_compound_good 1
 set nb_sol_good 5
 set nb_compsol_good 0
 set nb_compound_good 1
-set nb_shape_good 498
+set nb_shape_good 500
 
 set 2dviewer 1
 
 set 2dviewer 1