[K4] S2: IFC-Export in Rust (export_ifc.rs, js_fmt.rs, geo_rebase.rs), byte-genau zur TS-Fassung; exportIfc.ts nur noch Fassade

This commit is contained in:
karim committed 2026-10-28 02:19:53 +01:00
1 parent e53fb21eb6
commit aaa7fae812
10 files changed
+1056 -919

No files matched your search

+14
View File
@@ -90,3 +90,17 @@ pub fn doc_query_args(h: u32, name: &str, args: &[f64], text: &str) -> String {
pub fn doc_drawing_line_verts(h: u32) -> Vec<f32> {
with_doc(h, |d| d.project().ok().map(|p| crate::model3d::drawing_line_verts(&p))).flatten().unwrap_or_default()
}
/// IFC4-Datei des Projekts (`now_ms`: Zeitpunkt des Exports); Fehler mit vorangestelltem `\u{1}`.
#[wasm_bindgen]
pub fn doc_export_ifc(h: u32, now_ms: f64) -> String {
let result = with_doc(h, |d| {
let p = d.project().map_err(|e| format!("Projekt passt nicht zum Kern-Modell: {e}"))?;
crate::export_ifc::export_ifc_spf(p, now_ms)
})
.unwrap_or_else(|| Err("Dokument nicht offen".to_string()));
match result {
Ok(text) => text,
Err(e) => format!("\u{1}{e}"),
}
}