feat: Implement IPC backend for real-time UI synchronization
Add KiCAD IPC API backend using kicad-python library for real-time communication with KiCAD 9.0+. Changes now appear instantly in KiCAD UI without manual reload. Key changes: - Implement IPCBackend and IPCBoardAPI classes for IPC communication - Auto-detect IPC availability and fall back to SWIG when unavailable - Route existing commands (route_trace, add_via, place_component, etc.) through IPC automatically when available - Add transaction support for proper undo/redo - Add socket path auto-detection for Linux (/tmp/kicad/api.sock) New commands: - get_backend_info: Check which backend is active Supported IPC operations: - Board: set_size, get_board_info, save - Routing: route_trace, add_via, add_net - Components: place, move, delete, list - Text: add_text, add_board_text SWIG backend is now deprecated and will be removed when KiCAD 10.0 drops SWIG support. Requires: kicad-python>=0.5.0, KiCAD 9.0+ with IPC enabled 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -157,12 +157,12 @@ def get_available_backends() -> dict:
|
||||
"""
|
||||
results = {}
|
||||
|
||||
# Check IPC
|
||||
# Check IPC (kicad-python uses 'kipy' module name)
|
||||
try:
|
||||
import kicad
|
||||
import kipy
|
||||
results['ipc'] = {
|
||||
'available': True,
|
||||
'version': getattr(kicad, '__version__', 'unknown')
|
||||
'version': getattr(kipy, '__version__', 'unknown')
|
||||
}
|
||||
except ImportError:
|
||||
results['ipc'] = {'available': False, 'version': None}
|
||||
|
||||
Reference in New Issue
Block a user