[71][111] U-Werte aus dem Schichtaufbau (SIA 180) und lebendige Tabellen auf Layout-Blättern

[71] Kern u_value.rs: R = Rsi + Σ d/λ + Rse, hinterlüftete Schichten, Luftschicht, unvollständig ohne λ; Objekt-Info,
Ressourcen-Manager, Bauteilliste (CSV/PDF, CLI --elements), IFC ThermalTransmittance in Wand/Decke/Dach.
[111] Layout.tables: Fenster-/Türliste, Flächen SIA 416, Raumprogramm, Bauteile mit U-Wert als Tabelle auf dem Blatt
(Spaltenwahl, Schrift, Zeilenhöhe, Linien, Aufteilen auf mehrere Rahmen); Blattansicht, PDF (Vektortext), DXF.
This commit is contained in:
Claude committed 2026-10-30 06:09:50 +00:00
1 parent b2f66c777c
commit a3bc168f2d
31 files changed
+2274 -14

No files matched your search

+29
View File
@@ -19,6 +19,7 @@ import type {
LayoutFolder,
LayoutOrientation,
LayoutPaperFormat,
LayoutTable,
LayoutViewport,
MasterLayout,
Project,
@@ -413,6 +414,34 @@ export function patchViewport(
};
}
// ── Immutable CRUD (Tabellen auf einem Layout, [111]) ────────────────────────
/** Fügt eine Tabelle an (immutabel). */
export function addTable(layout: Layout, table: LayoutTable): Layout {
return { ...layout, tables: [...(layout.tables ?? []), table] };
}
/** Entfernt eine Tabelle; Tabellen, die sie fortsetzten, verlieren den Verweis (immutabel). */
export function removeTable(layout: Layout, tableId: string): Layout {
return {
...layout,
tables: (layout.tables ?? []).filter((tb) => tb.id !== tableId).map((tb) => (tb.continues === tableId ? { ...tb, continues: undefined } : tb)),
};
}
/** Ändert Felder einer Tabelle (immutabel); `undefined` entfernt ein optionales Feld. */
export function patchTable(layout: Layout, tableId: string, patch: Partial<Omit<LayoutTable, "id">>): Layout {
return {
...layout,
tables: (layout.tables ?? []).map((tb) => {
if (tb.id !== tableId) return tb;
const next = { ...tb, ...patch } as Record<string, unknown>;
for (const k of Object.keys(next)) if (next[k] === undefined) delete next[k];
return next as LayoutTable;
}),
};
}
// ── Blatt-Ebene (2D-Zeichnung auf dem Blatt) ─────────────────────────────────
// Was auf einem Blatt gezeichnet wird, sind gewöhnliche `drawings2d` auf der Blatt-Ebene des Layouts
// (`DrawingLevel.layoutId`, Art "drawing"): dieselben Werkzeuge, Fang, Griffe, Auswahl und dasselbe