10 real x(real c) = spacing_x * (c - (cols - 1) / 2);
11 real y(real r) = spacing_y * (r - (rows - 1) / 2);
13 int n(int c, int r) = r * cols + c + 1;
18 element_start(sprintf ("header-%d-%d", rows, cols));
20 for (int r = 0; r < rows; r++)
21 for (int c = 0; c < cols; c++)
22 pin_mil(x(c), y(r), drill, copper,
23 sprintf("%d", n(c, r)),
24 sprintf("%d", n(c, r)));
27 rect_mil(x(-.5), y(-.5), spacing_x * cols, spacing_y * rows);