]> OCCT Git - occt-copy.git/commitdiff
Correction for redmine issue #150 - make wire builder more stable.
authoraml <aml@opencascade.com>
Thu, 13 Oct 2016 10:01:25 +0000 (13:01 +0300)
committeraml <aml@opencascade.com>
Fri, 14 Oct 2016 04:34:09 +0000 (07:34 +0300)
src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.cxx

index 45fd4b3e8ff33638764b131a30e3962e0d1948ce..1926863b6747f3e007ad799f22445a22319d65df 100644 (file)
@@ -127,8 +127,13 @@ Standard_Boolean ShapeAnalysis_BoxBndTreeSelector::
     myArrIndices(minInd) = theObj;
     if((min3d - myMin3d) > RealSmall())
       myArrIndices(maxInd) = 0;
-      
-    myMin3d = min3d;
+
+    if ( (myArrIndices(Last) && minInd == Last) ||
+        (!myArrIndices(Last) && minInd == First))
+    {
+      myMin3d = min3d;
+    }
+
     if (min3d > myTol)
     {
        myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);