Metadata-Version: 2.5
Name: bimora-open-source
Version: 0.1.0
Summary: Open-source toolkit for IFC metadata extraction, architectural data validation, spatial summaries and revision comparison.
Project-URL: Homepage, https://adelkazemi1.github.io/bimora-open-source/
Project-URL: Documentation, https://adelkazemi1.github.io/bimora-open-source/
Project-URL: Repository, https://github.com/adelkazemi1/bimora-open-source
Project-URL: Issues, https://github.com/adelkazemi1/bimora-open-source/issues
Project-URL: Changelog, https://github.com/adelkazemi1/bimora-open-source/blob/main/CHANGELOG.md
Author: adelkazemi1
License-Expression: MIT
License-File: LICENSE
Keywords: aec,architecture,bim,ifc,interoperability,openbim,validation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: ifcopenshell>=0.8.0
Requires-Dist: jsonschema>=4.18
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pip-audit>=2.7; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: pyyaml>=6; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocs>=1.6; extra == 'docs'
Description-Content-Type: text/markdown

# BIMORA Open Source

An open-source Python toolkit for reading information out of IFC building models, checking its quality,
summarising spaces and areas, exchanging it as JSON / CSV, and comparing model revisions.

> Status: **v0.1.0 — first release, alpha.** The public API may change before v1.0.0.
> Initiated by ALBE Studio and TO RENDER STUDIO.

Long-term vision of this repository: open-source tools for BIM interoperability, architectural visualization,
interactive 3D environments and AI-powered building intelligence. **v0.1.0 covers only the IFC data foundation
described below**; everything else is planned (see [ROADMAP.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/ROADMAP.md)).

## Who it is for

BIM coordinators, architects, engineers and developers who need to look inside IFC files, check whether the
information requirements of a project are met, and move that information into spreadsheets, databases or
other tools — from the command line or from Python.

## What it does (v0.1.0)

| Area | Capabilities |
| --- | --- |
| IFC processing | safe opening, schema detection, project metadata, header, units, Project → Site → Building → Storey → Space hierarchy, element classes, GlobalIds, property sets (including type-inherited values), declared quantities with units, materials (layers, profiles, constituents, lists), classification references, element counts |
| Validation | 12 configurable rules: missing / invalid / duplicate identifiers, missing building, floor and room names, empty property values, invalid spatial relationships, missing or mixed units, missing classifications and materials, incomplete property sets, invalid or missing quantities |
| Spatial | hierarchy tree, floors by elevation, room inventory, space categories, element grouping and statistics, area totals per storey, containment relationships, exact metric ↔ imperial conversion |
| Interoperability | IFC → JSON (with a published JSON Schema), IFC → CSV, CSV field mapping, property / value / unit normalisation, GlobalId ↔ UUID mapping, asset manifests with SHA-256, read-only BCF 2.1 / 3.0 metadata reader |
| Comparison | revision comparison by GlobalId: added, removed, changed names, property values, classifications, materials, spatial assignment and declared quantities |
| Interfaces | `bimora` command-line tool and a typed Python API |

**Important.** Validation results are automated data-quality checks. They are **not** building-code compliance
checking, engineering approval or professional design verification. Revision comparison works on metadata;
it does **not** compare geometry and is **not** clash detection.

## Supported formats

| Format | Status |
| --- | --- |
| IFC2X3, STEP (`.ifc`) | supported — tested with files generated by IfcOpenShell |
| IFC4, STEP (`.ifc`) | supported — tested with files generated by IfcOpenShell |
| IFC4X3 and other schemas | refused by default; `--allow-untested-schema` opens them without verified results |
| IFC-ZIP (`.ifczip`), ifcXML | not supported in v0.1.0 (detected and refused) |
| BCF-XML 2.1 / 3.0 (`.bcf`, `.bcfzip`) | metadata read-only |
| Revit (`.rvt`), Archicad (`.pln`), Navisworks | **not supported** — export IFC from the authoring tool |

The test files were produced with IfcOpenShell. Files exported by commercial authoring tools have **not** yet
been verified with this release.

## Installation

Python 3.11 or newer. The package is not published on PyPI yet; install from a clone:

```bash
git clone https://github.com/adelkazemi1/bimora-open-source
cd bimora-open-source
python -m venv .venv
# Windows: .venv\Scripts\activate    macOS / Linux: source .venv/bin/activate
python -m pip install .
```

Runtime dependencies: [IfcOpenShell](https://ifcopenshell.org) (LGPL-3.0-or-later, installed separately as a
dependency) and [jsonschema](https://github.com/python-jsonschema/jsonschema) (MIT).

## Quick start (command line)

```bash
bimora inspect examples/pavilion-ifc4.ifc
bimora validate examples/pavilion-ifc4-incomplete.ifc
bimora spaces examples/pavilion-ifc4.ifc --area-unit ft2
bimora properties examples/pavilion-ifc4.ifc --ifc-class IfcWall
bimora export examples/pavilion-ifc4.ifc --format json --output model.json
bimora export examples/pavilion-ifc4.ifc --format csv --output csv/
bimora compare examples/pavilion-ifc4.ifc examples/pavilion-ifc4-revision-b.ifc
bimora report examples/pavilion-ifc4.ifc --output report.json
```

More: `bimora --help`, `bimora <command> --help` and [docs/cli.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/cli.md). Add `--json` for
machine-readable output. Exit codes: `0` ok, `1` check failed, `2` usage error, `3` input / configuration
error, `4` output error.

## Quick start (Python)

```python
from bimora import inspect_model, validate_model, compare_models

summary = inspect_model("examples/pavilion-ifc4.ifc")
print(summary["schema"], summary["counts"]["elements"])

results = validate_model("examples/pavilion-ifc4-incomplete.ifc")
for f in results.findings:
    print(f.rule_id, f.severity, f.element_id, f.description)

diff = compare_models("examples/pavilion-ifc4.ifc", "examples/pavilion-ifc4-revision-b.ifc")
print(diff.summary)
```

See [docs/python-api.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/python-api.md).

## Architecture

```
src/bimora/
├── ifc/               loader (safety checks, schema detection), units, extraction → ModelData records
├── validation/        configurable rule engine and configuration loading
├── spatial/           hierarchy, floors, rooms, areas, statistics, unit conversion
├── interoperability/  JSON / CSV export, mapping, identifiers, manifests, BCF reader, revision comparison
├── reporting/         inspection summary and combined report
├── schemas/           JSON Schemas of the exchange formats
├── api.py             public Python API
└── cli.py             `bimora` command
```

The IFC file is parsed once into plain Python records (`ModelData`); every other module works on those records.

## Known limitations

- Verified only with IfcOpenShell-generated IFC2X3 / IFC4 files; real exports from authoring tools are untested.
- No geometry processing: quantities are only those declared in the file; nothing is measured.
- Large models are processed in memory; the default file size limit is 256 MB (configurable).
- Revision comparison depends on stable GlobalIds.
- BCF: metadata only (no snapshots, no writing).
- Reports may include names and organisations from the IFC header and BCF authors; use `--redact-header` (IFC)
  and `bimora bcf --no-people` (BCF) to redact them.

## Documentation

[Getting started](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/getting-started.md) · [IFC processing](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/ifc-processing.md) ·
[Validation](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/validation.md) · [Spatial utilities](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/spatial.md) ·
[Interoperability](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/interoperability.md) · [Model comparison](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/comparison.md) ·
[CLI reference](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/cli.md) · [Python API](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/python-api.md) · [Example datasets](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/examples.md) ·
[Development](https://github.com/adelkazemi1/bimora-open-source/blob/main/docs/development.md)

## Contributing, security and license

- Contributions: [CONTRIBUTING.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/CODE_OF_CONDUCT.md).
- Security issues: please report privately — see [SECURITY.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/SECURITY.md).
- License: [MIT](https://github.com/adelkazemi1/bimora-open-source/blob/main/LICENSE). IfcOpenShell is a separately installed dependency under LGPL-3.0-or-later.
- Trademarks: IFC and BCF are open standards of buildingSMART International. Revit and Navisworks are trademarks
  of Autodesk, Inc.; Archicad is a trademark of GRAPHISOFT SE. They are named only to describe compatibility;
  this project is not affiliated with or endorsed by them.
- Roadmap: [ROADMAP.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/ROADMAP.md) · Changes: [CHANGELOG.md](https://github.com/adelkazemi1/bimora-open-source/blob/main/CHANGELOG.md).
