b56cfeab505a2ee3088c5438ebdc6fa459aab154
[hw/altusmetrum] / packages / saw.5c
1 /*
2  * Copyright © 2013 Keith Packard <keithp@keithp.com>
3  *
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.
7  *
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.
12  *
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.
16  */
17
18 load "footprint.5c";
19 import Footprint;
20
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 */
28
29 element_start("saw");
30
31 pad_mm(0, 0,
32        pad_width, pad_height,
33        "1", "1");
34
35 pad_mm(pad_x_space * 1, pad_y_space,
36        pad_width, pad_height,
37        "2", "2");
38
39 pad_mm(pad_x_space * 1, -pad_y_space,
40        pad_width, pad_height,
41        "5", "5");
42
43 pad_mm(pad_x_space * 2, pad_y_space,
44        pad_width, pad_height,
45        "3", "3");
46
47 pad_mm(pad_x_space * 2, -pad_y_space,
48        pad_width, pad_height,
49        "4", "4");
50
51 real pads_width = 3 * pad_width + 2 * pad_gap;
52 real pads_height = 2 * pad_height + pad_gap;
53
54 real extra_x = package_width - pads_width;
55 real extra_y = package_height - pads_height;
56
57 real package_x = 0 - pad_width / 2 - extra_x / 2;
58 real package_y = 0 - pad_gap / 2 - pad_height - extra_y / 2;
59
60 rect(package_x, package_y, package_width, package_height);
61
62 element_end();
63
64
65