Invisible degrees of freedom

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
esr
Posts: 63
Joined: Sat Aug 21, 2021 9:10 pm
Location: Malvern, PA
Contact:

Invisible degrees of freedom

Post by esr »

The solver says the "support" sketch in the enclosed file has a degree of freedom left, but clicking on "1 degree" does not highlight any parts and I can't find any points or lines that will drag.

What's the next thing to try? I won't turn down a solution to this particular problem, but I'm more interested in learning what the best approach to problems like this is. Is there anywhere in the documentation that describes troubleshooting an underconstrained sketch systematically? (If there isn't, and I get a useful answer, I may write that documentation myself.)
Attachments
mjig2.FCStd
(37 KiB) Downloaded 43 times
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Invisible degrees of freedom

Post by chrisb »

If you had attached your full FreeCAD info as described in the IMPORTANT forum rules linked above, we could have seen that you use an old version. Update to 0.19 or even 0.20 with an improved Sketcher.
Your sketch is overconstraint, which is shown correctly in the current version.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
esr
Posts: 63
Joined: Sat Aug 21, 2021 9:10 pm
Location: Malvern, PA
Contact:

Re: Invisible degrees of freedom

Post by esr »

Now running today's AppImage. It did indeed tell me I had redundant constraints and I removed them,

After that I had *2* degrees of freedom and no way to diagnose them. So, same problem. What should one do when the program says there are remaining degrees of freedom but clicking on the live link in that solver message does nothing?

Furthermore, removal of the toolbar made the interface so opaque that I couldn't even figure out how to exit the program - had to run kill from another window. And when I did that, I found that it had changed the save format so my stock 0.18 can't read it.
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Invisible degrees of freedom

Post by chrisb »

esr wrote: Sat Sep 11, 2021 10:54 pm After that I had *2* degrees of freedom and no way to diagnose them. So, same problem. What should one do when the program says there are remaining degrees of freedom but clicking on the live link in that solver message does nothing?
It shows correctly some endpoints in green here. And you can always take the ends of the still white elements and try to tear them around. But even more important: Until you have more experience, don't make the sketches that complicated! And sketching only half of the sketch and use later a mirror pattern is highly recommended anyway.
Furthermore, removal of the toolbar made the interface so opaque that I couldn't even figure out how to exit the program
Why did you remove the toolbar? Usually 0.20 can use the config of 0.18. In case you face problems: You can try to reset the configuration with the button in the preferences. Another possibility is to delete your config files or to move them in case you want to restore them.
Attached the fully constrained sketch.
Attachments
mjig2_cb.FCStd
(16.37 KiB) Downloaded 30 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
esr
Posts: 63
Joined: Sat Aug 21, 2021 9:10 pm
Location: Malvern, PA
Contact:

Re: Invisible degrees of freedom

Post by esr »

chrisb wrote: Sat Sep 11, 2021 11:29 pm Why did you remove the toolbar?
I didn't. It's still there when I run 0.18.

It seems the build I have is not interpreting my config file(s) correctly.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Invisible degrees of freedom

Post by kisolre »

esr wrote: Sat Sep 11, 2021 10:54 pm I found that it had changed the save format so my stock 0.18 can't read it.
FreeCAD supports only backward compatibility - newer versions should read files written with older versions. It does not support forward compatibility - reading of files written with newer versions in older versions is not guaranteed.
User avatar
ifohancroft
Posts: 206
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: Invisible degrees of freedom

Post by ifohancroft »

After removing the constraints the solver says are redundant (I believe constraints number 50 and 49, the inner two vertical lines aren't height constrained and the width of the square on the right as well. Although if I remember correctly, if you just open its dimension and close it again, it fixes itself (just the dimension constraint (I think #50)).

Sometimes depending on the geometry and the constraints you can bug the software where it won't be able to determine degrees of freedom or it would show redundant or conflicting constraints where there should be none. I haven't been able to figure out when is that caused or by what. Usually, I fix that by going back and adding the constraints I actually care about, first (like if you are designing the metal plate for an MX switch style keyboard, one of the constraints you'd care about is the switch cutouts being 14 by 14mms and their center to center distance being 19.05mm for 1u keys, and less concerned that certain rows should be vertically aligned to one another).

The way I usually debug unconstrained sketches is by looking which geometries are left white colored and moving them to see where/how they can still move.

I have currently done this on the appimage version as the one I compiled had problems with the toolbar dissapearing sort of:

OS: Manjaro Linux (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.25288 (Git) AppImage
Build type: Release
Branch: master
Hash: bbb557aab6129efd9486d6df19f06c2976fdb7e5
Python version: 3.9.6
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

I can't exactly remember which appimage release I downloaded from GitHub, but if you'd like I can link you the FreeCAD.appimage file I am using so you can see if it works for you.
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
chrisb
Veteran
Posts: 54192
Joined: Tue Mar 17, 2015 9:14 am

Re: Invisible degrees of freedom

Post by chrisb »

ifohancroft wrote: Tue Sep 14, 2021 4:53 pm Sometimes depending on the geometry and the constraints you can bug the software where it won't be able to determine degrees of freedom or it would show redundant or conflicting constraints where there should be none. I haven't been able to figure out when is that caused or by what.
This can happen if you continue adding constraints although an error is shown. So you should fix any error immediately when it occurs in the solver messages.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Shalmeneser
Veteran
Posts: 9558
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Invisible degrees of freedom

Post by Shalmeneser »

ifohancroft wrote: Tue Sep 14, 2021 4:53 pm After removing the constraints the solver says are redundant (I believe constraints number 50 and 49, the inner two vertical lines aren't height constrained and the width of the square on the right as well.
I confirm just trying to move some points. The redundant constrain disseapear.
The sketch seems fixed, but sometimes it's possible to move some parts. The difficulty is just to find what wants to move.

The sketch Solver is not perfect and sometimes get stucked.
Post Reply