I’m working on several scripts that will have units specified by the user. Am I missing any common measurement units or variations?
'nm':1,
'nano':1,
'nanometer':1,
'um':pcbnew.IU_PER_MM/1000.0,
'micron':pcbnew.IU_PER_MM/1000.0,
'micrometer':pcbnew.IU_PER_MM/1000.0,
'mm':pcbnew.IU_PER_MM,
'millimeter':pcbnew.IU_PER_MM,
'milli':pcbnew.IU_PER_MM,
'm':pcbnew.IU_PER_MM,
'mil':pcbnew.IU_PER_MILS,
'mils':pcbnew.IU_PER_MILS,
'in':pcbnew.IU_PER_MILS*1000.0,
'inch':pcbnew.IU_PER_MILS*1000.0,
'inches':pcbnew.IU_PER_MILS*1000.0,
"'":pcbnew.IU_PER_MILS*1000.0*12, # feet
'"':pcbnew.IU_PER_MILS*1000.0, # inches
# squared versions of measurements (three types: 2, **2, ^2)
'nm2':1
'nano2':1,
'nanometer2':1,
'um2':(pcbnew.IU_PER_MM/1000.0)**2,
'micron2':(pcbnew.IU_PER_MM/1000.0)**2,
'micrometer2':(pcbnew.IU_PER_MM/1000.0)**2,
'mm2':(pcbnew.IU_PER_MM)**2,
'millimeter2':(pcbnew.IU_PER_MM)**2,
'milli2':(pcbnew.IU_PER_MM)**2,
'm2':(pcbnew.IU_PER_MM)**2,
'mil2':(pcbnew.IU_PER_MILS)**2,
'mils2':(pcbnew.IU_PER_MILS)**2,
'in2':(pcbnew.IU_PER_MILS*1000.0)**2,
'inch2':(pcbnew.IU_PER_MILS*1000.0)**2,
'inches2':(pcbnew.IU_PER_MILS*1000.0)**2,
"'2":(pcbnew.IU_PER_MILS*1000.0*12)**2, # feet
'"2':(pcbnew.IU_PER_MILS*1000.0)**2, # inches
'nm**2':1
'nano**2':1,
'nanometer**2':1,
'um**2':(pcbnew.IU_PER_MM/1000.0)**2,
'micron**2':(pcbnew.IU_PER_MM/1000.0)**2,
'micrometer**2':(pcbnew.IU_PER_MM/1000.0)**2,
'mm**2':(pcbnew.IU_PER_MM)**2,
'millimeter**2':(pcbnew.IU_PER_MM)**2,
'milli**2':(pcbnew.IU_PER_MM)**2,
'm**2':(pcbnew.IU_PER_MM)**2,
'mil**2':(pcbnew.IU_PER_MILS)**2,
'mils**2':(pcbnew.IU_PER_MILS)**2,
'in**2':(pcbnew.IU_PER_MILS*1000.0)**2,
'inch**2':(pcbnew.IU_PER_MILS*1000.0)**2,
'inches**2':(pcbnew.IU_PER_MILS*1000.0)**2,
"'**2":(pcbnew.IU_PER_MILS*1000.0*12)**2, # feet
'"**2':(pcbnew.IU_PER_MILS*1000.0)**2, # inches
'nm^2':1
'nano^2':1,
'nanometer^2':1,
'um^2':(pcbnew.IU_PER_MM/1000.0)**2,
'micron^2':(pcbnew.IU_PER_MM/1000.0)**2,
'micrometer^2':(pcbnew.IU_PER_MM/1000.0)**2,
'mm^2':(pcbnew.IU_PER_MM)**2,
'millimeter^2':(pcbnew.IU_PER_MM)**2,
'milli^2':(pcbnew.IU_PER_MM)**2,
'm^2':(pcbnew.IU_PER_MM)**2,
'mil^2':(pcbnew.IU_PER_MILS)**2,
'mils^2':(pcbnew.IU_PER_MILS)**2,
'in^2':(pcbnew.IU_PER_MILS*1000.0)**2,
'inch^2':(pcbnew.IU_PER_MILS*1000.0)**2,
'inches^2':(pcbnew.IU_PER_MILS*1000.0)**2,
"'^2":(pcbnew.IU_PER_MILS*1000.0*12)**2, # feet
'"^2':(pcbnew.IU_PER_MILS*1000.0)**2, # inches