sketcher: what does the option "Improve solving while dragging"

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!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

sketcher: what does the option "Improve solving while dragging"

Post by uwestoehr »

In the sketcher preferences there is the option "Improve solving while dragging". I want to document it but could not find out what it exactly does.
There must be a drawback under some circumstances because otherwise, if it is for all cases the best solution, having this option would not be necessary.
Abdullah?
abdullah wrote: Wed Jul 10, 2019 11:52 am ...
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: sketcher: what does the option "Improve solving while dragging"

Post by abdullah »

uwestoehr wrote: Fri Jul 12, 2019 11:19 am In the sketcher preferences there is the option "Improve solving while dragging". I want to document it but could not find out what it exactly does.
There must be a drawback under some circumstances because otherwise, if it is for all cases the best solution, having this option would not be necessary.
Abdullah?
abdullah wrote: Wed Jul 10, 2019 11:52 am ...
It should be the best solution in 99% of the cases, provided that your computer is not too old.

While dragging, you move the geometry, meaning that the initial solution from which the SQP algorithm starts may vary enough as to causing artifacts like flipping while dragging.

With this activated, when the point moves more than, if I remember correctly, 20 times the initial mouse drag movement (yes, this is a hard-coded value), the initial solution is recalculated, which is relatively costly. This heavily reduces unwanted results, but, in old equipment or very complex sketches, and specially when both, it gives the impression that the interface is not smooth while dragging.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: sketcher: what does the option "Improve solving while dragging"

Post by uwestoehr »

abdullah wrote: Fri Jul 12, 2019 4:51 pm With this activated, when the point moves more than, if I remember correctly, 20 times the initial mouse drag movement (yes, this is a hard-coded value), the initial solution is recalculated, which is relatively costly. This heavily reduces unwanted results, but, in old equipment or very complex sketches, and specially when both, it gives the impression that the interface is not smooth while dragging.
Many thanks.
I took now my most complex sketch but could not see any difference in speed (it takes in both cases more then a minute to solve even on my new machine). However, the option might have an effect and I documented this now accordingly: Sketcher_Preferences
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: sketcher: what does the option "Improve solving while dragging"

Post by abdullah »

uwestoehr wrote: Fri Jul 12, 2019 10:16 pm
abdullah wrote: Fri Jul 12, 2019 4:51 pm With this activated, when the point moves more than, if I remember correctly, 20 times the initial mouse drag movement (yes, this is a hard-coded value), the initial solution is recalculated, which is relatively costly. This heavily reduces unwanted results, but, in old equipment or very complex sketches, and specially when both, it gives the impression that the interface is not smooth while dragging.
Many thanks.
I took now my most complex sketch but could not see any difference in speed (it takes in both cases more then a minute to solve even on my new machine). However, the option might have an effect and I documented this now accordingly: Sketcher_Preferences
Is it possible for you to upload that sketch here and ping me?

I might be able to take a look into what is taking so long (profile it). I also have some pending work to do on the solver, which could include some degree of multitasking, having such an example could be a good benchmark to different approaches/improvements.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: sketcher: what does the option "Improve solving while dragging"

Post by uwestoehr »

abdullah wrote: Sat Jul 13, 2019 4:31 am Is it possible for you to upload that sketch here and ping me?
Hi Abdullah, you can download it from here: http://ftp.lyx.de/Billas/150mu-09channe ... llah.FCStd

The most complex sketch there is "Sketch-Layer2-Teil2".
Originally the two sketches "Sketch-Layer2-Teil1" and "Sketch-Layer2-Teil2" were within one sketch but as working with this was incredibly slow, I had to split them to 2 sketches.
This sketch is complex but a normal real-life example. If it would be possible in future to have the 2 sketches in one and working with it, this would be great. However, Solidworks needs also a lot of time to solve the sketch (unfortunately I don't have Solidworks anymore but my project partners told me).
Please send me a private message if you need for more data related to the example.

many thanks Uwe
Post Reply