Sorry if this is a dumb question, I’m new to Kicad.
I can’t figure out what the grid does/does not/is for.
I’m trying to place keyswitches, which are 19.05mm. So, I set the user grid to 19.05mm and updated the schematic from PCB.
The keyswitches did not arrive as I expected, with the top and left side of each aligned to grid lines. Instead, they arrived aligned according to some other grid which I had not defined, with each switch having its own different pair of offsets from the x/y grid lines. So… the grid is not for controlling how/where parts are imported.
Next I tried to align each keyswitch according to the grid I had defined. It should be simple to ‘snap’ each switch so its upper left corner is on a grid line, right? Well, no. Movement of each switch was only possible in odd fractions that did not line them up with each other nor with the grid. So… the grid is not for aligning parts when laying them out.
I concluded that the grid must be for constraining movements, and that might be why I could only move the keyswitches in odd fractions that did not line up the top or left edges to grid lines. So if the grid means I can’t move things to align them with the grid, then there must be an alignment tool that snaps the top left corner of a footprint to the top left corner of one of the grid squares. So I searched for that functionality, and sure enough I found “align horizontally” and “align vertically” - these must finally get the top side aligned with a grid line and the left edge aligned with a grid line. Okay. That is not what those tools did. Instead the first jammed them all together on the same horizontal line, and the second jammed them all together on the same vertical line. To add insult to injury, after lining them up vertically, the left edges were still not on a grid line, and after lining them up horizontally the top edges were still not on a grid line. So… the grid is not something that there is any tool in Kicad for aligning things with.
Since the above experiment had left all the switches in exactly the same location, I did the obvious thing and moved the grid origin to the top left edge of that location. Finally all my switches are aligned on the grid. All in the exact same square of the grid, which is a little annoying but you can’t have everything. Given my earlier experience trying to line things up using the mouse, and the failure of everything else that other CAD programs use the grid for, the grid MUST be for constraining movement. And that seems at first to be true. It is now simple to grab the top switch and drag it to be aligned with a different grid square. So I start laying things out. Occasionally I happen to grab a silkscreen legend and inadvertently move it away from the component it refers to (why is that possible? I haven’t ungrouped them…) but I guess that’s what “undo” is for. And then I select an area, move it to a new location, and move on with laying things out, then notice… everything in that area moved some distance which was not an integer multiple of the size of the grid squares. I undo the work I’ve done since that fateful move, then undo it, and redo it. So… the grid seems to be for constraining movement, but does not even do that reliably.
After a while I want to move things in increments of one-quarter of the 19.05mm grid I’ve been working with. Okay, that’s 381/20 of a millimeter, so obviously my new grid size will be 381/80 of a millimeter. So I go to reset the user grid size, type 381/80, and Kicad refuses to deal with ratios. What? Every engineer in the world has to deal with ratios. “Divide this length into 21 equal parts” is a completely ordinary thing that we have to do in CAD programs, and we usually do it by typing “/21” after the measurement we’re using now. Just the same way I wanted 19.05/4, which is 381/80. So… the grid is not for making rational divisions.
19.05mm, my brain is thinking. 19.05mm, where have I seen that before?.. OH YEAH! I REMEMBER! That’s what we had in a previous project where something got laid out in imperial units and then had to be exported to someplace that only speaks metric. That’s three-quarters of an inch! That should make things easy! So, obviously, if 1u is 3/4inch, then 1/4u is 3/16 inch. So I go back to the grid and look for the 3/16 inch grid unit … wait. There is no 3/16 inch grid unit. Nor any other inch grid unit. And I can’t use simple math on the denominator of 381/20 to get the units I want. So every last thing I do here is going to have to involve multiplication or division of some obtuse four-decimal number. So … the grid is not for allowing people to use convenient units, nor for converting things into or out of convenient units.
This grid fails to do every last thing that any grid in any CAD software I’ve ever used does. Except constrain movement. Unreliably.
Why is it there?
[Edit: Forgot to mention. I’m talking about the grid in the PCB Layout editor of KiCad 6.0 running on a Linux install. ]