Open epignatelli opened 5 years ago
@al-fisher @tg359 this now also involves wrapping an external tool to take care of the math, if I am not wrong?
Resorting to 3.1 MVP if so, and we solve it as a whole. Otherwise I can take care of creating a proof of concept from the UI side.
Yep - this will depend on the Units_Engine in the Localisation_Toolkit. @tg359 and all discussed and agreed wrapping UnitsNet
Resorting to 3.1 MVP if so, and we solve it as a whole. Otherwise I can take care of creating a proof of concept from the UI side.
Bumped to 3.1 for you - worth doing formal coordinated effort rather than quick proof of concept!
Ok! Thanks Al! I assigned @tg359 to the issue as well, to make sure we coordinate when we start doing this!
Created new issue here https://github.com/BHoM/Localisation_Toolkit/issues/18 which this is dependant on and to start planning next steps on this
This is now handled I think via the Quantities attributes and the use of Localisation_Toolkit for conversions so closing this issue but feel free to reopen if any element has not been completed satisfactorily 😄
Actually only think one half of this issue has been handled - the matter of displaying units.
To ease the way we perform calculation, and remove the extra step of manually moving from one unit to the other (e.g. N/mm2 to KN/m2)
Is still not resolved (enabling unit conversions from UI into methods). Think we should keep this open
Description:
This issue is to capture our thoughts around the unit conversion in one of the last coordination calls. A common use case with the BHoM, especially in the
Structure
namespace is to do some unit manipulation before inputting the numbers in the method.To make this a bit smoother we can provide a way to input the unit of the scalar we are using. This can be solved in different ways according to the UI we use (flow-base and tabular). The main problem we want to solve is two-fold:
A. Flow-base @ZiolkowskiJakub @epignatelli In grasshopper, we can add another element to the menu of the parameter which allows you to specify the input unit. This will require two main implementations:
Name
of theParamInfo
will then add a suffix of the form[unit]
and it will be serialised in theParamInfo
itself.FromSI
and aToSI
method that scales the scalar into the right unit. Return format of any method, regardless of the unit of the inputs has be be SI.B. Tabular @awakeman In Excel, the situation is a little different. We can leverage the
format
option of a cell to change the order of magnitude of the display. This is mainly to support the fact that the excel spreadsheet that users use for calculations is also the mean to report the work to the client. Excel can use the same Engine method of the flow-based side to go back and forth SI.@al-fisher @adecler @IsakNaslundBh @alelom @FraserGreenroyd