2 * Copyright © 2012 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 real pad_width = 0.55;
22 real corner_pad_width = 0.50;
23 real pad_height = 0.30;
24 real corner_pad_notch = 0.12;
25 real pad_spacing = 0.50;
27 real pad_x_off = 3.20 / 2;
28 real pad_y_off = 3.20 / 2;
30 real package_width = 4;
31 real package_height = 4;
33 real num_pad = 7; /* per side */
35 element_start("ufqfpn-28");
38 return pad_spacing * (n - (num_pad - 1) / 2);
41 real corner(int dx, int dy) {
42 real x = dx * package_width / 2;
43 real y = dy * package_height / 2;
46 line(x, y, x - dx * len, y);
47 line(x, y, x, y - dy * len);
57 line(-package_width/2 + dot_off, -package_height/2 + dot_off,
58 -package_width/2 + dot_off, -package_height/2 + dot_off);
60 for (int pad = 0; pad < num_pad; pad++) {
68 if (pad == 0 || pad == num_pad-1)
71 for (int s = 0; s <= nstep; s++) {
73 real step = (corner_pad_notch) / nstep;
75 pw = corner_pad_width - (nstep - s) * step;
76 ph = pad_height - s * step*2/3;
80 pha = pad_height - ph;
86 pad_mm(-pad_x_off - pw / 2 - pwa,
90 sprintf("%d", pad + 1),
91 sprintf("%d", pad + 1));
95 pad_mm(pad_off(pad) + pha,
96 pad_y_off + pw / 2 + pwa,
99 sprintf("%d", pad + 8),
100 sprintf("%d", pad + 8));
102 /* right side (15-21) */
104 pad_mm(pad_x_off + pw / 2 + pwa,
108 sprintf("%d", pad + 15),
109 sprintf("%d", pad + 15));
113 pad_mm(-pad_off(pad) - pha,
114 -pad_y_off - pw / 2 - pwa,
117 sprintf("%d", pad + 22),
118 sprintf("%d", pad + 22));