missing units in value expression parser
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
missing units in value expression parser
For simulations it is useful if one could use the unit that is commonly used in the sciences field one is working in. FreeCAD supports interestingly units I have never heard of but missed very basic units like Volt.
I described the currently supported units and also created a table with units I miss:
https://www.freecadweb.org/wiki/Expressions#Units
Please review them and if you say a certain unit will not be implemented I will remove it from the list. For the remaining units I would open an enhancement request.
I described the currently supported units and also created a table with units I miss:
https://www.freecadweb.org/wiki/Expressions#Units
Please review them and if you say a certain unit will not be implemented I will remove it from the list. For the remaining units I would open an enhancement request.
Re: missing units in value expression parser
[wikisection][/wikisection]Have you read Units FreeCAD supports any unit which can be made from the seven base units. More about the metric unit system https://en.m.wikipedia.org/wiki/Metric_system
Adding a new unit is not difficault.
Adding a new unit is not difficault.
Re: missing units in value expression parser
Well, the wiki page seems to be outdated. it links to non-existing pages etc. However, the point is that FC's reality is that there are a lot of weird units defined (e.g. "Stone") while very common units like the Volt is not. There is also an inconsistency of that e.g. km is supported while kJ is not.
As I read the comments in the forum, users like to use the common units of their working field. So despite candela is the base unit, people like to use lumen instead of cd*sr.
I opened this thread to collect what should be supported and what not. I also opened the thread to overcome the inconsistencies. I think the best solution for the latter is, that the parser connects a "k" with the following sequence - if this sequence is a known one. Then it would no longer necessary to add explicit definitions for the most used amount prefixes (n, µ/mu, m, k, M, G) in combinations with all units. I mean Volt is not a base unit but a very common one. And of course there are people needing mV, others need kV.
What do you think about this proposal?
Re: missing units in value expression parser
There seams a simple reason for this, only the units which are used somewhwere in FreeCAD are implemented. If it is not implemented noone has needed the unit volt somewhere in FreeCAD. I only have added the units we really need in FEM or in the material editor.
Re: missing units in value expression parser
In the regard of this n, m, c, d, k ... this seams reasonable make this available to all units without the nedd to define it for every unit. But needs someone with knowledge of the internals of FreeCAD Unit system who has time and interest to implement this.
Re: missing units in value expression parser
BTW: do you need volt somewhere in FreeCAD or is it just.an example of a well known unit not implemented in FreeCAD.
Re: missing units in value expression parser
I know. my spare time is too limited and I already promised too many things I could not deliver. So I will open at least an enhancement request that this won't be forgotten.
I wanted to use it in the material card dialog. I noticed that is currently only half-implemented. So it is the code but does not yet work. A fix is in my ToDo list.
However, I stumbled over the units issue because of the material card dialog. I wanted to use units that are common in my working field but units like Tesla are not recognized for a electromagnetic simulations. A colleague asked my if he could do such simulations with FreeCAD, thus I played a bit around.
Re: missing units in value expression parser
@uwestoehr thanks. Do you mind also pre-pending "Ticket #4037 - " to this forum thread
thanks in advance
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs