Skip to content

jegjessing/ai-generated-autorouter-for-kicad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-generated-autorouter-for-kicad

An advanced autorouter for KiCAD PCB design, featuring AI-assisted routing and strict adherence to design rules.

Features

  • A Maze Routing*: Efficient pathfinding with support for 45° and 90° routing.
  • Design Rule Compliance: Reads track width, clearance, and via constraints directly from the board's settings and net classes.
  • Copper Zone Awareness: Skips connections already completed by copper zones.
  • Multi-layer Support: Handles 2-layer and multi-layer (4, 6, ...) boards.
  • Two-phase Routing: Attempts via-free routing first, then uses vias only when necessary.
  • Rip-up and Reroute: AI-guided rip-up and reroute with configurable attempt budgets.
  • Persistent Settings: Router cost settings are saved to ~/.kicad_autorouter_settings.json.
  • AI Advisor: Integrates with Claude API for optimal routing order and rip-up suggestions.

Quick Start

Scripting Console

import sys; sys.path.insert(0, '/path/to/kicad_autorouter')
from autorouter import KiCADAutorouter 
routed, failed, total = KiCADAutorouter().run_rur()

With AI Guidance

from ai_advisor import RouteAdvisor
from autorouter import KiCADAutorouter

router = KiCADAutorouter()
routed, failed, total = router.run_rur(advisor=RouteAdvisor(), max_attempts=100)

Note:

  • Requires pcbnew (KiCAD scripting).
  • For AI features, install anthropic (pip install anthropic) and set the ANTHROPIC_API_KEY environment variable.

License

This project is licensed under the GNU General Public License v3 (GPLv3).

About

An autorouter for KiCAD where the code is generated mostly using claude

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages