2 # Copyright 2011 by Bdale Garbee <bdale@gag.com>. GPLv2
4 # Program to emit PCB footprint for
5 # Sullins Connector Solutions single row 0.050" header pins
7 # Needs pin count on command line, in range of 2..50
15 # we're going to use the 1/100 of a mil fundamental unit form
17 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
19 pins = int(sys.argv[1])
21 sys.stderr.write('Must be at least 2 pins\n')
24 sys.stderr.write('Must be no more than 15 pins\n')
27 print ('# author: Bdale Garbee')
28 print ('# email: bdale@gag.com')
29 print ('# dist-license: GPL 2')
30 print ('# use-license: unlimited')
32 print ('Element[0x0 "50mil%ipin"' % pins,'"" "" 0 0 0 0 0 100 0x0]')
34 for pin in range (1,pins+1):
35 pinnum = pins + 1 - pin
41 mm2mils100((pins-1)*PinSpacing - (pin-1)*PinSpacing), \
47 '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']')