Metadata-Version: 2.4
Name: iil-nl2cadfw
Version: 0.2.1
Summary: NL2CAD Framework — IFC/DXF parsing, DIN 277 area calculation, Brandschutz, GAEB and NLP-to-CAD intent classification
Project-URL: Homepage, https://github.com/achimdehnert/nl2cad
Project-URL: Repository, https://github.com/achimdehnert/nl2cad
Project-URL: Issues, https://github.com/achimdehnert/nl2cad/issues
Author-email: Achim Dehnert <achim@dehnert.com>
License: MIT
License-File: LICENSE
Keywords: ai,architecture,bim,brandschutz,building,cad,din277,dxf,gaeb,ifc,nl2cad,nlp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: nl2cad-areas>=0.1.0
Requires-Dist: nl2cad-brandschutz>=0.1.0
Requires-Dist: nl2cad-core>=0.4.0
Requires-Dist: nl2cad-gaeb>=0.1.0
Requires-Dist: nl2cad-nlp>=0.1.0
Provides-Extra: all
Requires-Dist: nl2cad-core[ifc]>=0.4.0; extra == 'all'
Requires-Dist: openai>=1.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: ifc
Requires-Dist: nl2cad-core[ifc]>=0.4.0; extra == 'ifc'
Provides-Extra: nlp
Requires-Dist: openai>=1.0; extra == 'nlp'
Description-Content-Type: text/markdown

# nl2cad — Python Library für BIM/CAD-Verarbeitung

[![CI](https://github.com/achimdehnert/nl2cad/actions/workflows/test.yml/badge.svg)](https://github.com/achimdehnert/nl2cad/actions/workflows/test.yml)
[![PyPI nl2cad-core](https://img.shields.io/pypi/v/nl2cad-core.svg?label=nl2cad-core)](https://pypi.org/project/nl2cad-core/)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Website](https://img.shields.io/badge/Website-nl2cad-2563eb?logo=github)](https://achimdehnert.github.io/nl2cad/)

Framework-agnostische Python-Library für IFC/DXF-Verarbeitung, DIN 277, Brandschutz und GAEB-Export.

→ **[achimdehnert.github.io/nl2cad](https://achimdehnert.github.io/nl2cad/)** — Landingpage (tenantfähig)

## Packages

| Package | PyPI | Beschreibung |
|---------|------|--------------|
| `nl2cad-core` | [![PyPI](https://img.shields.io/pypi/v/nl2cad-core.svg)](https://pypi.org/project/nl2cad-core/) | IFC/DXF Parser, Handler-Pipeline, Dataclasses |
| `nl2cad-areas` | [![PyPI](https://img.shields.io/pypi/v/nl2cad-areas.svg)](https://pypi.org/project/nl2cad-areas/) | DIN 277 & WoFlV Flächenrechner |
| `nl2cad-brandschutz` | [![PyPI](https://img.shields.io/pypi/v/nl2cad-brandschutz.svg)](https://pypi.org/project/nl2cad-brandschutz/) | Brandschutz-Analyse, ASR A2.3, DIN 4102 |
| `nl2cad-gaeb` | [![PyPI](https://img.shields.io/pypi/v/nl2cad-gaeb.svg)](https://pypi.org/project/nl2cad-gaeb/) | GAEB X81–X85 Generator |
| `nl2cad-nlp` | [![PyPI](https://img.shields.io/pypi/v/nl2cad-nlp.svg)](https://pypi.org/project/nl2cad-nlp/) | Natural Language → CAD Intent & NL2DXF |

## Quick Start

```bash
pip install nl2cad-core nl2cad-areas nl2cad-brandschutz nl2cad-gaeb
```

### Install-Optionen (Extras)

Das Meta-Paket `iil-nl2cadfw` bündelt alle Sub-Packages und bietet optionale Extras:

| Extra | Befehl | Zieht zusätzlich |
|-------|--------|------------------|
| _(keine)_ | `pip install iil-nl2cadfw` | Alle 5 Sub-Packages (core, areas, brandschutz, gaeb, nlp) |
| `ifc` | `pip install "iil-nl2cadfw[ifc]"` | `nl2cad-core[ifc]` — IFC-Toolchain (ifcopenshell) |
| `nlp` | `pip install "iil-nl2cadfw[nlp]"` | `openai>=1.0` für NL2DXF/Intent |
| `all` | `pip install "iil-nl2cadfw[all]"` | IFC-Toolchain + `openai` |
| `dev` | `pip install "iil-nl2cadfw[dev]"` | pytest, pytest-asyncio, pytest-cov, ruff, mypy |

```python
from nl2cad.core.parsers import IFCParser
from nl2cad.areas.din277 import DIN277Calculator
from nl2cad.brandschutz.analyzer import BrandschutzAnalyzer
from nl2cad.gaeb.converter import IFCX83Converter

# IFC parsen
parser = IFCParser()
model = parser.parse("gebaeude.ifc")

# DIN 277 berechnen
calc = DIN277Calculator()
result = calc.calculate(model.rooms)
print(f"NUF: {result.nutzungsflaeche_m2:.1f} m²")

# Brandschutz analysieren
analyzer = BrandschutzAnalyzer()
bs_result = analyzer.analyze(model)
for mangel in bs_result.maengel:
    print(f"⚠️  {mangel.beschreibung}")

# GAEB X83 exportieren
converter = IFCX83Converter()
xml_bytes = converter.convert_to_x83(model, projekt_name="Neubau EFH")
```

## Development

```bash
# Repo klonen
git clone https://github.com/achimdehnert/nl2cad.git
cd nl2cad

# uv installieren (falls nicht vorhanden)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Workspace setup (alle Packages als editable)
uv sync --all-packages

# Tests
uv run pytest

# Linting
uv run ruff check packages/
uv run mypy packages/
```

## Für Coding Agents

→ Lies zuerst [AGENTS.md](AGENTS.md) — enthält alle Konventionen, Package-Grenzen und Workflows.

## Architektur

```
nl2cad-nlp
    └── nl2cad-brandschutz ──┐
    └── nl2cad-gaeb          ├──→ nl2cad-core (ifcopenshell, ezdxf)
    └── nl2cad-areas         │
        └── nl2cad-core ─────┘
```

## License

MIT — siehe [LICENSE](LICENSE)
