[B5] IFC-Export nach Rust: ifc_export.rs schreibt die STEP-Datei

TS (exportIfc.ts) sammelt nur noch Bauteile und Geometrie als flachen Puffer, Rust
(src-tauri/fileio/src/ifc_export.rs, Format-Modul pkgFileIo) baut Entitäten, GUIDs,
Typen mit Materialschichten, Psets, Beziehungen, Räume, Georeferenz und die
\X2\/\X4\-Kodierung. TS-STEP-Erzeugung gelöscht; ifcGuid/ifcString sind Fassaden.
exportIfcSpf bleibt synchron, verlangt aber das geladene Format-Modul (Dialog und CLI
laden per loadFileio, Tests per fileioWasm.setup). Golden-Vergleich gegen die TS-Fassung
(45 Exporte): zeichengleich bis auf Zeitstempel. Rust-Tests: Zahlen/Strings/GUIDs,
Wohlgeformtheit, Fehlerpfade ohne Panic.

Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
Claude committed 2026-10-28 11:50:45 +00:00
1 parent c72f487d4e
commit 041b324689
10 files changed
+2117 -717

No files matched your search

+1
View File
@@ -226,6 +226,7 @@ export async function run(argv: string[]): Promise<number> {
return 0;
}
case "ifc":
await loadFileio();
out(args, exportIfcSpf(project), `${project.name || "projekt"}.ifc`);
return 0;
case "obj":
+1
View File
@@ -12,6 +12,7 @@
// Fixture-Muster gespiegelt von exportSchedule.test.ts.
import { describe, it, expect } from "vitest";
import "../engine/fileioWasm.setup";
import { exportIfcSpf, ifcGuid, ifcString } from "./exportIfc";
import type {
Ceiling,
+383 -714
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -7,6 +7,7 @@ import { spawnSync } from "node:child_process";
import { mkdtempSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import "../engine/fileioWasm.setup";
import { exportIfcSpf, ifcGuid } from "./exportIfc";
import { pickGeometry } from "../plan/toWalls3d";
import { wallCutMeshes } from "../plan/wallMeshCut";
+1
View File
@@ -1751,6 +1751,7 @@ export const de = {
"exportSave.fmt.stl": "STL (3D-Mesh)",
"exportSave.fmt.step": "STEP (B-Rep, truck)",
"step.export.failed": "STEP-Export fehlgeschlagen",
"ifc.export.failed": "IFC-Export fehlgeschlagen",
"step.export.skipped": "{n} Körper konnten nicht exportiert werden",
"step.import.failed": "STEP-Import fehlgeschlagen",
"step.import.done": "STEP importiert: {n} Körper",
+1
View File
@@ -1712,6 +1712,7 @@ export const en: Record<TranslationKey, string> = {
"file.exportStl": "Export STL (3D mesh)",
"exportSave.fmt.step": "STEP (B-rep, truck)",
"step.export.failed": "STEP export failed",
"ifc.export.failed": "IFC export failed",
"step.export.skipped": "{n} solids could not be exported",
"step.import.failed": "STEP import failed",
"step.import.done": "STEP imported: {n} solids",
+5 -1
View File
@@ -22,6 +22,7 @@ import { distinctImportLayers, planImportCategories } from "../io/dxfToDrawings"
import type { ImportDecision } from "../ui/ImportDialog";
import { exportScheduleCsv } from "../export/exportSchedule";
import { exportIfcSpf } from "../export/exportIfc";
import { loadFileio } from "../engine/fileioWasm";
import { exportProjectStep } from "../export/exportStep";
import { exportObj, exportStl } from "../export/exportMesh";
import type { ExportSaveFormat } from "../ui/ExportSaveDialog";
@@ -503,7 +504,10 @@ export function useProjectFileActions(
downloadTextFile("" + exportScheduleCsv(project), filename, "text/csv;charset=utf-8;");
break;
case "ifc":
downloadTextFile(exportIfcSpf(project), filename);
// IFC schreibt Rust (Format-Modul pkgFileIo, wird beim ersten Export nachgeladen).
void loadFileio()
.then(() => downloadTextFile(exportIfcSpf(project), filename))
.catch((e) => notify(`${t("ifc.export.failed")}: ${e instanceof Error ? e.message : String(e)}`, "error"));
break;
case "obj":
downloadTextFile(exportObj(project), filename);