load "footprint.5c"
import Footprint;
-process_clearance = 0.25;
+process_clearance = 0.26;
real package_width = 5;
real package_height = 5;
real center_width = 3.75; /* SLx */
real center_height = 3.75; /* SLy */
-real center_drill = 0.30;
+real center_drill = process_drill;
+real center_copper = process_ring;
real center_mask = 0.60 / 2;
real center_space = 1.1;
element_start("hvqfn33");
-for (pad = 0; pad < num_pad; pad++) {
+for (int pad = 0; pad < num_pad; pad++) {
/* left side (1-8) */
pad_mm(-pad_center_x,
/* center */
-pad_mm_clear_mask_options(0, 0, center_width, center_height, process_clearance, 0,
- "33", "33", "square,nopaste");
-
-
-real clear_top = center_space * 0.5 + center_mask;
-real clear_bottom = center_height / 2;
-real clear_height = clear_bottom - clear_top;
-real clear_y = (clear_top + clear_bottom) / 2;
-
-for (y = -1; y <= 1; y+= 2) {
- pad_mm_clear_mask_options(0, y * clear_y, center_width, clear_height,
- 0, clear_height, "33", "33", "square,nopaste");
-
- pad_mm_clear_mask_options(y * clear_y, 0, clear_height, center_height,
- 0, clear_height, "33", "33", "square,nopaste");
-}
-
-real hole_pos = 0.5 * center_space;
-real strip_top = -hole_pos + center_mask;
-real strip_bot = hole_pos - center_mask;
-real strip_size = strip_bot - strip_top;
-
-pad_mm_clear_mask_options(0, 0, center_width, strip_size,
- 0, strip_size, "33", "33", "square,nopaste");
-
-pad_mm_clear_mask_options(0, 0, strip_size, center_height,
- 0, strip_size, "33", "33", "square,nopaste");
-
-/* center solder spots */
-
-for (y = -1; y <= 1; y += 1) {
- for (x = -1; x <= 1; x += 1) {
- pad_mm_clear_mask_options(x * center_space, y * center_space,
- center_mask*2, center_mask*2, 0, center_mask * 2, "33", "33", "");
- }
-}
-
-/* center holes */
-
-for (y = -0.5; y <= 0.5; y += 1) {
- for (x = -0.5; x <= 0.5; x += 1) {
- pin_mm_clear_mask_options(x * center_space, y * center_space,
- center_drill, center_mask/2, 0, 0, "33", "33",
- "square,via");
- }
-}
+center_pad((center_t) {
+ .x = 0,
+ .y = 0,
+ .width = center_width,
+ .height = center_height,
+ .name = "33",
+ .via_cols = 3,
+ .via_rows = 3});
/* outline */