]> OCCT Git - occt-copy.git/commitdiff
Fix for bug_12856. CR0-710-CRFRM
authorduv <duv@opencascade.com>
Mon, 31 Jul 2017 11:18:20 +0000 (14:18 +0300)
committerduv <duv@opencascade.com>
Mon, 31 Jul 2017 11:18:20 +0000 (14:18 +0300)
Sampling loop exit conditions was inverted.

src/BRepMesh/BRepMesh_RestoreOrientationTool.cxx

index d170ba69d4735416f748a35da36e023e9a135df8..b53d8bf9d080de66dae4fac95098d2e3f00e0604 100644 (file)
@@ -397,7 +397,7 @@ void BRepMesh_RestoreOrientationTool::computeVisibility (BVH_Triangulation<Stand
       aKsi = anRNG.NextReal();
       aPsi = anRNG.NextReal();
 
-      if (aKsi + aPsi > 1.0)
+      if (aKsi + aPsi <= 1.0)
       {
         break;
       }
@@ -433,7 +433,7 @@ void BRepMesh_RestoreOrientationTool::computeVisibility (BVH_Triangulation<Stand
 
       aDot = aDirection.Dot (aNormal);
 
-      if (std::abs (aDot) < 0.2)
+      if (std::abs (aDot) >= 0.2)
       {
         break;
       }