]> OCCT Git - occt.git/commitdiff
0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnS...
authorkgv <kgv@opencascade.com>
Thu, 10 Jan 2019 13:35:25 +0000 (16:35 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 26 May 2021 17:20:38 +0000 (20:20 +0300)
Removed workaround within GeomLib_CheckCurveOnSurface.

src/BOPAlgo/BOPAlgo_CheckerSI.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/GeomLib/GeomLib_CheckCurveOnSurface.cxx
src/IntTools/IntTools_FaceFace.cxx
src/IntTools/IntTools_FaceFace.hxx
src/IntTools/IntTools_Tools.cxx
src/IntTools/IntTools_Tools.hxx

index 93e4a0645c9fb622ea984c5a7219d28e1faf2eeb..845659ab7cdcba30fed28345581ba8e8a6a90b57 100644 (file)
@@ -90,7 +90,7 @@ class BOPAlgo_FaceSelfIntersect :
   //
   virtual void Perform() {
     BOPAlgo_Algo::UserBreak();
-    IntTools_FaceFace::Perform(myF, myF);
+    IntTools_FaceFace::Perform (myF, myF, myRunParallel);
   }
   //
  protected:
@@ -428,6 +428,7 @@ void BOPAlgo_CheckerSI::CheckFaceSelfIntersection()
     
     BOPAlgo_FaceSelfIntersect& aFaceSelfIntersect = aVFace.Appended();
     //
+    aFaceSelfIntersect.SetRunParallel (myRunParallel);
     aFaceSelfIntersect.SetIndex(i);
     aFaceSelfIntersect.SetFace(aF);
     aFaceSelfIntersect.SetTolF(aTolF);
index 27a79abca29a02427f19aa02882f9a40aba08bcb..bba02bfbaae20c31e36f322d9d45cc670fecfe4d 100644 (file)
@@ -180,7 +180,7 @@ class BOPAlgo_FaceFace :
         myTrsf = aTrsf.Inverted();
       }
 
-      IntTools_FaceFace::Perform (aF1, aF2);
+      IntTools_FaceFace::Perform (aF1, aF2, myRunParallel);
     }
     catch (Standard_Failure const&)
     {
@@ -292,6 +292,7 @@ void BOPAlgo_PaveFiller::PerformFF()
       //
       BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Appended();
       //
+      aFaceFace.SetRunParallel (myRunParallel);
       aFaceFace.SetIndices(nF1, nF2);
       aFaceFace.SetFaces(aF1, aF2);
       aFaceFace.SetBoxes (myDS->ShapeInfo (nF1).Box(), myDS->ShapeInfo (nF2).Box());
index edf17415e209f485fc2e02d4e327945e466c6992..1d2e682ee188f37575d095a7d44ba5baabbef0ac 100644 (file)
@@ -649,7 +649,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
   aFF.SetList(aListOfPnts);
   aFF.SetFuzzyValue (BOPTest_Objects::FuzzyValue());
   //
-  aFF.Perform (aF1, aF2);
+  aFF.Perform (aF1, aF2, BOPTest_Objects::RunParallel());
   //
   anIsDone=aFF.IsDone();
   if (!anIsDone) {
index 65c6dbe6ddf8dde019dd4ffced3548ccd198b17a..c8ad876b1e136cb8ab342258481a4873c627a99b 100644 (file)
@@ -390,19 +390,9 @@ void GeomLib_CheckCurveOnSurface::Init( const Handle(Geom_Curve)& theCurve,
 //function : Perform
 //purpose  : 
 //=======================================================================
-#ifndef HAVE_TBB
-//After fixing bug # 26365, this fragment should be deleted
-//(together the text "#ifdef HAVE_TBB")
-
-void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
-                                          const Standard_Boolean)
-{
-  const Standard_Boolean isTheMTDisabled = Standard_True;
-#else
 void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
                                           const Standard_Boolean isTheMTDisabled)
 {
-#endif
   if( myCurve.IsNull() ||
       mySurface.IsNull() ||
       thePCurve.IsNull())
index 6b4047c99837b7fab06afc6f79ec26c023faf116..b2e680f7a693d3f14d3eb235b30f619154cc7edd 100644 (file)
@@ -356,8 +356,9 @@ static Standard_Boolean isTreatAnalityc(const BRepAdaptor_Surface& theBAS1,
 //function : Perform
 //purpose  : intersect surfaces of the faces
 //=======================================================================
-void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
-                                const TopoDS_Face& aF2)
+void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
+                                 const TopoDS_Face& aF2,
+                                 const Standard_Boolean theToRunParallel)
 {
   if (myContext.IsNull()) {
     myContext=new IntTools_Context;
@@ -560,7 +561,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
       MakeCurve(i, dom1, dom2, TolArc);
     }
     //
-    ComputeTolReached3d();
+    ComputeTolReached3d (theToRunParallel);
     //
     if (bReverse) {
       Handle(Geom2d_Curve) aC2D1, aC2D2;
@@ -624,7 +625,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
 //function :ComputeTolReached3d 
 //purpose  : 
 //=======================================================================
-void IntTools_FaceFace::ComputeTolReached3d()
+void IntTools_FaceFace::ComputeTolReached3d (const Standard_Boolean theToRunParallel)
 {
   Standard_Integer i, j, aNbLin = mySeqOfCurve.Length();
   if (!aNbLin) {
@@ -662,8 +663,7 @@ void IntTools_FaceFace::ComputeTolReached3d()
         // Look for the maximal deviation between 3D and 2D curves
         Standard_Real aD, aT;
         const Handle(Geom_Surface)& aS = !j ? aS1 : aS2;
-        if (IntTools_Tools::ComputeTolerance
-            (aC3D, aC2D, aS, aFirst, aLast, aD, aT))
+        if (IntTools_Tools::ComputeTolerance (aC3D, aC2D, aS, aFirst, aLast, aD, aT, Precision::PConfusion(), theToRunParallel))
         {
           if (aD > aTolC)
           {
index 9a74f94b3987cd540761b2895e905ef7e19475de..228bc57ee516be7b0b44ceaac28e6dfb69ea1e6c 100644 (file)
@@ -48,7 +48,9 @@ public:
   //! Intersects underliing surfaces of F1 and F2
   //! Use sum of tolerance of F1 and F2 as intersection
   //! criteria
-  Standard_EXPORT void Perform (const TopoDS_Face& F1, const TopoDS_Face& F2);
+  Standard_EXPORT void Perform (const TopoDS_Face& F1,
+                                const TopoDS_Face& F2,
+                                const Standard_Boolean theToRunParallel = Standard_False);
   
 
   //! Returns True if the intersection was successful
@@ -106,7 +108,7 @@ protected:
   //! as a maximal deviation between 3D curve and 2D curves on faces.<br>
   //! If there are no 2D curves the maximal deviation between 3D curves
   //! and surfaces is computed.
-  Standard_EXPORT void ComputeTolReached3d();
+  Standard_EXPORT void ComputeTolReached3d (const Standard_Boolean theToRunParallel);
 
 protected:
 
index 46c891d3957fc543988ec04def0b1cb6672ee887..5f3db88462f03c8c071b4efa2cb646fdf639c4f4 100644 (file)
@@ -792,12 +792,13 @@ Standard_Boolean IntTools_Tools::ComputeTolerance
    const Standard_Real theLast,
    Standard_Real& theMaxDist,
    Standard_Real& theMaxPar,
-   const Standard_Real theTolRange)
+   const Standard_Real theTolRange,
+   const Standard_Boolean theToRunParallel)
 {
   GeomLib_CheckCurveOnSurface aCS;
   //
   aCS.Init(theCurve3D, theSurf, theFirst, theLast, theTolRange);
-  aCS.Perform(theCurve2D);
+  aCS.Perform (theCurve2D, !theToRunParallel);
   if (!aCS.IsDone()) {
     return Standard_False;
   }
index 18f067a7f458f05068c3d22a7ec6df0f1c060e50..8a466e9c425e65b315bf8106b9a22d6c1d3214c7 100644 (file)
@@ -172,8 +172,8 @@ public:
                                       const Standard_Real theLast,
                                       Standard_Real& theMaxDist,
                                       Standard_Real& theMaxPar,
-                                      const Standard_Real theTolRange =
-                                                                  Precision::PConfusion());
+                                      const Standard_Real theTolRange = Precision::PConfusion(),
+                                      const Standard_Boolean theToRunParallel = Standard_False);
 
 
   //! Computes the correct Intersection range for