FEM Pipeline units on last dev versions

About the development of the FEM module/workbench.

Moderator: bernd

wmayer
Founder
Posts: 18785
Joined: Thu Feb 19, 2009 10:32 am

Re: FEM Pipeline units on last dev versions

Post by wmayer »

user1234 wrote: Fri May 27, 2022 7:35 pm I do not see the exponent. So it is useless.
Do you have a high-resolution monitor? In my monitor (with normal resolution) I can always see the full text -- even if the numbers have 10 digits or more -- and there is still enough space to the right border of the window. Only when I resize the window to a very small width it starts to truncate the numbers.
User avatar
uwestoehr
Veteran
Posts: 4251
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

wmayer wrote: Sat May 28, 2022 10:15 am Do you have a high-resolution monitor?
I tested on two 15 inch laptop monitors, one with Hi-DPI, the other one not. Then a third PC with an older 17 inch screen and even my second development PC with a big screen but no Hi-DPI. On non of them I can see 4 digits + the exponent, on 2 note even 3 digits + exponent.
So this is a rather big issue and I first realize this now.

Looking at the code, we hardcode the gradient colorbox position and ignore that the numbers can have different lengths.

I tried to fix this and I think the proper solution would be to calculate "LeftShift" (see this PR: https://github.com/FreeCAD/FreeCAD/pull/6925) according to the width of the label text and not just by numbers.

The labels are an SoGroup and every label is an SoNode and both data types provide the bounding box but I could not find out how to read the bounding box. One has to read it into an action but I could not properly initialize this action. Any hint how to get it right is very welcome.
wmayer
Founder
Posts: 18785
Joined: Thu Feb 19, 2009 10:32 am

Re: FEM Pipeline units on last dev versions

Post by wmayer »

user1234
Veteran
Posts: 1675
Joined: Mon Jul 11, 2016 5:08 pm

Re: FEM Pipeline units on last dev versions

Post by user1234 »

uwestoehr wrote: Fri May 27, 2022 11:38 pm Can you please attach your file?
Maybe too late (i made the mesh more rougher, but you still need to remesh the mesh), but here, see Displacement --> Magnitude:
test.FCStd
(391.37 KiB) Downloaded 11 times
Maybe it is a bug, because the placement in X, Y, and Z works.



wmayer wrote: Sat May 28, 2022 9:53 am

Code: Select all

Traceback (most recent call last):
  File "/home/user/Projects/build_clang/Mod/Fem/femviewprovider/view_result_mechanical.py", line 70, in onDelete
    bodyMessage += "\n" + obj.Label
<class 'AttributeError'>: 'NoneType' object has no attribute 'Label'
This is because the function claimChildren() returns a list where an element is None.

EDIT2:
git commit a80d9e5ef8
Sorry for the incorrect coping from the error message. Anyway it works now, thanks!



wmayer wrote: Sat May 28, 2022 10:15 am Do you have a high-resolution monitor?
I do not know, what high resolution is, but i have a 4K Monitor with 138ppi. I often split the programs in the screen.



uwestoehr wrote: Sat May 28, 2022 11:47 am I tried to fix this and I think the proper solution would be to calculate "LeftShift" (see this PR: https://github.com/FreeCAD/FreeCAD/pull/6925) according to the width of the label text and not just by numbers.
What is the difference of both PR? I compiled both and the behavior seems ident, btw: both have a little jump (sam jump size) in it, but that is a really minor thing.
1.webm
(352.51 KiB) Downloaded 9 times

With seeing the exponents, at least i can live till the next release.


Greetings
user1234
User avatar
uwestoehr
Veteran
Posts: 4251
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

user1234 wrote: Sun May 29, 2022 7:24 pm What is the difference of both PR?
Mine was just an attempt, the other one actually works :P

Concerning the jump you encountered when changing the widow size this is fixes by this change on top of the PR:
https://github.com/FreeCAD/FreeCAD/pull ... 1140549942
User avatar
uwestoehr
Veteran
Posts: 4251
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

user1234 wrote: Sun May 29, 2022 7:24 pm test.FCStd
That you see "0.000" is because you need to increase the precision:
- double-click on the color bar and change the decimals to 6

However, there is a bug that the decimal settings is not taken into account: When max - min < 1/decimals, we must use scientific notation I will have a look.
User avatar
uwestoehr
Veteran
Posts: 4251
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

uwestoehr wrote: Mon May 30, 2022 12:14 am However, there is a bug that the decimal settings is not taken into account: When max - min < 1/decimals, we must use scientific notation I will have a look.
Fixed: https://github.com/FreeCAD/FreeCAD/commit/79c218ad9
User avatar
uwestoehr
Veteran
Posts: 4251
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: FEM Pipeline units on last dev versions

Post by uwestoehr »

Some fixes are in, please give current master a try if you now always see a sensible label number and they are always visible.

I see now with master these 2 issues left to be fixed:

A (even neglectable)
- make the main window higher than wider
- double-click on the gradient bar and change the number of decimals
result:
FreeCAD_eHLfCqpmrd.gif
FreeCAD_eHLfCqpmrd.gif (248.23 KiB) Viewed 623 times

B (also minor)
- set the number of decimals to zero
result: you get a decimal dot at the end of the numbers:
FreeCAD_CyLke1ETKi.png
FreeCAD_CyLke1ETKi.png (23.94 KiB) Viewed 618 times
wmayer
Founder
Posts: 18785
Joined: Thu Feb 19, 2009 10:32 am

Re: FEM Pipeline units on last dev versions

Post by wmayer »

user1234 wrote: Sun May 29, 2022 7:24 pm I do not know, what high resolution is, but i have a 4K Monitor with 138ppi. I often split the programs in the screen.
https://doc.qt.io/qt-5/highdpi.html
What is the difference of both PR?
With mine the real bounding box of color bar and label is computed.
wmayer
Founder
Posts: 18785
Joined: Thu Feb 19, 2009 10:32 am

Re: FEM Pipeline units on last dev versions

Post by wmayer »

uwestoehr wrote: Mon May 30, 2022 2:15 am - double-click on the gradient bar and change the number of decimals
Fixed with git commit c5296fbb925
Post Reply