A tough nut for the solver

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!
Batucada
Posts: 213
Joined: Mon Jul 18, 2022 9:03 am

A tough nut for the solver

Post by Batucada »

Here is a simple sketch that probably presents the solver with a problem. The sketch contains:
8 horizontal lines
6 vertical lines
4 arcs of 90
Constraints are present
4 length measures
1 radius
1 symmetry
12 coincidence
8 tangential connections to the circular arcs
various equality constraints

From a purely mathematical point of view, the solver should be able to find no more degrees of freedom. But it does not. It quits its job with 6 degrees of freedom. At first I thought that the number of coincidences was too low, but that is already appropriate.
.
Bildschirmfoto 2022-08-14 um 13.32.41.png
Bildschirmfoto 2022-08-14 um 13.32.41.png (98.33 KiB) Viewed 679 times
Have fun solving it, I'll keep looking anyway.

The sketch was created while I was looking for a solution to another problem. The final sketch looks a little different, but the problem presented here does not appear in the final sketch, but another one does, which is similarly strange.
.
Turbine_Isolierteil2.FCStd
(8.76 KiB) Downloaded 12 times
drmacro
Veteran
Posts: 8862
Joined: Sun Mar 02, 2014 4:35 pm

Re: A tough nut for the solver

Post by drmacro »

I see them immediately... :?: :?
Snip macro screenshot-ac2592.png
Snip macro screenshot-ac2592.png (137.17 KiB) Viewed 664 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
papyblaise
Veteran
Posts: 7864
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: A tough nut for the solver

Post by papyblaise »

voilà
Attachments
Turbine_Isolierteil3.FCStd
(22.65 KiB) Downloaded 8 times
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: A tough nut for the solver

Post by Bance »

What amuses me is that there's almost always at least twice as much geometry in these problem sketches than is necessary...
Attachments
Turbine_IsolierteilBance.FCStd
(6.52 KiB) Downloaded 8 times
User avatar
Willem
Veteran
Posts: 1852
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: A tough nut for the solver

Post by Willem »

For a solution I had to delete some equality constrains. After that I added the 4 coincident constrains. The last thing I did was completing the constrains. The original problem is the equality constrains
Batucada
Posts: 213
Joined: Mon Jul 18, 2022 9:03 am

Re: A tough nut for the solver

Post by Batucada »

drmacro wrote: Sun Aug 14, 2022 11:49 am I see them immediately... :?: :?
I hope that one day I will get the view for it. And it reassures me, I'm apparently not a hopeless talent. But it still took me some time to get behind the method to the solution. Part of the problem is that the missing coincidence is not immediately visible.
papyblaise wrote: Sun Aug 14, 2022 11:57 amvoilà
Of course, it is tempting to take the ready-made solution. But that was not what mattered to me. I studied your solution versus my approach and saw the differences. Part of my learning process was to be a little more careful in the future in the use of equality constraints. That was one aspect. The second aspect of coincidence requires knowing how to temporarily disable certain constraints everything else at @drmacro. Merci beaucoup.
Bance wrote: Sun Aug 14, 2022 12:47 pm What amuses me is that there's almost always at least twice as much geometry in these problem sketches than is necessary...
I hope I have been able to brighten your day a little.
Willem wrote: Sun Aug 14, 2022 1:06 pm For a solution I had to delete some equality constrains. After that I added the 4 coincident constrains. The last thing I did was completing the constrains. The original problem is the equality constrains
That was now a French-Dutch joint effort. Your words plus the French solution have brought me back to the path of virtue.

I hope I can return the help to the forum one day.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: A tough nut for the solver

Post by GeneFC »

I never use autoconstraints. Relying on auto instead of manual often leads to this sort of problem. One thinks that a connection has been made, but it really wasn't.

When using manual-only I know that I need to check every connection. The only reliable use of autoconstraint is for polyline.

I realize others will disagree with this. Fine, just another view.

Gene
drmacro
Veteran
Posts: 8862
Joined: Sun Mar 02, 2014 4:35 pm

Re: A tough nut for the solver

Post by drmacro »

Batucada wrote: Sun Aug 14, 2022 2:25 pm
drmacro wrote: Sun Aug 14, 2022 11:49 am I see them immediately... :?: :?
I hope that one day I will get the view for it. And it reassures me, I'm apparently not a hopeless talent. But it still took me some time to get behind the method to the solution. Part of the problem is that the missing coincidence is not immediately visible.
All I did was open the sketch and select edges and attempt to move them. And, they moved, thus the vertexes were not marked coincident.

Here I've used Sketcher validate to find them.
SketchValidate.png
SketchValidate.png (144.63 KiB) Viewed 514 times
If, as sometimes is the case, wiggling lines won't move the lines, you can go to the constraints panel a deactivate one or two constraints to allow movement.

Hmm...speaking of wiggle, there is a macro available in Addon manager called Shake Sketch for this purpose as well.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Batucada
Posts: 213
Joined: Mon Jul 18, 2022 9:03 am

Re: A tough nut for the solver

Post by Batucada »

drmacro wrote: Sun Aug 14, 2022 3:15 pm All I did was open the sketch and select edges and attempt to move them. And, they moved, thus the vertexes were not marked coincident.
After all, I'm always looking for an excuse for not seeing it.
I will do the wobble test soon, I promise....

But if you are concentrated on not making a mistake, then you are also rock-solidly convinced at the end that you really haven't made a mistake. The problem is obviously that the coincidences are not displayed. It would be nice if there were an inspection function, you select an element and then you get the constraints that belong to that element. Well, Christmas is coming soon, so maybe we can make a wish.


EDIT:
I just used the Validate Sketch tool on the file that was uploaded for the starter post. Well, I learned something again. The tool is not only able to find missing coincidences, but also to add them. I think this tool is worth a special note.
Last edited by Batucada on Sun Aug 14, 2022 5:24 pm, edited 1 time in total.
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: A tough nut for the solver

Post by Bance »

Image

No need to wait......

Sketcher_SelectConstraints
Post Reply