diff --git a/src/Mod/Sketcher/App/freegcs/GCS.cpp b/src/Mod/Sketcher/App/freegcs/GCS.cpp index 5ca29a71c..fb8c78f2a 100644 --- a/src/Mod/Sketcher/App/freegcs/GCS.cpp +++ b/src/Mod/Sketcher/App/freegcs/GCS.cpp @@ -984,11 +984,15 @@ int System::solve(SubSystem *subsysA, SubSystem *subsysB, bool isFine) break; } alpha = tau * alpha; + if (alpha < 1e-8) // let the linesearch fail + alpha = 0.; x = x0 + alpha * xdir; subsysA->setParams(plist,x); subsysB->setParams(plist,x); subsysA->calcResidual(resA); f = subsysB->error() + mu * resA.lpNorm<1>(); + if (alpha < 1e-8) // let the linesearch fail + break; } lambda = lambda0 + alpha * lambdadir;