Bug #2729 False 'redundant constrains' message

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!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Bug #2729 False 'redundant constrains' message

Post by abdullah »

Jee-Bee wrote: Fri Apr 27, 2018 12:46 pm
abdullah wrote: Fri Apr 27, 2018 9:59 am In the meantime the tangecy+coincident automatic conversion to endpoint tangency was implemented and merged into master. This should then be fixed.
I would say it is the other way around... end point tangency is tangecy + coincident... isn't it?
(edge-to-edge tangency + coincident) = endpoint-to-endpoint tangency

I might not have made me understood :lol: . What I mean is that because this change is done automatically now, it is not possible to arrive to it now, so the bug should be already fixed in the sense that arriving to that situation is prevented. I am sleepy today :)
Chukharev
Posts: 9
Joined: Sun Feb 12, 2017 10:35 am

Re: Bug #2729 False 'redundant constrains' message

Post by Chukharev »

Thanks for fixing the most often occurrence where the bug is exhibited!

What bothers me is that neither the very bug nor unstable behaviour of the solver have not got any attention in the discussions... These definitely will continue to show up...

Sorry for my pessimism and thanks for your work.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Bug #2729 False 'redundant constrains' message

Post by abdullah »

Chukharev wrote: Sun Jun 03, 2018 7:16 pm Thanks for fixing the most often occurrence where the bug is exhibited!

What bothers me is that neither the very bug nor unstable behaviour of the solver have not got any attention in the discussions... These definitely will continue to show up...

Sorry for my pessimism and thanks for your work.
Au contraire, solver stability is well taken into account in the overall discussion. This kind of bug reports help me to have a broad view of the possible edges. The broad view has resulted in a package of improvements that has just been merged. I really hope you will find a better overall behaviour there.

Of course I work within my limitations, which include a not very sound knowledge of math and numeric algorithms. I simply have not found a way to overcome that specific combination at solver level. It does not mean it is unsolvable. It means I have not find it. Therefore, my approach to that specific combination of constraints was to automate what an experience user knows a basic user should do to avoid the problem. Eventually hopefully others more capable will come and may give it a better approach.
Chukharev
Posts: 9
Joined: Sun Feb 12, 2017 10:35 am

Re: Bug #2729 False 'redundant constrains' message

Post by Chukharev »

abdullah wrote: Mon Jun 04, 2018 9:27 am Au contraire, solver stability is well taken into account in the overall discussion. This kind of bug reports help me to have a broad view of the possible edges. The broad view has resulted in a package of improvements that has just been merged. I really hope you will find a better overall behaviour there.
Thanks for nice words about the bug report.
Then I do not understand the discussion. I cannot find anything about false positives for redundant constrains detection. About solver stability I only found the following.

1a. 2017-02-03 22:46 (in tracker) Chukharev: 1. Try to slightly randomly displace points and rerun the solver...
1b. Sun Feb 12, 2017 12:35 pm Chukharev: A possible way to somwhat improve the solver stability might be trying to reiterate with a small random displacement of points.
2. Fri Aug 29, 2014 3:45 am DeepSOIC: Unacceptable. This will cause creep with underconstrained sketches (typically, those are hand-tweaked sketches).
3. Sun May 04, 2014 6:16 pm abdullah: a) Change the solver edge tangency constraint to another expression that does not show the behaviour, if such alternative expression exists => (probability of happening under 1/1000).
4. Sun Feb 12, 2017 12:35 pm Chukharev (to DeepSOIC): Out of curiosity, do you have an example, how an under-constrained sketch can be accepted by the solver if the re-iteration is only applied to over-constrained sketches?

It's very good if this little discussion leads to solver stability being well taken into account. No sarcasm, I really mean it, it is good! Thank you for explaining my misunderstanding. And surely it'a a pity that no solution to the false positive was yet found...
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Bug #2729 False 'redundant constrains' message

Post by abdullah »

Chukharev wrote: Wed Jun 06, 2018 1:07 pm
abdullah wrote: Mon Jun 04, 2018 9:27 am Au contraire, solver stability is well taken into account in the overall discussion. This kind of bug reports help me to have a broad view of the possible edges. The broad view has resulted in a package of improvements that has just been merged. I really hope you will find a better overall behaviour there.
Thanks for nice words about the bug report.
Then I do not understand the discussion. I cannot find anything about false positives for redundant constrains detection.
I see. I did not mean that you would find it in your ticket. What I meant is that solver tickets ultimately enable to improve the solver. Sometimes it takes several years so that these tickets are handled. Sometimes the issue is not resolved. Many times it leads to an improvement. I can certainly provide proof:

https://github.com/FreeCAD/FreeCAD/comm ... e000d13fe5
https://github.com/FreeCAD/FreeCAD/comm ... b79f5ad414
https://github.com/FreeCAD/FreeCAD/comm ... 4ac6bd7c8e
https://github.com/FreeCAD/FreeCAD/comm ... b8966d388e

Now go here:
https://freecadweb.org/tracker/my_view_page.php

Select the GCS project on top (which is the Geometric Constraint Solver project) and look in the timeline for "Chrisb" going one by one all the solver tickets that the commits above solved. The system does work. The discussion does work. The bug tracker works and this was possible because many people like you took time to write tickets and provide edge cases where the solver fails.

There are still issues, for sure, and we keep trying to find a way forward:
https://forum.freecadweb.org/viewtopic. ... 15#p237569

I know the symmetry constraint does not always work well for a long time. However that user put forward a simple example where this behaviour can be seen and reproduced in a simple sketch. One of the prolific helpers in the help forum raised my attention to the topic. Because I do not have enough knowledge, I found somebody who can certainly help and this is the way it goes. There is probably no single magician in FreeCAD because more than a piece of software FreeCAD is a community and it goes ahead not because of a single individual (though there are some key individuals, which are extremely important), but because of every single individual.

In the very specific case of your ticket, we do know that the edge tangency does not work well when intended to be a point-to-point tangency. At the time, we did not come with a better solution than to automatically substitute it. We came to pushing a solution or work-around if you wish in this specific case because we found no better solution. We came to pushing a solution or work-around because several people, including you, have complained about the misbehaviour and filed a ticket. I mean it does not get better... unless you get somebody better than me to do it who can come to a better solution :lol:
Chukharev
Posts: 9
Joined: Sun Feb 12, 2017 10:35 am

Re: Bug #2729 False 'redundant constrains' message

Post by Chukharev »

abdullah, thanks a lot for your kind introduction into the issue tracking system used by FreeCAD developers. It's more complicated than what I'm used to... I hope this will be helpful not only for me.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Bug #2729 False 'redundant constrains' message

Post by abdullah »

Chukharev wrote: Wed Jun 06, 2018 7:50 pm abdullah, thanks a lot for your kind introduction into the issue tracking system used by FreeCAD developers. It's more complicated than what I'm used to... I hope this will be helpful not only for me.
You are welcome! I agree it is good that everybody knows about it and that we take reporter's time and effort in filing tickets seriously.

So, dear readers of this post, please, please, please, keep posting in the forum all your problems (in the help forum) and if the experts there agree that there is a bug or misbehaviour present, file a bug to the tracker... :) :) :)
Post Reply