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:
@@ -3121,7 +3121,7 @@ class KiCADInterface:
|
||||
if not schematic_path:
|
||||
return {"success": False, "message": "schematicPath is required"}
|
||||
|
||||
grid_size = float(params.get("gridSize", 2.54))
|
||||
grid_size = float(params.get("gridSize", 1.27))
|
||||
elements = params.get("elements") # None → defaults inside snap_to_grid
|
||||
|
||||
result = snap_to_grid(Path(schematic_path), grid_size=grid_size, elements=elements)
|
||||
|
||||
Reference in New Issue
Block a user