fix: change snap_to_grid default grid from 2.54mm to 1.27mm (50 mil)

Half of all valid KiCAD schematic pin positions are on the 50-mil
(1.27mm) grid but not the 100-mil (2.54mm) grid — e.g. 26.67mm = 21 ×
1.27mm. Snapping to 2.54mm displaced those coordinates by 1.27mm,
moving labels off their pins and increasing floating-label count.

KiCAD source confirms: DEFAULT_CONNECTION_GRID_MILS = 50 and the ERC
off-grid check uses exact integer modulo against this value, so any
displacement breaks connectivity unconditionally.

Also update the kicad-source absolute path in CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Eugene Mikhantyev
2026-04-12 18:10:55 +01:00
parent 33a2118960
commit ba09fc4e0f
5 changed files with 101 additions and 12 deletions

View File

@@ -1902,12 +1902,12 @@ SCHEMATIC_TOOLS = [
"gridSize": {
"type": "number",
"description": (
"Grid spacing in mm. "
"Standard KiCAD schematic grid is 2.54 mm (0.1 inch). "
"Use 1.27 mm for high-density layouts. "
"Defaults to 2.54."
"Grid spacing in mm (default: 1.27 — standard KiCAD schematic grid). "
"Do NOT use 2.54: half of all valid KiCAD pin positions are at odd "
"multiples of 1.27 mm and would be displaced 1.27 mm, breaking "
"connectivity."
),
"default": 2.54,
"default": 1.27,
},
"elements": {
"type": "array",