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
took me some time to set my locale on Linux, but I managed to do it. In swich locale the dot is used not the komma. I can confirm the problem ...
Re: collection of material issues
Code: Select all
# values with unit
from FreeCAD import Units
ym=Units.Quantity("210 GPa")
Units.Quantity(ym).getValueAs("MPa")
# values without unit
pr_dot="0.3"
float(pr_dot)
pr_komma="0,3"
float(pr_komma) # problem
# treat it as quantity too
pr_komma=Units.Quantity("0,3")
pr_komma.Value
Code: Select all
>>>
>>> # values with unit
>>> from FreeCAD import Units
>>> ym=Units.Quantity("210 GPa")
>>> Units.Quantity(ym).getValueAs("MPa")
210000.0
>>>
>>> # values without unit
>>> pr_dot="0.3"
>>> float(pr_dot)
0.3
>>> pr_komma="0,3"
>>> float(pr_komma) # problem
Traceback (most recent call last):
File "<input>", line 1, in <module>
ValueError: could not convert string to float: '0,3'
>>>
>>> # treat it as quantity too
>>> pr_komma=Units.Quantity("0,3")
>>> pr_komma.Value
0.3
>>>
Re: collection of material issues
Many thanks. But please also have a look at my comment https://github.com/FreeCAD/FreeCAD/comm ... t-54671579 because I think this fix is incomplete.
Re: collection of material issues
sorry I somehow missed the others ... But the way I fixed them is much more smarter and FreeCAD like IMHO.
I will adapt it to the other as well. But this will take some time, since a new arrival has taken place. It's a boy!
I will adapt it to the other as well. But this will take some time, since a new arrival has taken place. It's a boy!
Re: collection of material issues
Congratulations on your new star!!!
... I`m sure, in a few years he will ask you, what FEM is
... I`m sure, in a few years he will ask you, what FEM is
-
- Posts: 526
- Joined: Mon Feb 27, 2017 5:33 am
- Location: Australia
Re: collection of material issues
Congratulations! See you in 18 years. FreeCAD 0.32 will be out then, the topological naming will almost be merged, and we will just have received a proposal for a new logo.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: collection of material issues
Thank you very much guys ...
you forgot to mention that chrisb will have just passed 200000 posts than