Skip to content

IFC Graph Database

Convert IFC BIM models to Neo4j graph database for querying building information

PyPI version Python versions


IFC Graph is a Python tool that extracts building elements from IFC (Industry Foundation Classes) BIM model files and stores them in a Neo4j graph database. The tool filters physical entities (walls, doors, windows, columns, etc.) to create a structured graph representation of building components and their relationships.

Neo4j Graph Data

Features

  • 🚀 Batch Processing - Efficiently processes IFC files using batch database operations
  • ⚙️ Configurable Element Types - Customize which IFC element types to extract via YAML
  • 🔗 Rich Graph Model - Extracts elements, spatial structures, materials, and property sets
  • 🛡️ Safe Database Operations - Optional database clearing with --clear-db flag
  • 🔧 CLI Interface - Full command-line interface with multiple options
  • 📦 Python Library - Use as a library in your own Python projects

Quick Example

# Process an IFC file
ifc-graph --ifc-file path/to/model.ifc
from ifc_graph import filter_physical_elements, save_to_neo4j

# Extract elements from IFC file
elements, ifc_file = filter_physical_elements(
    "path/to/model.ifc",
    element_types=['IfcWall', 'IfcDoor', 'IfcWindow']
)

# Store in Neo4j
stats = save_to_neo4j(
    elements, ifc_file,
    uri="bolt://localhost:7687",
    username="neo4j",
    password="your_password"
)

Getting Started

  • Installation


    Install ifc-graph with pip and get up and running in minutes

    Installation

  • Quick Start


    Learn the basics of processing IFC files to Neo4j

    Quick Start

  • Configuration


    Customize element types and extraction settings

    Configuration

  • API Reference


    Detailed API documentation for developers

    API Reference

Requirements

  • Python 3.9+
  • Neo4j Database (4.x or 5.x)
  • IFC file to process

Documentation

Section Description
Getting Started Installation, quick start, and configuration
User Guide CLI usage, Python API, and graph model
API Reference Detailed API documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.