2 * Copyright © 2013 Bdale Garbee <bdale@gag.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.
22 real center_gap = 6.00;
25 real rf_pad_width = 0.8;
26 real misc_pad_width = 1.1;
27 real pad_height = 2.3;
28 real pad_spacing = 2.54;
30 int num_pad = total_pad / 2; /* per side */
32 string name = sprintf ("G6Z-1F");
34 real package_width = 20.0;
35 real package_height = 8.6;
37 real pad_y_off = center_gap / 2 + pad_height / 2;
42 return pad_spacing * (n - (num_pad - 1) / 2);
45 real corner(int dx, int dy) {
46 real x = dx * package_width / 2;
47 real y = dy * package_height / 2;
50 line(x, y, x - dx * len, y);
51 line(x, y, x, y - dy * len);
61 line(-package_width/2 + dot_off, package_height/2 - dot_off,
62 -package_width/2 + dot_off, package_height/2 - dot_off);
64 for (int pad = 0; pad < num_pad; pad++) {
65 /* bottom (1-num_pad) */
68 pad_width = rf_pad_width;
70 pad_width = misc_pad_width;
72 if (pad != 1 && pad != 5) {
77 sprintf("%d", pad + 1),
78 sprintf("%d", pad + 1));
81 /* top side (total_pad - num_pad+1) */
83 if (pad == 0 || pad == 6) {
84 pad_width = rf_pad_width;
86 pad_width = misc_pad_width;
94 sprintf("%d", total_pad - pad),
95 sprintf("%d", total_pad - pad));