collection of material issues

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: collection of material issues

Post by bernd »

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 ...
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: collection of material issues

Post by bernd »

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
>>> 
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: collection of material issues

Post by bernd »

User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of material issues

Post by uwestoehr »

bernd wrote: Mon Aug 09, 2021 1:03 pm git commit 1f38d89cc45c
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.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: collection of material issues

Post by bernd »

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! 8-)
cad1234
Posts: 331
Joined: Fri Dec 28, 2018 11:11 am

Re: collection of material issues

Post by cad1234 »

Congratulations on your new star!!!
... I`m sure, in a few years he will ask you, what FEM is ;)
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: collection of material issues

Post by Laurie Hartley »

bernd wrote: Sat Aug 14, 2021 10:05 pm 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! 8-)
Congratulations Bernd
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: collection of material issues

Post by chrisb »

bernd wrote: Sat Aug 14, 2021 10:05 pmIt's a boy! 8-)
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.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: collection of material issues

Post by bernd »

Thank you very much guys ... 8-) :D


chrisb wrote: Sun Aug 15, 2021 12:03 pm
bernd wrote: Sat Aug 14, 2021 10:05 pmIt's a boy! 8-)
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.
you forgot to mention that chrisb will have just passed 200000 posts than :mrgreen:
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: collection of material issues

Post by bernd »

Post Reply