Thanks for all the feedback! It’s being incorporated into KiPadCheck.
The units list is now:
conversion = {
'':1,
'nm':1,
'nanometer':1,
'nanometers':1,
'um':pcbnew.IU_PER_MM/1000.0,
'micron':pcbnew.IU_PER_MM/1000.0,
'microns':pcbnew.IU_PER_MM/1000.0,
'micrometer':pcbnew.IU_PER_MM/1000.0,
'micrometers':pcbnew.IU_PER_MM/1000.0,
'decimicron':pcbnew.IU_PER_MM/10000.0,
'decimicrons':pcbnew.IU_PER_MM/10000.0,
'du':pcbnew.IU_PER_MM/10000.0,
'dus':pcbnew.IU_PER_MM/10000.0,
'dum':pcbnew.IU_PER_MM/10000.0,
'dums':pcbnew.IU_PER_MM/10000.0,
'mm':pcbnew.IU_PER_MM,
'millimeter':pcbnew.IU_PER_MM,
'millimeters':pcbnew.IU_PER_MM,
'm':pcbnew.IU_PER_MM*1000,
'meter':pcbnew.IU_PER_MM*1000,
'meters':pcbnew.IU_PER_MM*1000,
'km':pcbnew.IU_PER_MM*1000000,
'kilometer':pcbnew.IU_PER_MM*1000000,
'kilometers':pcbnew.IU_PER_MM*1000000,
'thou':pcbnew.IU_PER_MILS,
'mil':pcbnew.IU_PER_MILS,
'mils':pcbnew.IU_PER_MILS,
'dmil':pcbnew.IU_PER_MILS/10.0,
'dmils':pcbnew.IU_PER_MILS/10.0,
'decimil':pcbnew.IU_PER_MILS/10.0,
'decimils':pcbnew.IU_PER_MILS/10.0,
'cmil':pcbnew.IU_PER_MILS/100.0,
'cmils':pcbnew.IU_PER_MILS/100.0,
'centimil':pcbnew.IU_PER_MILS/100.0,
'centimils':pcbnew.IU_PER_MILS/100.0,
'cm':pcbnew.IU_PER_MM*10,
'centimeter':pcbnew.IU_PER_MM*10,
'centimeters':pcbnew.IU_PER_MM*10,
'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, # inches
"'":pcbnew.IU_PER_MILS*1000.0*12, # feet
'feet':pcbnew.IU_PER_MILS*1000.0*12,
'foot':pcbnew.IU_PER_MILS*1000.0*12,
}
# squared versions of measurements (three types: 2, **2, ^2)