AI-powered design intelligence for early-stage CAD validation. Integrates with AutoCAD 2026 to automatically validate designs against building standards, highlight issues in real-time, suggest AI-powered fixes, and generate designs from natural language prompts.
┌─────────────┐ COM (pyautocad) ┌──────────────┐
│ AutoCAD │◄────────────────────────│ Python │
│ 2026 │────DXF export──────────►│ Backend │
│ ┌────────┐ │ │ (FastAPI) │
│ │ CADX │ │◄──── WebBrowser ────────│ /panel │
│ │ Sidebar│ │ └──────┬───────┘
│ └────────┘ │ ┌────────────────┼────────────────┐
└─────────────┘ │ │ │
┌─────▼─────┐ ┌──────▼──────┐ ┌─────▼─────┐
│ ezdxf │ │ Ollama │ │ Streamlit │
│ Analyzer │ │ Local LLM │ │ Chat UI │
└───────────┘ └─────────────┘ └───────────┘
- 7 validation checks: unclosed polylines, overlapping geometry, room area minimums, wall thickness, layer naming, missing elements, dimension consistency
- Issues highlighted directly in AutoCAD with color-coded markers (red = critical, yellow = warning, blue = info)
- Configurable rules based on NBC India / IS standards
- Local LLM (DeepSeek-R1 / Qwen 3.5 via Ollama) analyzes each issue
- Generates specific AutoCAD commands to fix problems
- One-click auto-fix from the dashboard
- Type "design me a 3 floor duplex house" → full floor plan generated in AutoCAD
- Template-assisted generation for reliable results
- Rooms, walls, doors, windows, dimensions, and labels automatically placed
- Docked inside AutoCAD via .NET plugin (
CADXPANELcommand) — like GitHub Copilot in VS Code - Floating Python panel (
panel.py) as zero-install alternative — always-on-top dark-themed window - Web panel at
http://localhost:8001/panel— works in any browser - Chat with AI, validate, fix, and generate designs without leaving AutoCAD
- Streamlit-based chat UI for AI interaction
- Validation results with severity filtering
- Per-issue fix buttons with command preview
- HTML report generation and download
- AutoCAD 2026 (full desktop, running)
- Python 3.11+
- Ollama with models:
deepseek-r1:14b,qwen3.5:9b
# 1. Install dependencies
cd CADX
pip install -r requirements.txt
# 2. Start Ollama (in separate terminal)
ollama serve
# 3. Start CADX
start.batOr manually:
# Terminal 1: Backend
uvicorn app:app --host 0.0.0.0 --port 8001
# Terminal 2: AI Panel (floating sidebar)
python panel.py
# Terminal 3: UI (optional — the panel replaces this)
streamlit run ui.py --server.port 8501 --server.headless trueOption A — Python floating panel (recommended, no compilation):
python panel.pyA dark-themed AI panel appears on the right side of your screen.
Option B — .NET docked palette (true sidebar inside AutoCAD):
# Requires .NET 8 SDK: https://dotnet.microsoft.com/download/dotnet/8.0
cd plugin
build.batThen in AutoCAD:
NETLOAD → browse to build\CadxPlugin.dll
CADXPANEL
Option C — Browser panel:
Open http://localhost:8001/panel in any browser.
Load the LISP helper in AutoCAD's command line:
(load "C:/Users/reddy/OneDrive/Desktop/CADX/cadx.lsp")
Available commands:
| Command | Description |
|---|---|
CADX |
Validate current drawing |
CADXFIX |
AI fix all issues |
CADXDESIGN |
Generate design from prompt |
CADXCLEAR |
Remove validation markers |
CADXCHAT |
Ask the AI a question |
CADXPANEL |
Open AI sidebar (.NET plugin) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /status |
System status (AutoCAD, Ollama) |
| POST | /validate |
Run validation on current drawing |
| GET | /issues |
Get last validation results |
| POST | /analyze |
AI analysis of issues |
| POST | /fix |
Fix a specific issue |
| POST | /fix-all |
Fix all issues |
| GET | /panel |
AI sidebar panel (HTML) |
| POST | /chat |
AI chat for CAD questions |
| POST | /design |
Generate design from prompt |
| GET | /report |
Download HTML validation report |
CADX/
├── app.py # FastAPI backend
├── ui.py # Streamlit dashboard
├── panel.py # Floating AI sidebar (tkinter)
├── start.bat # One-click launcher
├── cadx.lsp # AutoLISP commands for AutoCAD
├── create_sample_dxf.py # Generate test DXF with errors
├── core/
│ ├── __init__.py
│ ├── autocad_bridge.py # COM automation bridge
│ ├── dxf_analyzer.py # ezdxf validation engine (7 checks)
│ ├── llm_agent.py # Ollama LLM integration
│ ├── design_generator.py # NL → floor plan → AutoCAD
│ ├── rules.py # Validation rule loader
│ └── report_generator.py # HTML report generator
├── static/
│ └── panel.html # Sidebar UI (served by FastAPI)
├── plugin/
│ ├── CadxPlugin.csproj # .NET 8 project for AutoCAD palette
│ ├── CadxPlugin.cs # C# plugin source (PaletteSet + WebBrowser)
│ └── build.bat # Build script
├── rules/
│ ├── residential.json # NBC India residential rules
│ └── general.json # Generic CAD rules
├── reports/ # Generated validation reports
└── sample_drawings/ # Test DXF files
| Rule | Standard | Value |
|---|---|---|
| Minimum room area | NBC India | 9.5 m² |
| Minimum wall thickness | IS 1904 | 150 mm |
| Maximum stair riser | IS 875 | 160 mm |
| Minimum door width | NBC | 750 mm |
| Minimum ceiling height | NBC | 2.7 m |
| Front setback | Local bye-laws | 4.5 m |
| Ventilation area | NBC | 10% of floor area |
- Python 3.11+ — primary language
- pyautocad + pywin32 — AutoCAD COM automation
- ezdxf — DXF file parsing and analysis
- Shapely — geometric operations (intersections, overlaps)
- Ollama — local LLM inference (DeepSeek-R1, Qwen 3.5)
- FastAPI — REST API backend
- Streamlit — interactive dashboard UI
# Generate a DXF with intentional errors
python create_sample_dxf.py
# Validate it (API must be running)
curl -X POST http://localhost:8001/validate -H "Content-Type: application/json" -d "{\"dxf_path\": \"sample_drawings/test_house.dxf\", \"rules_file\": \"residential.json\"}"curl -X POST http://localhost:8001/design -H "Content-Type: application/json" -d "{\"prompt\": \"design me a 3 floor duplex house\"}"