Grid with subdivision

I begun lately to work with LibrePCB. it’s quite impressive what had been done as far.

The grid functionality could get an improvement. I miss the following parts:

  • a grid with subdivision, eg. display 1mm grid, but snap to 0.1mm/0.05mm. It can get quite frustrating, when working in PCB on a 0.05mm grid (according to IPC-7351), and having to place components/vias/… in eg. 1mm or even 2.5mm grid.
  • snap the cursor to the grid, resp. to the subdivision of the grid.

An other possibility is to be able to change grid settings without having to lose grip of the actual action (similar to AutoCAD), eg. with + mouse wheel.


1 Like

Yes, it sounds good… +1
And snap the cursor to nearest object (track, vias, pad) is lovely function. :wink:



Do you mean that the editor would automatically switch between the two grids, maybe depending on the zoom level? Or would always the smaller grid be active, and the larger grid in only visually highlighted?

To be honest, I really don’t like that :wink: I just used LTSpice which snaps the cursor to the grid (while the “unsnapped” cursor is not visible at all) and for me this was horrible - since you don’t know the actual (unsnapped) cursor position, it’s very likely to accidentally snap one grid interval away, especially when clicking a mouse button.

But another variant would be to (optionally) show some kind of crosshairs to see the snapped cursor position in addition to the OS cursor, or what do you think about this?

Another related issue is that moving elements on the grid should have two modes: Move by interval, and move to interval.

For example, if a part is placed at x=1mm, and the grid is set to x=2.54mm, then right now moving the part by 1 grid step will result in x=3.54mm. There should be an alternative mode where moving the part by 1 grid step will result in x=2.54mm. One mode could be called “absolute grid” and the other one “relative grid”. (Maybe this is what you meant with snapping.)

Note that this doesn’t necessarily need to be a grid setting. I think it would be even better if the modes could be chosen when using the “move” tool, maybe using a modifier key. I often (mis)use the grid to move parts a certain distance.

An idea : set grid to 0.1mm for example and draw main grid @10 times i.e. @1mm with lines and 0.1mm grid with dots

It will save my eyes !

And for snap, it is important to know where the used tools will start even if it snaps grid or component pad, whatever was the solution.

It seems that dots grid (but only dots) already exists !

Just got librepcb to get it a whirl and compare to eagle, which I’ve been using for years.
Seems not fully ready for prime time yet, especially for the pcb layout part, and I hope the development can be fast enough to catch up so we can very soon have something more usable.
However, for now, one of my first observations, in the schematic editor, I find the grid to be too overbearing, too thick. (I’m on mac)
I did look at the preferences pane, but it’s very barren right now. I was expecting at least to see what was suggested earlier on this thread, which is a sub-divided grid.
We need more control over that grid, and make it less “present” to the yet, just there to be noticed when we need it, but discrete.
Also, about the grid snapping, having a second grid for snapping, that is smaller than the main one, and can be activated manually only when needed, to snap something to the smaller grid only when we want to, that would be a good thing.
One more thing, I don’t like to see that side bar with “pages” (schematic) all the time, and just like it’s done in eagle, I would rather be able to see only a pull down menu for that. This could be a gui choice to set in preferences…
My two cents, to help further this development…