Solver issue

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: 35952
Joined: Tue Mar 17, 2015 9:14 am

Solver issue

Postby chrisb » Sat Dec 22, 2018 7:19 pm

The attached file shows unwanted behaviour.
The sketch has one DOF and can be turned around the origin. Thus it should be possible to fully constrain it with a vertical constraint (consuming one DOF) - on the selcted line:
Bildschirmfoto 2018-12-22 um 20.15.10.png
Bildschirmfoto 2018-12-22 um 20.15.10.png (28.4 KiB) Viewed 748 times
.
However, if I apply such a constraint the Sketch claims to be overconstrained.
abdullah wrote: ping
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15310 (Git)
Build type: Release
Branch: (HEAD detached at c88a64e8e)
Hash: c88a64e8e7a3bb66a23b965b655b5a5040dfa4d2
Python version: 2.7.15
Qt version: 5.11.2
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Attachments
OverUnder.FCStd
(5.06 KiB) Downloaded 17 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Posts: 4101
Joined: Sun May 04, 2014 3:16 pm

Re: Solver issue

Postby abdullah » Sun Dec 23, 2018 6:17 pm

chrisb wrote: Sat Dec 22, 2018 7:19 pm The attached file shows unwanted behaviour.
The sketch has one DOF and can be turned around the origin. Thus it should be possible to fully constrain it with a vertical constraint (consuming one DOF) - on the selcted line:Bildschirmfoto 2018-12-22 um 20.15.10.png.
However, if I apply such a constraint the Sketch claims to be overconstrained.
abdullah wrote: ping
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15310 (Git)
Build type: Release
Branch: (HEAD detached at c88a64e8e)
Hash: c88a64e8e7a3bb66a23b965b655b5a5040dfa4d2
Python version: 2.7.15
Qt version: 5.11.2
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
If I select that line and set a vertical constraint I get a green fully constrained sketch in:

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15470 (Git)
Build type: Release
Branch: master
Hash: ab916fefe74d289ff4439924a83508cad54a8c09
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15481 (Git)
Build type: DEBUG
Branch: master
Hash: 763b5c362fe4b98dca858f86f5d1353075224651
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0

I have not worked in the solver for the last half a year, so your version should be ok, but I cannot reproduce it.
chrisb
Posts: 35952
Joined: Tue Mar 17, 2015 9:14 am

Re: Solver issue

Postby chrisb » Sun Dec 23, 2018 6:41 pm

Tried on Ubuntu and still the same result. I even downloaded again from the forum - still the same.

OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15481 (Git)
Build type: Release
Branch: master
Hash: 763b5c362fe4b98dca858f86f5d1353075224651
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
OverUnder2.gif
OverUnder2.gif (48.34 KiB) Viewed 700 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Posts: 4101
Joined: Sun May 04, 2014 3:16 pm

Re: Solver issue

Postby abdullah » Sun Dec 23, 2018 6:43 pm

Sorry!! The autoremove redundant was tricking me (and it is the first time).

It would auto remove constraint 16 and wrongly report it as fully constraint even though if it was not.

It is a good example of where the current sketcher fails. Please add it to a GCS ticket, so that next year I work to improve it.

Thanks for reporting this one.
chrisb
Posts: 35952
Joined: Tue Mar 17, 2015 9:14 am

Re: Solver issue

Postby chrisb » Sun Dec 23, 2018 6:44 pm

Somehow the animated gif is not working. Can anyone see the selection and application of the vertical constraint?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Posts: 35952
Joined: Tue Mar 17, 2015 9:14 am

Re: Solver issue

Postby chrisb » Sun Dec 23, 2018 6:56 pm

Created Ticket issue #3745.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Posts: 6047
Joined: Fri Nov 09, 2018 5:38 pm

Re: Solver issue

Postby openBrain » Sun Dec 23, 2018 7:02 pm

chrisb wrote: Sun Dec 23, 2018 6:44 pm Somehow the animated gif is not working. Can anyone see the selection and application of the vertical constraint?
GIF works for some seconds then the cyclic playing seems to break and picture is frozen.
chrisb wrote: Sun Dec 23, 2018 6:56 pm Created Ticket issue #3745.
Bug not reproducible here. Vertical constraint is perfectly applied on the line and sketch turns all green with fully constrained message. ;)

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15441 (Git)
Build type: Release
Branch: master
Hash: c43adafb127f1238bedcb0d2033be3e9e8f7494e
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
abdullah
Posts: 4101
Joined: Sun May 04, 2014 3:16 pm

Re: Solver issue

Postby abdullah » Sun Dec 23, 2018 7:06 pm

openBrain wrote: Sun Dec 23, 2018 7:02 pm Bug not reproducible here. Vertical constraint is perfectly applied on the line and sketch turns all green with fully constrained message. ;)

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15441 (Git)
Build type: Release
Branch: master
Hash: c43adafb127f1238bedcb0d2033be3e9e8f7494e
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Have you unchecked "auto remove redundants"?

With it checked the result is a bad result. The sketch shows green, fully constrained, but the outer dimension is gone and now you can drag and drop the outer edge. That is at least what is happening to me.
openBrain
Posts: 6047
Joined: Fri Nov 09, 2018 5:38 pm

Re: Solver issue

Postby openBrain » Sun Dec 23, 2018 7:27 pm

abdullah wrote: Sun Dec 23, 2018 7:06 pm Have you unchecked "auto remove redundants"?

With it checked the result is a bad result. The sketch shows green, fully constrained, but the outer dimension is gone and now you can drag and drop the outer edge. That is at least what is happening to me.
I never use this option (don't like much the "auto things") but as I read your previous post, I paid attention to that. And yes, it is unchecked.
I also verified that no existing constraint gone when I apply the vertical one. And I confirm that vertical constraint is correctly applied as an extra one that allows the sketch to be fully constrained (as one may expect). ;)
chrisb
Posts: 35952
Joined: Tue Mar 17, 2015 9:14 am

Re: Solver issue

Postby chrisb » Sun Dec 23, 2018 8:07 pm

If I switch to DogLeg solver in Advanced solver control the sketch is solved as expected. LevenbergMarquardt shows the behaviour described above.

Concerning the GIF, I had enabled 5 repetitions instead of endless. I will leave it as is, since Abdullah is able to reproduce the error.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.