Move Everything to be Aligned to 5 mm Grid

Hello everybody,

I designed another PCB with KiCAD and aligned the euro board outline, mounting holes and also a few headers on the board to a 5 mm grid. For some reason late in the evening I marked everything and moved it with an inch grid :frowning: Now this nice european alignment is gone as can be seen in the screenshot below.

How can you move everything again so that a certain point (e.g. pin 1 of a header) matches the 5 mm grid?

Thank you for your help.

Max

you don’t really need to.
Just set the grid origin at any corner of your pcb.

  • open the line properties and note the absolute x and y coordinates.
  • set the grid origin via dimensions grid
  • set the auxiliary axis at the same point. (use a coarse grid for that.)

When exporting enable the relative to auxilary flags in the drill file generator and in the main export dialog.

You can also use ctrl+m (move exactly) to move the complete board such that that corner is on the absolute grid.

  • calculate the needed movement distance (coordinate - coordinate rounded to grid)
  • mark everything
  • press crtl+m and enter the calculated distance.
2 Likes

in general if you set the grid to 5mm and move the block again, everything should be re-aligned to the new grid…

Changing the grid origin helped.

Is the auxiliary axis the origin point for the drill files?

The moving thing did not work for me, as I can not move a marked block exactly. I use version 4.0.6 on Ubuntu.

Only if you activate it as the origin. (Might be the default. I’m not sure about that.)
In the plot dialog and in the drill file generator dialog there is an option to set the origin either to the absolute origin or to the aux origin.

This definitely does not work.

In nightly it does. Not sure about the stable version.

I think maui is one of the guys who use nightly. @maui it would be a good idea to state that you have nightly. Just in case the functionality does not exist in stable.

yes man, I use nigtly only… sorry I didn’t state it :smiley:

Ok i just created a new project in kicad stable. It seems auxilary is not the default.

But it can be activated here:

I think in stable that is the only thing that works, it’s what I do.

Unfortunately, the prime factors of 254 are 2 and 127. So you need to multiply by 5 to align mm/inch again (i.e. 5 inches = 127mm). To re-align on a 5mm grid, 25 inches = 635 mm. It’s a pity they didn’t make 1 inch = 25mm, it would be a lot easier :smiley:

3 Likes

Well the original poster asked how it works for drill files.