Skip to content

Rearks/AiRevit

Repository files navigation

Revit Version Dynamo Python No LLM Zero Hallucinations Status

🏗️ AiRevit: Text-to-BIM — Zero Hallucination Generative Engine

Most "AI in BIM" tools are just LLM wrappers with unpredictable outputs.
AiRevit takes a fundamentally different approach.

AiRevit is a fully deterministic, data-driven pipeline that converts natural language architectural briefs into optimized floor layouts and deploys them directly as 3D BIM elements in Autodesk Revit — without a single LLM call, without unpredictable outputs, and with zero hallucinations.


🧠 The Core Philosophy: Rules over Hallucinations

The generative AI hype has a serious problem in AEC: LLMs do not understand architectural constraints.
They will happily generate a toilet inside a load-bearing structural core, or propose a 3m² office as "suitable for 10 people."

AiRevit instead uses a hard-coded semantic vocabulary parser + graph-based layout solver, preparing for a future Graph Neural Network (GNN) engine trained on a growing, structured dataset.

This project is designed to scale without modifying core nodes (Node 3, 4, 5). All architectural knowledge lives in data files, not in code.


⚙️ How The Pipeline Works

When a user sends a prompt like:

Design an office with two offices, total area 600 m², one twice as large, corridor, toilet

The pipeline does the following:

  1. Node 3 reads vocabulary.json and recognizes the space type.
  2. Node 4 reads space_types.json and knows how to place and size it.
  3. Node 5 builds it in Revit.

No code changes needed — only data files!

Nodes Architecture in Dynamo

Dynamo nodes

Expected Results

Result 1 Result 2


⚡ Quick Start: Running entirely in Dynamo

Prerequisites

  • Revit: 2026.4+
  • Dynamo: 3.6.1+
  • Python engine: CPython3

This pipeline is designed to be run from start to finish directly inside Dynamo.

Running the Graph

  1. Download or clone this repository to your local machine.
  2. Open Revit and launch Dynamo.
  3. Open the testing.dyn file provided in the repository root.
  4. The file already has all nodes connected:
    • Make sure the Directory Path node points to the folder where you saved this repository.
    • Edit the String node with your custom prompt.
  5. Click Run.
  6. The walls, doors, and rooms will instantly appear in your active Revit view!

🛠 Adding a New Space Type

Step 1. Add synonyms to vocabulary.json

Find the space_types section and add your type:

"wardrobe": [
  "wardrobe",
  "cloakroom",
  "coat room",
  "locker room",
  "changing room",
  "dressing room"
]

Step 2. Add rules to space_types.json

"wardrobe": {
  "group": "service",
  "preferred_near": ["entrance", "corridor"],
  "min_area_m2": 4.0,
  "max_area_m2": 20.0,
  "preferred_area_ratio": 0.08,
  "min_small_dim_mm": 1800,
  "min_large_dim_mm": 2400,
  "requires_daylight": false,
  "is_wet_zone": false,
  "position_priority": 1
}

Step 3. Add your dataset files

Place your annotated program_graph.json files into: dataset/program_graphs/

That's it. No code changes required.


📚 Space Groups

Each space type belongs to a group. The group defines where the space is placed in the layout.

Group Description Examples
circulation Connects other spaces corridor, hallway
primary Main functional spaces office, bedroom, meeting room
service Support spaces wc, wardrobe, storage
wet Spaces with water supply wc, kitchen
public Guest-facing spaces reception, dining, lobby

📖 Field reference for space_types.json

Field Type Description
group string Layout group (see table above)
preferred_near list Space kinds this should be placed near
min_area_m2 number Minimum allowed area
max_area_m2 number or null Maximum allowed area
preferred_area_ratio number or null Fraction of total area (e.g. 0.08 = 8%)
min_small_dim_mm number Minimum short dimension in mm
min_large_dim_mm number Minimum long dimension in mm
requires_daylight bool Must touch exterior wall
is_wet_zone bool Has water supply and drainage
position_priority number Order within service strip (1 = closest to entrance)

If your space type is not in space_types.json

The generator will use safe defaults:

{
  "group": "service",
  "min_small_dim_mm": 2000,
  "min_large_dim_mm": 2000,
  "requires_daylight": false,
  "is_wet_zone": false
}

The layout will still generate without errors. We recommend adding proper rules for best results.


🧬 Forking this repository

If you want to build your own domain on top of this project:

  1. Fork the repository
  2. Add your space types to vocabulary.json and space_types.json
  3. Add your dataset to dataset/program_graphs/
  4. Run the pipeline — no core code changes needed!

Examples of possible forks:

  • Restaurant fork — dining, kitchen, bar, storage, staff room
  • Apartment fork — bedroom, living room, kitchen, bathroom, balcony
  • Clinic fork — waiting room, examination room, office, wc, reception

🤝 Contributing Back

If you have annotated dataset files and want to contribute:

  1. Make sure your files pass validation:
python validators/validate_program_graph.py
  1. Open a Pull Request to the dataset/program_graphs/ folder

Include in your PR description:

  • building type
  • number of files
  • space types used
  • source (synthetic / real anonymized)

📄 License

MIT — free to use, modify, and distribute.

About

Convert natural language architectural briefs into Revit BIM models — deterministically, without AI hallucinations. No API keys. No cloud. Just describe your layout and hit Run in Dynamo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors