Align all components to grid

Hi,

what is the fastest way to align all components in the schematic to the grid?

I used lachlanA’s scripts (https://github.com/lachlanA/eagle-to-kicad) to convert my Eagle project to KiCAD, which just worked great!
Although there is a but in generating the schematics for the unconnected ground vias, as they are placed off grid somehow (at least in my case).

After dividing GND into AGND and GND, I needed to connect those to AGND. As they are off grid, they wont connect to any signal in the schematic editor.

Is there a tool to snap every component to the nearest on-grid position?

Thx for all help!

If these come in via script as off-grid, maybe the best place to fix that, is to see if you can modify the script to test/fix off grid ?

addit: Or, you could try change of SCH grid to finer, just to connect those parts ?

Sure, it’s a bug in the scripts.

Nevertheless, I’m interessted in how to do this (snapping unaligned components to grid - if possible multiple items at once), also because it is an important feature.

Sometimes the symbol itself is partly off grid. There is a rule in the main KiCad GitHub library collection that symbol outlines and pins must be on a (50mil?) grid, but many third party symbols are broken

So this would be a +1 for this feature. Quite apart from that I think that this would be a really useful feature. (Which is rather simple to implement in code.)

Just a side question: Who has come up using mil in schematics?? I admit that it is sometimes useful in PCB designs, where some ICs and f.e. pin headers are based on imperial units, but even there you can evenly decide between mm and mil. So why force usage of mil in schematics instead of global accepted metric units?

Just for the sake of argument, if you were using metric, what grid size would you use?

The dimensions are ok, so 50 mil should be around 1mm (which just as such is a super round value for grid size :smiley: )

Only now, you have lost compatibility with all Libraries.
If ‘mil’ is a problem, think of it as a drawing unit, which does have a mm equivalent

What exactly is off grid, and by how much ?
If you select a finer grid, can you then connect ok ?

You can box-select multiple items and nudge with a fine grid, to fix any import issues in the short term.

1 Like

That’s just because EEschema doesn’t know how ‘snap-to-pin’ works.
PCBnew can do it with tracks, pads, etc.

:wink:

Fair point, if eeschema did have a smarter entity-snap, that would tolerate this problem much better.

Of course, PCBnew can do with a smarter snap-to-entity too, as right now, an imported footprint DXF, is a royal pain to snap terminals to.

One frequent complaint about KiCad is that the schematic symbols are too big, so little circuitry on one A4 sheet.
As cheap printers have much better DPI resolution these days, maybe a 1mm grid would be a better long term solution, 61% more grid dots per sheet than 50mil

…Or, you can draw as A3 and print on A4, using that extra resolution to advantage for 100% more per sheet, and no need to change library symbols.

That’s the kind of answer one get’s from the people who worked with stuff and accept that usually it’s faster and less problematic to use a workaround then to reinvent the axle of a wheel.
:joy:

1 Like

Plus not upsetting Americans with an anti-metric obsession.:wink:
If only scaled printing A3 to A4 was always painless. Printing to pdf and then printing to A4 is usually the easiest way

I don’t have a problem with mil - it was just the answer to your question, how I would have suggested it. I’m not even asking for changing it. Just wondered, why someone with a scientific background chooses imperial over metric.

Yeah, that would solve the problem, too - and is a very nice feature. But I think the feature “align component to grid” also makes sense if due to some bug (or whatever) something is positioned off grid, which in the library is designed to be perfectly on grid.

Just wondered, why someone with a scientific background chooses imperial over metric.

I want to know why the heck NASA is still using imperial, it will be really embarrassing if we ever meet aliens. We will be the laughing stock of the galaxy.

Anyway, I believe the new eeschema will use an abstract grid, the user can assign it to whatever units they want.

3 Likes