Elemente-Uebersicht: SIA-416 Bilanz pro Geschoss

Aggregiert alle raum_outline-Flaechen nach raum_sia-Klassifikation
(hnf/nnf/vf/ff) und zeigt sie als kompakte Mini-Tabelle direkt unter
dem Geschoss-Header in der Project-Browser-Uebersicht.

Backend (_build_overview):
- Neuer Returnschluessel siaBilanz: {geschossId: {hnf, nnf, vf, ff,
  ohne, nf, total, count}} in m^2
- NF = HNF + NNF (Nutzflaeche nach SIA 416)
- Raeume ohne SIA-Tag landen in "ohne"

Frontend (ElementeUebersichtApp):
- Direkt unter dem Geschoss-Header eine Inline-Tabelle mit nur den
  Klassen die > 0 sind (kein Spam wenn nichts klassifiziert ist)
- NF separat hervorgehoben (Accent-Farbe) als wichtigste Kennzahl
- Read-only, aktualisiert sich mit jedem state-emit (Raum-Aenderung,
  SIA-Tag setzen, neue Raeume) automatisch
This commit is contained in:
2026-05-26 23:20:00 +02:00
parent f1860ae85d
commit 3c28d2e29c
2 changed files with 77 additions and 1 deletions
+30 -1
View File
@@ -116,7 +116,36 @@ def _build_overview(doc):
out_geschosse.append({
"id": "__keingeschoss__", "name": "(kein Geschoss)", "okff": None,
})
return {"geschosse": out_geschosse, "items": items}
# SIA-416 Bilanz pro Geschoss: aggregiert alle raum_outline-Flaechen
# nach raum_sia-Klassifikation. Räume ohne SIA-Tag landen in "ohne".
# NF = HNF + NNF (Nutzflaeche). Wird im Frontend als Tabelle gerendert.
sia_bilanz = {} # {geschossId: {hnf, nnf, vf, ff, ohne, nf, total, count}}
for obj in doc.Objects:
meta = _elm._read_meta(obj)
if meta is None: continue
if meta.get("type") != "raum_outline": continue
try:
area, _, _ = _elm._raum_amp(obj.Geometry)
except Exception: continue
if not area or area <= 0: continue
g_id = meta.get("geschoss") or "__keingeschoss__"
sia = (meta.get("raum_sia") or "").lower()
if sia not in ("hnf", "nnf", "vf", "ff"):
sia = "ohne"
b = sia_bilanz.setdefault(g_id, {
"hnf": 0.0, "nnf": 0.0, "vf": 0.0, "ff": 0.0,
"ohne": 0.0, "count": 0,
})
b[sia] += float(area)
b["count"] += 1
# NF + Total ableiten
for b in sia_bilanz.values():
b["nf"] = b["hnf"] + b["nnf"]
b["total"] = b["hnf"] + b["nnf"] + b["vf"] + b["ff"] + b["ohne"]
return {"geschosse": out_geschosse, "items": items,
"siaBilanz": sia_bilanz}
class ElementeUebersichtBridge(panel_base.BaseBridge):