unexplainable out of scope warning

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!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

unexplainable out of scope warning

Post by uwestoehr »

Working on a simple FEM model:
trial3_transient.FCStd
(33.23 KiB) Downloaded 24 times
I get permanently a warning when I close the constraint transform dialog:

Code: Select all

Fem::ConstraintTransform: Link(s) to object(s) 'Pad' go out of the allowed scope 'ConstraintTransform'. Instead, the linked object(s) reside within 'Body Body'.
I already spent some time on this but don't understand what the message means nor how to fix it.
Has anybody an idea - at least what the message actually means?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: unexplainable out of scope warning

Post by wmayer »

Look at the dependency graph. The ConstraintTransform object has two references to the Body object. The line is orange because the scope of the link property RefDispl is "Local" and is outside the body. This triggers the above warning when recomputing it.

To fix it set the scope to Global in the constructor of ConstraintTransform:

Code: Select all

RefDispl.setScope(App::LinkScope::Global);
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: unexplainable out of scope warning

Post by uwestoehr »

wmayer wrote: Mon Mar 27, 2023 5:24 pm Look at the dependency graph.
OK. I had to install an external software to do this.
Unfortunately I cannot bundle it with FreeCAD because the program requires admin privileges (I see no technical reason why btw.)
This is odd because then only those who can convince their admin that they need this tool, get it.

wmayer wrote: Mon Mar 27, 2023 5:24 pm To fix it set the scope to Global in the constructor of ConstraintTransform:

Code: Select all

RefDispl.setScope(App::LinkScope::Global);
Many thanks! I included this now in https://github.com/FreeCAD/FreeCAD/pull/9087
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: unexplainable out of scope warning

Post by adrianinsaval »

uwestoehr wrote: Mon Mar 27, 2023 10:24 pm Unfortunately I cannot bundle it with FreeCAD because the program requires admin privileges (I see no technical reason why btw.)
This is odd because then only those who can convince their admin that they need this tool, get it.
what do you mean? graphviz has a zip file available at their downloads page: https://graphviz.org/download/
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: unexplainable out of scope warning

Post by uwestoehr »

adrianinsaval wrote: Tue Mar 28, 2023 6:22 pm what do you mean? graphviz has a zip file available at their downloads page: https://graphviz.org/download/
Many thanks, I only saw the .exe and this requires admin privileges.
So ideally the Win installer should bundle Graphviz. I will have a look but won't have time until the 0.20.3 release.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: unexplainable out of scope warning

Post by adrianinsaval »

looking more closely the zip file is the 32bit version, don't thik that's a problem really but if you want the 64 bit version it should also be possible to extract the contents of the installer (you can open it with 7zip) and ship that with the libpack, installing is likely just a convenience. Or there's also an msys 64bit version listed in the gitlab releases page: https://gitlab.com/graphviz/graphviz/-/releases

btw, damn their packaging is impressive :shock: they offer an absurd amount of variants.
Post Reply