# Pcbnew Grid Array directions

Hello,
I am really new to both CAE and KiCAD (just a couple of days). However, I did not find any answer to this question.
First what I try to achieve: a perfboard (simple board with holes), my board has a round metric size (44 mm) but I want to use a 2.54 mm pitch for my holes. I want to have my holes perfectly centered on the board.
What I did: i changed my grid size to 1 mm so that I have no problem to find and snap to the center of my board. I placed a footprint (hole) on the board then CRTL+N to get the â€śgrid arrayâ€ť feature. Letâ€™s say I put an horizontal and vertical spacing of 2.54mm and a vertical and horizontal count of 5. Here is the problem; the grid is going in a single direction (from left to right and from top to bottom). Letâ€™s say that I want to have a grid of 11 holes with a pitch of 2.54mm so a total of 25.4 mm, how do I perfectly center this grid at the center of my 44 mm PCB?

There is a way I can do it: reduce the grid size to 0.01mm, calculate the exact coordinate of the top left point and try to find that point with my mouse and to snap it and then create my grid from that point. However, having a reverse direction feature in the â€śgrid arrayâ€ť would be much better. Is there any other way I can do that?

I use â€śset grid originâ€ť for this type of thing.

• Start in mm, draw the board outline.
• Move cursor to top left of board outline and press spacebar
• Select â€śgrid originâ€ť and click at relative coord (22,22)
• now you can switch to inch, and the grid is centred on the board
• you can reset the grid origin to the top left of the 0.1" matrix

You could do it the other way. i.e.

• start in inches
• draw the grid of holes in inches
• set the grid origin to the centre
• switch to mm
• press space at the origin
• draw board outline (-22,-22) to (22,22) mm
1 Like

Hello bobc,
Thank you for your answer. However, it does not seem to be what I am looking for. I have placed grid origin to the center of the board but when I placed a hole footprint and then press CRTL+N to access grid array, there is no way I can expend the â€śgrid arrayâ€ť in both negative and position directions according to origin.

You have to create 4 arrays if youâ€™re determined to start from the center of your board (donâ€™t forget to delete unneeded fps).
Or you calculate the correct position of your outermost 1st pad and then create the array from thereâ€¦

PS: you can always edit the position of the x/y coordinates of footprints/pads - no need for trying to start from the 0.01mm grid.

PPS: I would be creating a footprint with 11x11 holes in a 2.54mm grid, with the center of the footprint were you want it to be and then place that in a pcb-layout at the center of a 44x44mm edge cuts drawing.
Canâ€™t fault that (=will always be accurate and easy placeable and safer to create than all in the pcb layout).

Right, so just place the first pad where you want the top left pad to be then do Ctrl-Nâ€¦

eta, another useful tip is to use the Drawing layer to draw temporary lines so you can line things up, and later delete them.

This took just a few minutes:

1 Like