/* * Copyright © 2018 Bdale Garbee * * 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, either version 3 of the License, or * (at your option) any later version. * * 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, see . */ load "footprint.5c" import Footprint; real pad_width = 0.48; real pad_height = 0.32; real pad_one_height = 0.45; real pad_spacing = 0.50; /* center to center, along the pads */ real pad_center = 3.30 - pad_width; /* center to center, across the part */ real center_width = 2.10; real center_height = 2.86; real package_width = 3; real package_height = 3; real pad_x_off = pad_center / 2; real num_pad = 6; /* per side */ element_start("506CD"); real pad_off(int n) { return pad_spacing * (n - (num_pad - 1) / 2); } /* real dot_off = -.3; line(-package_width/2 + dot_off, -package_height/2 + dot_off, -package_width/2 + dot_off, -package_height/2 + dot_off); */ for (int pad = 0; pad < num_pad; pad++) { /* left side */ if (pad == 0) { pad_mm(-pad_x_off, pad_off(pad) - (pad_one_height - pad_height)/2, pad_width, pad_one_height, sprintf("%d", 1), sprintf("%d", 1)); } else { pad_mm(-pad_x_off, pad_off(pad), pad_width, pad_height, sprintf("%d", pad + 1), sprintf("%d", pad + 1)); } /* right side */ pad_mm(pad_x_off, -pad_off(pad), pad_width, pad_height, sprintf("%d", pad + num_pad + 1), sprintf("%d", pad + num_pad + 1)); } /* center pad */ pad_mm(0, 0, center_width, center_height, "13", "13"); element_end();