collection of material issues
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: collection of material issues
issue #2866
The problem is, the material editor does change the material properties to the value shown in the input field, even if the value is not edited by the user. The design of the treeview should be improved in this regard.
The problem is, the material editor does change the material properties to the value shown in the input field, even if the value is not edited by the user. The design of the treeview should be improved in this regard.
Re: collection of material issues
git commit 1b8244580e4a it does not fix the source of the problem but it improve the situation a lot.
Re: collection of material issues
It works for the user defined properties for a simple reason. A text edit widget is used. Thus everything could be inserted and the widget is not smart at all. No help with the unit nothing. What is entered is accepted.
Re: collection of material issues
Many thanks!
I recompiled the latest master and here the issue is still that the dot "." in the values is ignored. The issue is definitely not that the dot is taken wrongly as thousands separator, it is treated as not existing.
This is my system:
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25275 (Git)
Build type: Release
Branch: master
Hash: f20e29a04c1a539217eb7ef081b94d9526823e15
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)
When I find time, I can try to have a look but you know that I am no Pythionist but a C++ guy so I cannot promise I'll find the cause. (I need a debugger but don't know how to debug Python scripts).
I recompiled the latest master and here the issue is still that the dot "." in the values is ignored. The issue is definitely not that the dot is taken wrongly as thousands separator, it is treated as not existing.
This is my system:
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25275 (Git)
Build type: Release
Branch: master
Hash: f20e29a04c1a539217eb7ef081b94d9526823e15
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)
When I find time, I can try to have a look but you know that I am no Pythionist but a C++ guy so I cannot promise I'll find the cause. (I need a debugger but don't know how to debug Python scripts).
Re: collection of material issues
I did not know. I have some minor Gui issues in the FreeCAD VTK PostProcessing which I am not able to solve. Would you help with them? They are very small but one needs to understand the C++ Gui code, which I did not in the time range I used for it.
cheers bernd
Re: collection of material issues
I can try to have a look.
By the way, the FEM dialogs are on my ToDo list too because every FEM constraint dialog behaves different and that annoyed me when I need to be quick.
However, my spare time is limited at the moment. I will send you a message when I have time so that you describe me the VTK issue.
Re: collection of material issues
Back to the topic: The main bug with the material card handling is indeed that it does not take the locale setting into account.
I have German locale and therefore the comma is the decimal separator. The FCMat files store the values with the dot as decimal separator and the material card handling does not take this into account.
Here is a material card where I used the comma as decimal separator:
With this everything works fine - clicking on a value in the material card dialog does not change anything.
With the same material card which uses dot as decimal separator, the material card dialog is almost unusable for practical work:
Bernd, you as a Pythionist, could you please have a look if the dot <-> comma change is either simply not yet implemented or if there is a bug?
I have German locale and therefore the comma is the decimal separator. The FCMat files store the values with the dot as decimal separator and the material card handling does not take this into account.
Here is a material card where I used the comma as decimal separator:
With this everything works fine - clicking on a value in the material card dialog does not change anything.
With the same material card which uses dot as decimal separator, the material card dialog is almost unusable for practical work:
Bernd, you as a Pythionist, could you please have a look if the dot <-> comma change is either simply not yet implemented or if there is a bug?
Re: collection of material issues
Bernd, could you already find time to have a look?
This is a severe issue for all users whose locale uses comma as decimal separator.
To test, all you do it to start FreeCAD with a locale so that you see comma as decimal separator in the FC dialogs. Here an example:
This is my test file I used in the screencast: This is the error message I got in the above screencast:
This is a severe issue for all users whose locale uses comma as decimal separator.
To test, all you do it to start FreeCAD with a locale so that you see comma as decimal separator in the FC dialogs. Here an example:
This is my test file I used in the screencast: This is the error message I got in the above screencast:
Code: Select all
17:23:38 Traceback (most recent call last):
17:23:38 File "D:\FreeCAD-build\Mod\Fem\femtaskpanels\task_material_common.py", line 591, in pr_changed
17:23:38 self.update_material_property(
17:23:38 File "D:\FreeCAD-build\Mod\Fem\femtaskpanels\task_material_common.py", line 548, in update_material_property
17:23:38 value = float(inputfield_text)
17:23:38 ValueError: could not convert string to float: '0,200'
Re: collection of material issues
I could fix this issue and made a tentative PR:
https://github.com/FreeCAD/FreeCAD/pull/4956
My Python knowledge is rudimentary, can you therefore please check if this is correct?
Re: collection of material issues
I am on the way. There migth be a better solution if a quantity is inside. Instead float() try ().Value like here
https://github.com/FreeCAD/FreeCAD/blob ... eometry.py
line 57 and 57
https://github.com/FreeCAD/FreeCAD/blob ... eometry.py
line 57 and 57