Gemeinsame Ansicht export/exportView.ts (Umbaufilter, Etappe, Kombination der aktiven Ebene) als EIN Weg in IFC, OBJ/STL/glTF, STEP, Blender-Paket und Cycles-Szene (Text der Kern-Abfragen, renovation::view_from_text). Cycles-Szene: Ausgeblendetes fehlt, Umbau-Farben nur auf Wunsch (renovationColors, cycles_scene_styled); Explosionsaxonometrie bekommt die Umbau-Farben, Pick/Explosion folgten dem Filter schon. App: Export-Dialog und Rendering-Dialog zeigen die Ansicht und lassen Hauptvarianten/kein Filter wählen; Häkchen Umbau-Farben im Bild. CLI: --renovation/--phase auch für ifc, obj, stl, glb, gltf, step, render, blend; render --engine cycles --renovation-colors. Tests: Kern export_view_tests.rs, vitest exportView/exportViewState/render, e2e exportView271; Bilder doc/review-272/07-09.
20 lines
935 B
TypeScript
20 lines
935 B
TypeScript
// [271][272] Ansicht für Exporte und Rendering aus dem Zustand der App: Umbaufilter, Etappe und Variantenkombination der
|
|
// aktiven Ebene (wie das 3D-Fenster sie zeigt), dazu die lesbare Fassung für Dialoge. Die Rechnung selbst: `export/exportView.ts`.
|
|
|
|
import { exportViewLabels, levelExportView, type ExportView } from "../core";
|
|
import { getState } from "./appStore";
|
|
import { renovationFilterLabel } from "./renovationHook";
|
|
|
|
export interface ActiveExportView {
|
|
view: ExportView;
|
|
labels: { renovation: string | null; combination: string | null };
|
|
}
|
|
|
|
/** Ansicht der aktiven Ebene (`activeLevelId`) des aktuellen Projekts. */
|
|
export function activeExportView(): ActiveExportView {
|
|
const st = getState();
|
|
const view = levelExportView(st.project, st.activeLevelId);
|
|
const own = st.project.renovation?.filters ?? [];
|
|
return { view, labels: exportViewLabels(st.project, view, (id) => renovationFilterLabel(id, own)) };
|
|
}
|