Fix process-specific values in nickle-generated footprints
[hw/altusmetrum] / packages / hvqfn33.5c
index bcdf62eec96e87c5f93840bd2b0fb63ea9ed5b0c..a7cf11a154148bc6b918f9e12861295c046050c0 100644 (file)
@@ -31,7 +31,8 @@ real pad_center_y = 5.25 / 2; /* Gy/2 */
 real center_width = 3.75;      /* SLx */
 real center_height = 3.75;     /* SLy */
 
-real center_drill = 0.015 * 25.4;
+real center_drill = process_drill;
+real center_copper = process_ring;
 real center_mask = 0.60 / 2;
 
 real center_space = 1.1;
@@ -44,7 +45,7 @@ real pad_off(int n) {
 
 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,
@@ -84,52 +85,14 @@ for (pad = 0; pad < num_pad; pad++) {
 
 /* 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, 0.012 * 25.4, 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 */