How can I get the “Update PCB From Schematic” operation to place my components on the selected grid? For example, say I am using a 0.1" grid, with the drill/placement origin set on the grid. When bringing in components from the schematic the placement is all clumped together with apparently random (or at least not obvious) coordinates.
I like my parts (usually surface-mount) to be nicely arranged, just for aesthetics, and I usually have to manually edit the component coordinates to get them on the grid. Once they are on the grid I can drag them around as needed and they stay on grid. But if they are initially off-grid, they stay off-grid, even after moving.
I can sometimes get them to snap on grid using the “G” grab command, and then when moving them with the mouse they will snap to grid, but not always, and I don’t know what I’m doing wrong,
So is there a config setting or technique I have wrong? This also happens when I am using a mm grid.
I’m using V7.0.1, but I had the same issue with V6.x
I am using 6.0.11.
In V6 I have noticed only one problem with snapping that I don’t remember from V5.
When you take a footprint to position it (M hotkey) it is important where you cursor is.
If it is near a footprint center it grabs the footprint by its center and then you can place this center at grid or at points that have one of coordinates as footprint origin position was. So you can fix to grid both coordinates or only one.
If cursor is near a pad than it grabs footprint by that pad and as a result the pad will be positioned in grid (or with one coordinate preserved). As pad is typically not in grid distance from footprint center you can easily lost having the center at grid.
I have all my footprints Courtyard rectangles in 0.1mm grid. I position footprints just to have that rectangle touching the others.
For normal movement see the sentences from @Piotr. Especially the part about the position of the mousecursor at the moment the move-drag (or the move-command) is executed.
Look also at the global setting for Preferences–>common–>Editing–>Warp mouse to origin of moved object and explore (==play) how that setting works.
How can I get the “Update PCB From Schematic” operation to place my components on the selected grid?
No chance, the “Update PCB From Schematic” operation currently ignores the grid setting.
You could try the pcb-action-tools (plugin), these include a “snap to grid” tool. Worked fine with kicad v6, but I don’t know if that is already updated and compatible with v7.
My unreliable memory recalls that you can select the footprints (area select, ctrl-click, etc) and then select align to grid from the context menu (right mouse button). Or was that for the schematic? Need coffee.
Thanks everyone. The ‘M’ hotkey grabs some components by the center, sometimes, but others it doesn’t, no matter how carefully I place the cursor. I also can’t see that warping the mouse to origin makes any difference.
I did upvote the issue.
I just loaded and tried the pcb-action “snap selected components to grid”, but it crashed (with KiCad V7.0.1)
And I can’t find “align to grid” in the PCB context menu. There were lots of other alignments available but not that one!
It’s not that horrible to hand-edit the component coords to put them on the grid when I start placing them, but sometimes it’s initially not exact, but not off-grid enough to be immediately obvious. That bugs me. I realize there’s no practical difference, but if I lay it out I want it to look good.
Hardly to believe. May be V7 (I didn’t tried yet) has some problem.
Do you see the small cross in the center of these footprints that you can’t grab for the center?
If not than probably they not have their reference point in their center (open them in footprint editor to check where they have their 0,0 point).
In 7, it seems that when you highlight a symbol or footprint then select M, instead of the cursor moving to the anchor, the symbol or footprint is held wherever the cursor is positioned when M is selected, even if the cursor is not placed on any part of the symbol/footprint.
It is the same in V6 and I hate it.
When I switch from schematic to PCB or from PCB to schematic (what I do frequently) there is big chance that the element I was doing something with at the previous application is selected and I not notice it. Then I point with mouse element I want to move, press M and instead of moving the expected element I see at cursor those selected element taken from his position to my cursor.
Since I started to use V6 (seriously 4 months ago) I am caught by this feature many times a day.
The Warp Cursor thing does work, but it’s name is a bit misleading. When checked, the cursor is not only warped to the center of a footprint, but it can also get warped to other reference points such as the center location of a pad in a footprint.
If the Warp Cursor is off, then the move will be at some multiple of the current grid cell size, when it is on, then the mouse is warped to one of those reference points, and when moving, the reference point it got warped to will be placed on the grid.
I had a play with this warp in my personal libraries. Each time the cursor landed on the anchor I had set with the warp on…
If the warp was off, the footprint/symbol was moved with the cursor wherever the cursor was when the M key was pressed.
yes, the movement is a bit difficult to understand.
For setting warping on: every footprint contains 3 types of different footprint grabbing points:
the anchor point can act as grabbing point
the geometrical middle of the footprint can act as grabbing point
every pad can act as grabbing point
By starting the move-action (“M”-command, or starting the mouse-drag) kicad looks for nearest grabbing point and this grabbing point is than used for the movement. With setting “warping on” the mouse-cursor is warped to that grabbing point, than the movement can start from that position. The first mouse-moving than snaps that grabbing-point to the nearest grid-position. (if grid-snap is enabled).
Depending on the footprint it’s possible that geometrical middle == anchor point (often for symmetrical footprints). It’s also possible that the anchorpoint is located at a pad (for instance THT-footprints according to KLC: pad1==anchorpoint)
These pictures (they are very wide) show the 3 different grabbing points:
No, even with “warp cursor” ticked (and it has been), with V 7.0.1 the cursor snaps to a pad when using ‘M’-command. I am using SMT parts, and the (0,0) origin is centered between the pads.
I reset the Preferences/Common to default (warp is ticked), thinking I might have screwed something up, but no change.
I just tried the same thing with V 6.0.6 and the ‘M’-command works as described, moving the cursor to the midpoint when carefully positioned. In both versions the “Update PCB from Schematic…” command still places the components seemingly randomly, but the ‘M’-command behavior has changed in V 7.0.1.
I would rather maintain my “desired placement grid” when moving parts around, but this is still a big help.
And I just checked with V 6.0.6 and there it didn’t matter how big the grid was, it still snapped to the midpoint target, and then positioned on the selected grid…