TBDM
The project converts Industry Foundation Classes (IFC) building models — the standard BIM file format — into a Neo4j graph database, turning a building's structure into something you can query, analyze, and connect to live data.
How it works
- IFC → graph conversion — parses IFC files with IfcOpenShell and loads them into Neo4j via py2neo, in two alternative structures:
AllSameNode(every element under one generic:IfcNodelabel, for simple, uniform analysis) orEachClass(each element labeled with its own IFC class, for precise, targeted queries like "all walls" or "all windows"). - CSV export — extracts nodes and relationships from an IFC file into CSV files ready to import into Neo4j.
- Centrality analysis — uses the Neo4j Graph Data Science library to compute betweenness centrality, surfacing the building elements that sit on the most shortest paths — i.e. the structurally most "central" points of the model.
- IoT device linking — attaches IoT sensor nodes (e.g. a temperature sensor) to existing building elements with a
HAS_IOT_DEVICErelationship, connecting the static BIM graph to live sensor data for digital twin workflows. - Graph → IFC export — reads the graph back out of Neo4j (building elements and linked IoT devices) and exports it to an IFC file again, for use in simulation, visualization, or other BIM tools.
Requirements & installation
- Python 3.8 with IfcOpenShell-python 0.6.0 for IFC parsing
- py2neo (
pip install py2neo) to talk to Neo4j - graphdatascience (
pip install graphdatascience) for the GDS Python client - A Neo4j instance, deployed via
docker-compose up -d
Notes
- Performance scales with IFC file size — larger models take longer to convert.
- Security — the default
NEO4J_AUTHcredentials indocker-compose.ymlshould be changed for any production use.