not only [Sketch] - FC becomes unresponsive while performing calculations

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by uwestoehr »

abdullah wrote: Thu Sep 30, 2021 12:32 pm I have been thinking about this particular case lately. There could be an "option" to use a "block" constraint alike concept here....
Do you think this would be useful?
Yes, that would be super helpful! For example today I drew a meander structure (fancy, with splines etc.), so I got quickly > 800 constraints and now adding further line/arcs, takes longer and longer.
However, what about having an option to turn off the solver completely via an option? Then, with the blocked solver one could add all the arcs one needs, and constrain them and when the sketch is basically ready one could unblock and let the solver work.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by abdullah »

chrisb wrote: Thu Sep 30, 2021 5:49 pm So the question is: Should we have a powerful tool, but rather recommend not to use it, or should we have a tool which rather enforces certain limits because we would recommend anyway to stay within them? To put it differently: is it worth investing time to implement something which we recommend not to use?
Thanks for the detailed answer.

The thing is that I know you are right. There is just sometimes this non-standard use where it might help. I will reflect on it.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by abdullah »

uwestoehr wrote: Thu Sep 30, 2021 8:33 pm However, what about having an option to turn off the solver completely via an option? Then, with the blocked solver one could add all the arcs one needs, and constrain them and when the sketch is basically ready one could unblock and let the solver work.
Disabling the solver is a very bad idea. Rather shows the levels of existence one might be willing to accept out of desperation. Resist it, there is always a better solution. Bombing the solve to oblivion is not what we want ;)

Imagine a sketcher where nothing will move, no dragging of elements, no moving to meet constraints, no updating of DoF, no informing of redundancies and conflicting constraints... It is bad yes. No imagine that because you inserted some redundants and conflictings, the detection no longer works properly. Imagine that the sketcher does not do what you do because of this and you cannot figure it out. Imagine you are being tempted to throw your computer through the window and you are only not doing it because you think of its cost. A sketcher without solver is like making a pizza without dough...
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by uwestoehr »

abdullah wrote: Fri Oct 01, 2021 11:55 am Imagine a sketcher where nothing will move, no dragging of elements, no moving to meet constraints, no updating of DoF, no informing of redundancies and conflicting constraints...
Exactly this was my idea. You turn off the solver to place your elements there without a solver stepping in. After you are finished with your element additions, you turn the solver on again, can then move, set constraints etc.

In my use case I could this way draw the meander structure, then turn on the solver, to get it ready with all constraints. Then I turn off the solver again to add the elements I need for electrical connector paths etc.. Then I turn on the solver again...
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by user1234 »

uwestoehr wrote: Fri Oct 01, 2021 12:04 pm You turn off the solver to place your elements there without a solver stepping in.
I worked years with a CAD with a sketcher without solver. Believe me, this no fun.

uwestoehr wrote: Fri Oct 01, 2021 12:04 pm After you are finished with your element additions, you turn the solver on again, can then move, set constraints etc.
Do not forget that horizontal, vertical, coincidences and tangents are also a constraints.


Greetings (from an user, who suffered was annoyed years without a solver in a sketcher)
user1234

edit: replaced word
Last edited by user1234 on Fri Oct 01, 2021 2:03 pm, edited 1 time in total.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by abdullah »

user1234 wrote: Fri Oct 01, 2021 12:36 pm Greetings (from an user, who suffered years without a solver in a sketcher)
My condolences for the part of you that surely died over those years.
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by user1234 »

OK, that was an incorrect word, annoyed is more correct, sorry for that.

Greetings
user1234
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by uwestoehr »

user1234 wrote: Fri Oct 01, 2021 12:36 pm I worked years with a CAD with a sketcher without solver. Believe me, this no fun.
I am aware of this. but it is only for some minutes and of course only when the user purposely turned it off.

For me the question is if a turnoff for some minutes to place the desired elements really does what I expect from it - save time in complex sketches. If not, then of course this is not sensible.
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by user1234 »

uwestoehr wrote: Fri Oct 01, 2021 3:47 pm minutes to place the desired elements
I know what you mean, but also you must expect, that when you turn off the solver, all you drag will be fragmented, coincidences on rectangles also. And when you turn on the solver, the result can extremely vary from you expectations since the solver solves everything listed one after another.

I only can guess what at the end you what to achieve. I think something like this?
0.webm
(261.05 KiB) Downloaded 47 times
This is a function what is implemented in DraftArray, but is missing in PartDesignPattern. Not that i want you to drag in something! Only a pure guess.

Greetings
user1234
Attachments
0.FCStd
(20.48 KiB) Downloaded 36 times
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: not only [Sketch] - FC becomes unresponsive while performing calculations

Post by chrisb »

I see that such turn off may be intriguing, but I'm afraid that it will require much more than just switching the solver off and on: We have seen here sketches from people who ignored the solver messages, or at least the advice to react immediately if an error occurs. This caused sketches to become compleetely out of whack, where even removing offending constraints didn't help.
If such a feature is added, it will be used far beyond what you are planning now to do, and we may well have a constant number of help requests and false bug reports here, where unsolved, conflicting or redundant sets of constraints cannot be fixed.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply