Skip to content

Commit

Permalink
Sketch: Solver Defaults: Sketch size multiplier OFF
Browse files Browse the repository at this point in the history
===================================================

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.
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed Nov 28, 2015
1 parent 87c6af3 commit aa6908b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Sketcher/App/planegcs/GCS.cpp
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit aa6908b

Please sign in to comment.