From aa6908b144a48881692c74fac5aba7f59bc013f7 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Wed, 25 Nov 2015 20:08:04 +0100 Subject: [PATCH] Sketch: Solver Defaults: Sketch size multiplier OFF =================================================== This commit sets the sketch size multiplier OFF by default (so the number of iterations DogLeg/BGFS/LM is not sketch size dependent). In complicated sketches having a high number of parameters, with sketch multiplier on, the number of iterations is extremely high (100 parameters*100 iterations => 10000 iterations). The idea of disabling this comes from tests performed by DeepSOIC and from my own experience using the Sketcher. In general sketch multiplier makes FreeCAD unresposive (very high amount of iterations, not a real freeze) in big sketches so that users end up killing the application. This is preventing the users from taking appropriate action, Developers from getting the information of the failure and users angry. The idea is that even for complicated sketchs N iterations (100 by default) should be enough to converge, if it is ever going to converge. Experience will tell us if we have to increase this number in the range [100-300]. 100 iterations in complicated dossiers is in my experience generally under 30 seconds. N.B.: This commit does not change the defaults stored in your computer, so if you have the sketcher multiplier on, the advanced solver dialog will still enforce this local setting. You may disable it or click the "defaults" button to disable the sketcher multiplier. --- src/Mod/Sketcher/App/planegcs/GCS.cpp | 4 ++-- src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Sketcher/App/planegcs/GCS.cpp b/src/Mod/Sketcher/App/planegcs/GCS.cpp index 9f3bab9e6..9620a4dca 100644 --- a/src/Mod/Sketcher/App/planegcs/GCS.cpp +++ b/src/Mod/Sketcher/App/planegcs/GCS.cpp @@ -193,8 +193,8 @@ System::System() , isInit(false) , maxIter(100) , maxIterRedundant(100) - , sketchSizeMultiplier(true) - , sketchSizeMultiplierRedundant(true) + , sketchSizeMultiplier(false) + , sketchSizeMultiplierRedundant(false) , convergence(1e-10) , convergenceRedundant(1e-10) , qrAlgorithm(EigenSparseQR) diff --git a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp index 0e7d5e3ad..38a91d5ec 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp @@ -57,7 +57,7 @@ #define DEFAULT_QRSOLVER 1 // DENSE=0, SPARSEQR=1 #define QR_PIVOT_THRESHOLD 1E-13 // under this value a Jacobian value is regarded as zero #define DEFAULT_SOLVER_DEBUG 1 // None=0, Minimal=1, IterationLevel=2 -#define MAX_ITER_MULTIPLIER true +#define MAX_ITER_MULTIPLIER false using namespace SketcherGui; using namespace Gui::TaskView;