PCB Editor, components placed not to grid settings

Hello,

For many years PCB Editor have placed components outside the settings I have selected from dropdown menu. Now it’s set to “0.1000mm”, yet one component is placed at double decimal digit and some even have 4 to 5 decimal places.
What is the reason for this?


pos

Application: KiCad PCB Editor x64 on x64

Version: 9.0.0, release build

Libraries:
	wxWidgets 3.2.6
	FreeType 2.13.3
	HarfBuzz 10.2.0
	FontConfig 2.15.0
	libcurl/8.11.1-DEV Schannel zlib/1.3.1

Platform: Windows 11 (build 26100), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: NVIDIA Corporation, NVIDIA RTX 2000 Ada Generation/PCIe/SSE2, 4.6.0 NVIDIA 572.16

Build Info:
	Date: Feb 19 2025 17:46:53
	wxWidgets: 3.2.6 (wchar_t,wx containers)
	Boost: 1.86.0
	OCC: 7.8.1
	Curl: 8.11.1-DEV
	ngspice: 44
	Compiler: Visual C++ 1942 without C++ ABI
	KICAD_IPC_API=ON

Locale: 
	Lang: en_US
	Enc: UTF-8
	Num: 1,234.5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)

I suspect . . . that the position (shown in your image above) will be relative to the origin of the component and that origin may well not align to a pad. If you position the component by a pad it may well be that it’s origin does not align to the grid.

Indeed, that is most likely the cause. Maybe it’s more clear if I write it like this:

When you move a footprint (hover over it and press M for move) then the footprint gets grabbed by either it’s anchor point, or by the anchor point of a pad. And after the move, the point you selected it by is placed on the grid.

SMT footprints have arbitrary sizes, and their pitch almost never coincide with the grid. As a result, at least one pad will always be off grid (but tracks snap to the pad anchor during routing). But because not all pads can be on the grid, I recommend to standardize on placing SMT footprints by their anchor point.

KiCad also has a long standing bug / limitation that shows it’s ugly head on a coarse grid. To explain, place a small SMT part on the PCB, then set the grid to 5mm. Now you have lost control of how you can grab the footprint. KiCad alsways selects the footprint by an anchor point that is close to a grid point, and not by the anchor point that is closest to the cursor location. This is a bit annoying, and has been reported on gitlab a long time ago, but still is not fixed. You can circumvent this bug by using a relatively small grid. Working with the grid overrides may also work, I don’t have much experience with this (yet).

Thanks @RaptorUK and @paulvdh for your informative replies :slight_smile:

1 Like