1 # author: Keith Packard
2 # email: keithp@keithp.com
4 # use-license: unlimited
7 return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
14 PadSpacingX = PkgWidth
23 print '# author: Keith Packard'
24 print '# email: keithp@keithp.com'
25 print '# dist-license: GPL 2'
26 print '# use-license: unlimited'
28 print 'Element["" "UDFN-%d" "" "" 0 0 0 0 0 100 ""]' % NumPad
31 def pad(cx, cy, w, h, name, num):
49 mask = thickness + Clearance / 2
55 mm2mils100(thickness), \
56 mm2mils100(Clearance), \
58 '"%s"' % name, '"%s"' % num, '"square"]'
60 def line(x1, y1, x2, y2):
61 print ' ElementLine[',\
76 return (x - (NumX - 1)/2.0) * PadSpacingX
84 return (y - (NumY - 1)/2.0) * PadSpacingY
86 for p in range(1,NumPad+1):
87 pad(padx(p), pady(p), PadWidth, PadHeight, 'pin%i' % p, '%i' % p)
89 pad(0, 0, GroundWidth, GroundHeight, 'GND', 'GND')
91 rect(-PkgWidth / 2, -PkgHeight / 2, PkgWidth, PkgHeight)
95 # ElementLine[-11000 -1000 -3600 -1000 100]
96 # ElementLine[ 3600 -1000 11000 -1000 100]
98 # ElementLine[11000 -1000 11000 17000 100]
99 # ElementLine[11000 17000 6000 17000 100]
100 # ElementLine[ 6000 17000 4000 15000 100]
101 # ElementLine[ 4000 15000 -4000 15000 100]
102 # ElementLine[-4000 15000 -6000 17000 100]
103 # ElementLine[-6000 17000 -11000 17000 100]
104 # ElementLine[-11000 17000 -11000 -1000 100]