2 # Copyright 2010 by Bdale Garbee <bdale@gag.com>. GPLv2
4 # Program to emit PCB footprint for C&K PN22SJNA03QE DPDT switch
7 # dimensions in mm from footprint drawing at DigiKey
8 BodyWidth = 12 # body outline
18 # we're going to use the 1/100 of a mil fundamental unit form
20 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
22 print '# author: Bdale Garbee'
23 print '# email: bdale@gag.com'
24 print '# dist-license: GPL 2'
25 print '# use-license: unlimited'
27 print 'Element[0x0 "PN22SJNA03QE" "" "" 0 0 0 0 0 100 0x0]'
30 mm2mils100(-PinSpace), \
31 mm2mils100(-PinSpace/2), \
35 mm2mils100(PinDiam), \
40 mm2mils100(-PinSpace/2), \
44 mm2mils100(PinDiam), \
48 mm2mils100(PinSpace), \
49 mm2mils100(-PinSpace/2), \
53 mm2mils100(PinDiam), \
57 mm2mils100(PinSpace), \
58 mm2mils100(PinSpace/2), \
62 mm2mils100(PinDiam), \
67 mm2mils100(PinSpace/2), \
71 mm2mils100(PinDiam), \
75 mm2mils100(-PinSpace), \
76 mm2mils100(PinSpace/2), \
80 mm2mils100(PinDiam), \
84 mm2mils100(-MntWidth/2), \
85 mm2mils100(MntHeight/2), \
89 mm2mils100(MntDiam), \
93 mm2mils100(MntWidth/2), \
94 mm2mils100(-MntHeight/2), \
98 mm2mils100(MntDiam), \
101 print ' ElementLine[',\
102 -mm2mils100(BodyWidth/2), \
103 -mm2mils100(BodyHeight/2), \
104 mm2mils100(BodyWidth/2), \
105 -mm2mils100(BodyHeight/2), \
108 print ' ElementLine[',\
109 -mm2mils100(BodyWidth/2), \
110 -mm2mils100(BodyHeight/2), \
111 -mm2mils100(BodyWidth/2), \
112 mm2mils100(BodyHeight/2), \
115 print ' ElementLine[',\
116 -mm2mils100(BodyWidth/2), \
117 mm2mils100(BodyHeight/2), \
118 mm2mils100(BodyWidth/2), \
119 mm2mils100(BodyHeight/2), \
122 print ' ElementLine[',\
123 mm2mils100(BodyWidth/2), \
124 mm2mils100(BodyHeight/2), \
125 mm2mils100(BodyWidth/2), \
126 -mm2mils100(BodyHeight/2), \