How can I control solver output?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
chrisb
Posts: 18793
Joined: Tue Mar 17, 2015 9:14 am

How can I control solver output?

Postby chrisb » Mon Dec 17, 2018 1:42 pm

The solver is filling report view with lots of messages such as

Code: Select all

...
Sketcher::Solve()-DogLeg-T:0
Sketcher::setUpSketch()-T:0
Sketcher::Solve()-DogLeg-T:0
Sketcher::setUpSketch()-T:0
Sketcher::Solve()-DogLeg-T:0
Sketcher::setUpSketch()-T:0.001
Sketcher::Solve()-DogLeg-T:0
...
Among these it happens sometimes that I miss other interesting messages, even errors and warnings, in case they scroll immediately out of sight. Is there a possibility to suppress or minimize these messages?

I have disabled "Show Advanced Solver Control in the Task bar" and enabled "Improve solving while dragging".
chrisb
Posts: 18793
Joined: Tue Mar 17, 2015 9:14 am

Re: How can I control solver output?

Postby chrisb » Wed Dec 19, 2018 9:39 am

I have disabled "Improve solving while dragging", restarted FreeCAD and still get lots of output. For a single line with moving an endpoint near its final position I get 140 lines of log messages output.
abdullah wrote: ping
Is it worth a feature request?
Bance
Posts: 207
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How can I control solver output?

Postby Bance » Wed Dec 19, 2018 9:52 am

Chris I don't get any output in report view using:-

OS: Linux Mint 18.2 Sonya
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15190 (Git)
Build type: Release
Branch: master
Hash: c18785fdb31e378500440de23dcf648a2c79dc5f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)


Steve.
chrisb
Posts: 18793
Joined: Tue Mar 17, 2015 9:14 am

Re: How can I control solver output?

Postby chrisb » Wed Dec 19, 2018 10:19 am

I get them only if I have Praferences->General->OutputWindow->Record log messages enabled. It seemed sensible to me when using other workbenches which output occasional useful messages, e.g. Path workbench which post processor is used. The Sketcher messages look rather like debug output. So we might have an additional level for these configurable in preferences.
Sketcher/Solver run without any flaws since a long time now and I haven't read something different here in the forum. So I would like to have the possibility to omit these messages while keeping others.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: How can I control solver output?

Postby abdullah » Wed Dec 19, 2018 1:07 pm

chrisb wrote:
Wed Dec 19, 2018 9:39 am
I have disabled "Improve solving while dragging", restarted FreeCAD and still get lots of output. For a single line with moving an endpoint near its final position I get 140 lines of log messages output.
abdullah wrote: ping
Is it worth a feature request?
The output that you see is the amount of solves FC does while dragging. Removing the "Improve solving" will only save you a minimal amount of "SetupSketch" calls.

Currently the debug originates from the solving function, which is the one that is also called during the normal solving operations so it is not just commenting a couple of lines. It requires re-thinking what do we need as output in each situation.

I have also realised that there is wrong information. For example DogLeg is never used for dragging, which it is reported that it does it. This originates from the rather convoluted way the different algorithms of the solver are called.

Related, solvings outside edit mode ignore the advanced solver dialog preferences and default to DogLeg.

All this means that next year I have some work to do on the solver, so if you add a ticket, I will take it into account. :D
chrisb
Posts: 18793
Joined: Tue Mar 17, 2015 9:14 am

Re: How can I control solver output?

Postby chrisb » Thu Dec 20, 2018 12:17 am

abdullah wrote:
Wed Dec 19, 2018 1:07 pm
... if you add a ticket, I will take it into account. :D
Done: issue #3743.
I filled it with nothing but a link to this topic.