Meters per file unit
64-bitThe conversion factor for each unit system a 3DM file can name.
meters = file value × factor
Inch 0.0254, foot 0.3048, yard 0.9144, mile 1609.344 and the metric steps are exact. Point and pica are written as 0.0254 ÷ 72 and 0.0254 ÷ 6. The parsec is written 3.0856776e16, which is rounded; astronomical unit and light year are given to their defined values.
export const UNITS = {
0: ['none', 1], 1: ['um', 1e-6], 2: ['mm', 1e-3], 3: ['cm', 1e-2], 4: ['m', 1], 5: ['km', 1e3], 6: ['uin', 2.54e-8], 7: ['mil', 2.54e-5],
8: ['in', 0.0254], 9: ['ft', 0.3048], 10: ['mi', 1609.344], 12: ['A', 1e-10], 13: ['nm', 1e-9], 14: ['dm', 0.1], 15: ['dam', 10],
16: ['hm', 100], 17: ['Mm', 1e6], 18: ['Gm', 1e9], 19: ['yd', 0.9144], 20: ['pt', 0.0254 / 72], 21: ['pc', 0.0254 / 6],
22: ['nmi', 1852], 23: ['au', 1.495978707e11], 24: ['ly', 9.4607304725808e15], 25: ['pc', 3.0856776e16],
};