From c1591e7b501a2fc2ab840ed6a0c9f128f7a81716 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 06:33:31 +0000 Subject: [PATCH] =?UTF-8?q?[T3]=20IFC:=20Dossier=5FQto=5F=E2=80=A6=20als?= =?UTF-8?q?=20IfcElementQuantity=20(Untersicht=20der=20Laufplatte);=20Gold?= =?UTF-8?q?en=20komplex:=20Spindel=20im=20UG-Grundriss,=20runder=20Handlau?= =?UTF-8?q?f=20im=203D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/core/src/ifc_data.rs | 2 +- src-tauri/core/src/ifc_stairs.rs | 2 +- src-tauri/fileio/src/ifc_export.rs | 21 +++++++++++++++---- .../__golden__/komplex-grundriss-ug-100.txt | 6 +++--- .../__golden__/komplex-grundriss-ug-50.txt | 6 +++--- src/plan/__golden__/komplex-model3d.txt | 6 +++--- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src-tauri/core/src/ifc_data.rs b/src-tauri/core/src/ifc_data.rs index aac22cf5..c8bbd992 100644 --- a/src-tauri/core/src/ifc_data.rs +++ b/src-tauri/core/src/ifc_data.rs @@ -1391,7 +1391,7 @@ fn w_stair(f: &mut Flat, structure: f64, id: &str, predefined: &str, footprint: f.num(p); let mut psets = qto("Qto_StairFlightBaseQuantities", fl.quantities.clone()); if let Some(a) = fl.soffit_area { - psets.extend(qto("Dossier_StairFlightQuantities", vec![Qty { name: "SoffitArea", kind: QtyKind::Area, value: a }])); + psets.extend(qto("Dossier_Qto_StairFlight", vec![Qty { name: "SoffitArea", kind: QtyKind::Area, value: a }])); } w_psets(f, &psets); match &fl.body { diff --git a/src-tauri/core/src/ifc_stairs.rs b/src-tauri/core/src/ifc_stairs.rs index 1cf0b911..96a97feb 100644 --- a/src-tauri/core/src/ifc_stairs.rs +++ b/src-tauri/core/src/ifc_stairs.rs @@ -11,7 +11,7 @@ //! zweiten Lauf. Gerade und Wendeltreppen haben einen Lauf (die Wendel-Mitte bleibt Teil davon). //! Die Mittelsäule (Spindel, `Stair.centerColumn`) einer Wendel ist kein Tritt: eigener Teil //! (IfcColumn) mit Stützen-Basismengen. Ortbeton-Läufe (Netz) tragen zusätzlich die Untersicht -//! (Schalfläche, bei der Wendel die Wendelfläche) in `Dossier_StairFlightQuantities`. +//! (Schalfläche, bei der Wendel die Wendelfläche) in `Dossier_Qto_StairFlight`. use crate::export_flat::{js_key, mesh_volume, orient_outward}; use crate::ifc_quantities::{column_quantities, flight_quantities, railing_quantities, ring_area, slab_quantities, Qty}; diff --git a/src-tauri/fileio/src/ifc_export.rs b/src-tauri/fileio/src/ifc_export.rs index 45a576f0..c64bb480 100644 --- a/src-tauri/fileio/src/ifc_export.rs +++ b/src-tauri/fileio/src/ifc_export.rs @@ -21,7 +21,7 @@ // 2 = IfcPositiveRatioMeasure (value = Zahl), 6 = IfcLabel (Zeichenketten-Index), // 7 = IfcThermalTransmittanceMeasure (Zahl), // 3 = IfcQuantityLength, 4 = IfcQuantityArea, 5 = IfcQuantityVolume (value = Zahl, ≥ 0). -// Heisst der Satz `Qto_…`, entsteht je Bauteil ein eigener IfcElementQuantity (Basismengen, +// Heisst der Satz `Qto_…` (auch `CH_Qto_…`, `Dossier_Qto_…`), entsteht je Bauteil ein eigener IfcElementQuantity (Basismengen, // nie geteilt); sonst ein IfcPropertySet (gleicher Inhalt = ein Pset für alle Bauteile). // structure= Geschoss-Index oder −1 (Gebäude) // @@ -911,7 +911,7 @@ impl Builder { if pset.props.is_empty() { return; // IfcPropertySet verlangt mindestens eine Eigenschaft } - if pset.name.starts_with("Qto_") || pset.name.starts_with("CH_Qto_") { + if pset.name.starts_with("Qto_") || pset.name.starts_with("CH_Qto_") || pset.name.starts_with("Dossier_Qto_") { let quantities: Vec<(&'static str, String, f64)> = pset .props .iter() @@ -3187,7 +3187,18 @@ mod tests { b.str(name); b.n(&[7.0, 7.0, 0.1857, 0.28]); b.str("STRAIGHT"); - b.qto("Qto_StairFlightBaseQuantities", &[("Length", 3.0, 2.0), ("GrossVolume", 5.0, 1.0)]); + if k == 0 { + // Zwei Mengensätze: Basismengen + eigene Dossier-Mengen (Untersicht). + b.f.push(2.0); + for (set, (n, kind, v)) in [("Qto_StairFlightBaseQuantities", ("Length", 3.0, 2.0)), ("Dossier_Qto_StairFlight", ("SoffitArea", 4.0, 7.5))] { + b.str(set); + b.f.push(1.0); + b.str(n); + b.n(&[kind, v]); + } + } else { + b.qto("Qto_StairFlightBaseQuantities", &[("Length", 3.0, 2.0), ("GrossVolume", 5.0, 1.0)]); + } b.n(&[0.0, 2.0]); b.pts(&SQUARE); b.n(&[0.0, 0.2 * (k + 1) as f64]); @@ -3230,7 +3241,9 @@ mod tests { let flight = first_line(&ifc, "IFCSTAIRFLIGHT"); assert!(flight.contains(",7,7,0.1857,0.28,.STRAIGHT.);"), "{flight}"); // Beide Läufe + Spindel: Menge je Teil; Treppe, Läufe, Podest, Geländer, Spindel in EINER Aggregation, nur die Treppe im Geschoss/Gebäude. - assert_eq!(count(&ifc, "IFCELEMENTQUANTITY"), 3); + assert_eq!(count(&ifc, "IFCELEMENTQUANTITY"), 4); + assert!(ifc.contains("IFCQUANTITYAREA('SoffitArea',$,$,7.5,$)"), "Dossier_Qto_… als Menge"); + assert_eq!(count(&ifc, "IFCPROPERTYSINGLEVALUE"), 0); let agg = ifc.lines().find(|l| l.contains("IFCRELAGGREGATES(") && l.matches('#').count() == 8).expect("Aggregation der Treppe"); assert!(agg.contains(",#"), "{agg}"); let contained = first_line(&ifc, "IFCRELCONTAINEDINSPATIALSTRUCTURE"); diff --git a/src/plan/__golden__/komplex-grundriss-ug-100.txt b/src/plan/__golden__/komplex-grundriss-ug-100.txt index b4be7c40..1aa12d91 100644 --- a/src/plan/__golden__/komplex-grundriss-ug-100.txt +++ b/src/plan/__golden__/komplex-grundriss-ug-100.txt @@ -1,10 +1,10 @@ viewBox -16.5 0 49 35.22 -bytes 82839 +bytes 83590 circle 14 line 481 path 30 -polygon 106 +polygon 107 rect 1 svg 1 text 75 -hash d6eab4be2a36a99a +hash 51d02b12b3f8d6a0 diff --git a/src/plan/__golden__/komplex-grundriss-ug-50.txt b/src/plan/__golden__/komplex-grundriss-ug-50.txt index 87919cef..74590408 100644 --- a/src/plan/__golden__/komplex-grundriss-ug-50.txt +++ b/src/plan/__golden__/komplex-grundriss-ug-50.txt @@ -1,10 +1,10 @@ viewBox -16.5 0 49 35.22 -bytes 82943 +bytes 83694 circle 14 line 481 path 30 -polygon 106 +polygon 107 rect 1 svg 1 text 75 -hash 5627a42e1a5a8903 +hash be6844edd22e12d2 diff --git a/src/plan/__golden__/komplex-model3d.txt b/src/plan/__golden__/komplex-model3d.txt index 916c7b24..c7bdfe29 100644 --- a/src/plan/__golden__/komplex-model3d.txt +++ b/src/plan/__golden__/komplex-model3d.txt @@ -5,10 +5,10 @@ meshes[].indices [156642] meshes[].indices [348] x6 meshes[].indices [36] x1816 meshes[].indices [372] -meshes[].indices [4032] meshes[].indices [60] x9 meshes[].indices [72] meshes[].indices [84] x2 +meshes[].indices [9288] meshes[].indices [96] x6 meshes[].positions [1044] x6 meshes[].positions [108] x30 @@ -17,9 +17,9 @@ meshes[].positions [192] meshes[].positions [216] meshes[].positions [24] x1781 meshes[].positions [252] x2 -meshes[].positions [2688] meshes[].positions [288] x6 meshes[].positions [324] x6 +meshes[].positions [4746] meshes[].positions [72] x5 meshes[].positions [78837] roofLayers [59] @@ -50,4 +50,4 @@ walls[].start [2] x1508 walls[].startCut [4] x1137 walls[].topDrop [2] x112 walls[].topPlane [3] x268 -hash a2e428fd2c5dbd0a +hash daf0df7b109e5d1a