add a new and improved unit conversion mechanism
The "old" method for converting units was to store numerical values alongside their units in a "Measure" struct which was then passed through the various layers of the code, from parsing to the graphics backend. The problem with that approach was that we now have a big mess where unit conversions are scattered throughout the whole codebase and it's often unclear at which point a given value should be converted. The new approach will be to convert all user-specified values into internal (unitless) numbers as soon as possible; ideally right after parsing. The conversion from all user-specifiable units to the internal unit system is clearly defined using the UnitConvMap struct. During export, all values should then be converted back from the internal unitless system to the requested output coordinate system and units. This change only adds the first parts of the new unit conversion system. The refactoring of all existing commands to use the new mechanism is yet to be done.
Loading
Please sign in to comment