2 * Copyright © 2013 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.25; /* mm */
22 real pad_height = 0.325; /* mm */
23 real pad_x_space = 0.50; /* space between pad centers mm */
24 real pad_y_space = 0.575/2; /* space between pad centers mm */
25 real pad_gap = 0.25; /* space between pads mm */
26 real package_width = 1.40; /* mm */
27 real package_height = 1.00; /* mm */
32 pad_width, pad_height,
35 pad_mm(pad_x_space * 1, pad_y_space,
36 pad_width, pad_height,
39 pad_mm(pad_x_space * 1, -pad_y_space,
40 pad_width, pad_height,
43 pad_mm(pad_x_space * 2, pad_y_space,
44 pad_width, pad_height,
47 pad_mm(pad_x_space * 2, -pad_y_space,
48 pad_width, pad_height,
51 real pads_width = 3 * pad_width + 2 * pad_gap;
52 real pads_height = 2 * pad_height + pad_gap;
54 real extra_x = package_width - pads_width;
55 real extra_y = package_height - pads_height;
57 real package_x = 0 - pad_width / 2 - extra_x / 2;
58 real package_y = 0 - pad_gap / 2 - pad_height - extra_y / 2;
60 rect(package_x, package_y, package_width, package_height);