0030090: Modeling Algorithms - BRepLib::FindValidRange does not find valid range...
[occt.git] / src / BRepLib / BRepLib_1.cxx
index 5366ebf..a5cca92 100644 (file)
@@ -101,7 +101,8 @@ static Standard_Boolean findNearestValidPoint(
         // cycle to go out of local singularity
         gp_Vec aD1;
         theCurve.D1(anUOut, aP, aD1);
-        if (aD1.SquareMagnitude() < aD1Mag)
+        isOut = (aP.SquareDistance(theVertPnt) > aSqTol);
+        if (!isOut && aD1.SquareMagnitude() < aD1Mag)
         {
           aStepLocal *= 2.;
           anUOut += aStepLocal;