/* * Copyright © 2013 Keith Packard * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ load "footprint.5c" import Footprint; process_clearance = 0.26; real package_width = 5; real package_height = 5; real pad_spacing = 0.5; /* P */ real pad_height = 0.85; /* C */ real pad_width = 0.27; /* D */ real pad_center_x = 5.25 / 2; /* Gx/2 */ real pad_center_y = 5.25 / 2; /* Gy/2 */ real center_width = 3.75; /* SLx */ real center_height = 3.75; /* SLy */ real center_drill = process_drill; real center_copper = process_ring; real center_mask = 0.60 / 2; real center_space = 1.1; int num_pad = 8; /* per side */ real pad_off(int n) { return pad_spacing * (n - (num_pad - 1) / 2); } element_start("hvqfn33"); for (int pad = 0; pad < num_pad; pad++) { /* left side (1-8) */ pad_mm(-pad_center_x, pad_off(pad), pad_height, pad_width, sprintf("%d", pad + 1), sprintf("%d", pad + 1)); /* bottom (9-16) */ pad_mm(pad_off(pad), pad_center_y, pad_width, pad_height, sprintf("%d", pad + 9), sprintf("%d", pad + 9)); /* right (17-24) */ pad_mm(pad_center_x, -pad_off(pad), pad_height, pad_width, sprintf("%d", pad + 17), sprintf("%d", pad + 17)); /* top (25-32) */ pad_mm(-pad_off(pad), -pad_center_y, pad_width, pad_height, sprintf("%d", pad + 25), sprintf("%d", pad + 25)); } /* center */ center_pad((center_t) { .x = 0, .y = 0, .width = center_width, .height = center_height, .name = "33", .via_cols = 3, .via_rows = 3}); /* outline */ rect(-package_width/2, -package_height/2, package_width, package_height); dot_off = 0.3; dot_x = -package_width/2 - dot_off; dot_y = -package_height/2 - dot_off; line(dot_x, dot_y, dot_x, dot_y); element_end();