From 65fa73ab85029758acee1cc3c2e94e4b2f3426f3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 20:14:30 +0000 Subject: [PATCH] =?UTF-8?q?[184]=20Schnitt/Grundriss=20grob:=20Sturz=20und?= =?UTF-8?q?=20Br=C3=BCstung=20im=20Wandschnitt=20flach=20(kein=20Anschlag,?= =?UTF-8?q?=20keine=20Nase,=20kein=20Schichteinzug),=20Grundriss-Leibung?= =?UTF-8?q?=20gerade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 5 ++- src-tauri/core/src/plan/openings.rs | 5 ++- src-tauri/core/src/plan/section/bands.rs | 20 ++++++----- src-tauri/core/src/plan/section/mod.rs | 8 +++-- src-tauri/core/src/plan/section/query.rs | 31 +++++++++++++--- src-tauri/core/src/plan/section/shapes.rs | 5 ++- src-tauri/core/src/plan/section/tests.rs | 37 ++++++++++++++++++++ src-tauri/core/src/plan/section/ts_faelle.rs | 6 ++-- src-tauri/core/src/plan/walls.rs | 3 +- 9 files changed, 98 insertions(+), 22 deletions(-) diff --git a/TODO.md b/TODO.md index d3499764..fe324a3d 100644 --- a/TODO.md +++ b/TODO.md @@ -316,7 +316,10 @@ Wer zu einer ID mehr wissen will (Entscheide, Tests, Bilder), sucht dort nach `* Fensterbank als einfache Fläche, Tür-Blatt als Fläche. Fein: volles Profil wie bisher. Storenkasten im Schnitt nur mit `windows.shadingBox` (Basis aus). `sectionDetail` der Stufe ist jetzt optional (ja = voll, nein = höchstens mittel, fehlt = Detailgrad). Ansicht: Fensterteilung folgt dem Detailgrad (grob/vereinfacht: keine), `elevationDivision` - geht vor. Offen: Ansicht-Details (Rahmen/Laibung) nach Stufe; nicht in der Tauri-App geprüft. + geht vor. 11.11. Nachbesserung: grob = Sturz unten und Brüstung oben im Wandschnitt FLACH (kein Anschlag, keine Nase, + kein Schichteinzug [168]; `Visibility.flat_openings` aus `section_look == Line`, im Cache-Schlüssel, `section/bands.rs` + `section_reveal`, `parallel_reveal_cuts`); Grundriss grob: Leibung gerade, keine Anschlag-Nasen (Wand-Nasen in + `walls.rs`, Tür-Nasen in `plan/openings.rs`). Offen: Ansicht-Details (Rahmen/Laibung) nach Stufe; nicht in der Tauri-App geprüft. - ◐ **[178]** Deckenauflager an Aussenwänden (11.11., Wunsch Maintainer). Decke endet an der Aussenkante des Kerns ([33] `layer_positions`), Aussendämmung/Putz laufen an der Stirn durch — abgeleitet, Umriss bleibt (`model3d/bearing.rs`: Platten-Umriss minus Aussenschicht-Streifen, wo vor der Wand keine Decke liegt → `emit_slabs` diff --git a/src-tauri/core/src/plan/openings.rs b/src-tauri/core/src/plan/openings.rs index 3502476d..b3503047 100644 --- a/src-tauri/core/src/plan/openings.rs +++ b/src-tauri/core/src/plan/openings.rs @@ -238,7 +238,10 @@ fn plan_opening_inner(buf: &[f64]) -> Option> { } if has_frame { let zone = frame_band(&mut o, &w, position, width, frame_width, frame_block, frame_inset, frame_inset_side, hair); - rebate_nibs(&mut o, &w, position, width, rebate, zone); + // [184] Grob: Leibung gerade durchgezogen, keine Anschlag-Nase. + if detail != Detail::Grob { + rebate_nibs(&mut o, &w, position, width, rebate, zone); + } } if lintel != 0 { let half_d = total / 2.0; diff --git a/src-tauri/core/src/plan/section/bands.rs b/src-tauri/core/src/plan/section/bands.rs index d1ab4a02..e499b965 100644 --- a/src-tauri/core/src/plan/section/bands.rs +++ b/src-tauri/core/src/plan/section/bands.rs @@ -347,7 +347,7 @@ fn split_layers_along(cp: &Cut, p: &Project, layers: &[Layer], owner: &Wall, u_w } /// `splitWallLayers`: stehende Teil-Rechtecke je Schicht quer zur Dicke (u). -pub(super) fn split_wall_layers(cp: &Cut, p: &Project, layers: &[Layer], owner: &Wall, u_world: (f64, f64), plane: &Plane) -> Result, String> { +pub(super) fn split_wall_layers(cp: &Cut, p: &Project, layers: &[Layer], owner: &Wall, u_world: (f64, f64), plane: &Plane, flat: &HashSet) -> Result, String> { let total = sum_thickness(layers); let [u_min, u_max, v_min, v_max] = bbox(&cp.pts); let u_span = u_max - u_min; @@ -364,7 +364,7 @@ pub(super) fn split_wall_layers(cp: &Cut, p: &Project, layers: &[Layer], owner: let mut out = Vec::with_capacity(layers.len()); // [106] Schichteinzug am Sturz (Stück liegt über der Öffnung) bzw. an der Brüstung (darunter), // [94] Anschlag: die Schichten vor dem Rahmen reichen um die Anschlagtiefe in die Öffnung. - let (top, bottom) = section_reveal(p, owner, plane, v_min, v_max); + let (top, bottom) = section_reveal(p, owner, plane, v_min, v_max, flat); let n = layers.len(); let offsets: Vec = layers.iter().scan(0.0, |acc, l| { let o = *acc; *acc += l.thickness; Some(o) }).collect(); let mut acc = 0.0; @@ -444,13 +444,13 @@ pub(super) fn split_wall_layers(cp: &Cut, p: &Project, layers: &[Layer], owner: } /// Anschlag-Nasen eines einschaligen Wandbands (ganze Dicke als eine Schicht). -fn single_layer_nibs(p: &Project, owner: &Wall, cp: &Cut, u_world: (f64, f64), plane: &Plane) -> Vec<[f64; 4]> { +fn single_layer_nibs(p: &Project, owner: &Wall, cp: &Cut, u_world: (f64, f64), plane: &Plane, flat: &HashSet) -> Vec<[f64; 4]> { let total = sum_thickness(&p.wall_type_or_fallback(owner).layers); let [u_min, u_max, v_min, v_max] = bbox(&cp.pts); if !(total > 1e-9 && u_max - u_min > 1e-9) { return Vec::new(); } - let (top, bottom) = section_reveal(p, owner, plane, v_min, v_max); + let (top, bottom) = section_reveal(p, owner, plane, v_min, v_max, flat); if top.is_none() && bottom.is_none() { return Vec::new(); } @@ -536,7 +536,7 @@ fn rebate_nibs(top: &Option, bottom: &Option, (l0, l1): (f64 /// Schichteinzug und Anschlag der Öffnung, deren Sturz (unten an `v_min`) bzw. Brüstung (oben an `v_max`) /// dieses Wandstück ist und die die Schnittebene quert. -fn section_reveal(p: &Project, wall: &Wall, plane: &Plane, v_min: f64, v_max: f64) -> (Option, Option) { +fn section_reveal(p: &Project, wall: &Wall, plane: &Plane, v_min: f64, v_max: f64, flat: &HashSet) -> (Option, Option) { let (mut top, mut bottom) = (None, None); let u_raw = plane.u_model(); let l = hypot2(u_raw.0, u_raw.1); @@ -547,6 +547,10 @@ fn section_reveal(p: &Project, wall: &Wall, plane: &Plane, v_min: f64, v_max: f6 // Bogenwand: `wall` ist hier die Sehnen-Teilwand (mit Bulge) — die Öffnung sitzt auf der echten Wand. let host = p.walls.iter().find(|w| w.id == wall.id).unwrap_or(wall); for o in p.openings_of_wall(&wall.id) { + // [184] Grob: nur ein Strich, Sturz und Brüstung des Wandschnitts bleiben flach (kein Anschlag, kein Einzug). + if flat.contains(&o.id) { + continue; + } // Bogenwand ([T2]): Einzug auf der Sehne zwischen den Laibungen. let chord = arc_chord_opening(host, o); let (wall, o) = match &chord { @@ -584,7 +588,7 @@ fn section_reveal(p: &Project, wall: &Wall, plane: &Plane, v_min: f64, v_max: f6 } /// `attachCutStyles`: Stil, Herkunft, Schicht-Bänder, Terminierung, Dominanz. -pub(super) fn attach_cut_styles(cuts: Vec, p: &Project, plane: &Plane, walls: &[Option<&Wall>], slabs: &[SlabOwner]) -> Result, String> { +pub(super) fn attach_cut_styles(cuts: Vec, p: &Project, plane: &Plane, walls: &[Option<&Wall>], slabs: &[SlabOwner], flat: &HashSet) -> Result, String> { if cuts.is_empty() { return Ok(cuts); } @@ -606,7 +610,7 @@ pub(super) fn attach_cut_styles(cuts: Vec, p: &Project, plane: &Plane, wall if let Some(o) = owner { let wt = p.wall_type_or_fallback(o); if wt.layers.len() > 1 { - bands.extend(split_wall_layers(&cp, p, &wt.layers, o, u_world, plane)?); + bands.extend(split_wall_layers(&cp, p, &wt.layers, o, u_world, plane, flat)?); continue; } } @@ -617,7 +621,7 @@ pub(super) fn attach_cut_styles(cuts: Vec, p: &Project, plane: &Plane, wall cp.join_priority = owner.and_then(|o| wall_representative_priority(p, o)); cp.component_id = owner.and_then(|o| wall_representative_component_id(p, o)); // [94] Anschlag-Nase der einschaligen Wand: Band und Nase als ein Umriss. - let nibs = owner.map(|o| single_layer_nibs(p, o, &cp, u_world, plane)).unwrap_or_default(); + let nibs = owner.map(|o| single_layer_nibs(p, o, &cp, u_world, plane, flat)).unwrap_or_default(); if !nibs.is_empty() { let mut polys = vec![vec![cp.pts.clone()]]; polys.extend(nibs.iter().map(|r| vec![vec![[r[0], r[3]], [r[1], r[3]], [r[1], r[2]], [r[0], r[2]]]])); diff --git a/src-tauri/core/src/plan/section/mod.rs b/src-tauri/core/src/plan/section/mod.rs index 0dd560a7..a8bcc082 100644 --- a/src-tauri/core/src/plan/section/mod.rs +++ b/src-tauri/core/src/plan/section/mod.rs @@ -174,6 +174,9 @@ pub struct Visibility { pub has_display: bool, pub norender: HashSet, pub grey: HashSet, + /// [184] Öffnungen, die im Schnitt nur als Strich erscheinen (grob): im Wandschnitt an Sturz und Brüstung + /// weder Anschlag-Nase noch Schichteinzug (flache Kante). Vom Aufrufer aus dem Detailgrad gefüllt (`query.rs`). + pub flat_openings: HashSet, } impl Visibility { @@ -185,6 +188,7 @@ impl Visibility { has_display: v.get("hasDisplay").and_then(|b| b.as_bool()).unwrap_or(false), norender: set("norender"), grey: set("grey"), + flat_openings: HashSet::new(), } } /// `visibleCodes.has(code)` (ohne `visibleCodes`: wahr). @@ -602,7 +606,7 @@ pub(super) fn compute_plane(p: &Project, level: &LevelSpec, bodies: &[BodyMesh], let shown = |c: &str| vis.visible(c) && vis.render(c); let skip = |k: Kind, i: usize| edge_cats.get(&(k, i)).is_some_and(|c| !shown(c)); cuts.retain(|c| !skip(c.kind, c.index)); - let cuts = attach_cut_styles(cuts, p, &plane, &walls, &slabs)?; + let cuts = attach_cut_styles(cuts, p, &plane, &walls, &slabs, &vis.flat_openings)?; let cuts = merge_monolith_cuts(cuts, &slabs_r, &stair_flight_sections(p, plane.base(), plane.u_model())); let base = plane.base(); let u = plane.u_model(); @@ -612,7 +616,7 @@ pub(super) fn compute_plane(p: &Project, level: &LevelSpec, bodies: &[BodyMesh], bodies.retain(|b| !skip(Kind::Body, b.index)); let cuts = subtract_body_voids_in_section(cuts, &void_bodies, base, u); let cuts = subtract_pockets_in_section(cuts, p, base, u); - let mut cuts = parallel_reveal_cuts(cuts, p, &plane, &walls)?; + let mut cuts = parallel_reveal_cuts(cuts, p, &plane, &walls, &vis.flat_openings)?; append_body_sections(&mut cuts, p, &bodies, base, u); // [152] Netzkörper: geschnitten (Flächen bzw. offene Linien) und in der Projektion. Gelände ist ein eigenes // Element (`terrainMesh`, auch IFC-Gelände seit dem Import, [181]) und wird Geländelinie (`append_terrain_profiles`). diff --git a/src-tauri/core/src/plan/section/query.rs b/src-tauri/core/src/plan/section/query.rs index ce970096..3aeef6fa 100644 --- a/src-tauri/core/src/plan/section/query.rs +++ b/src-tauri/core/src/plan/section/query.rs @@ -48,7 +48,7 @@ fn cache_put(key: (f64, u64), o: std::rc::Rc) { pub fn section_plan_buf(p: &Project, args: &[f64], text: &str) -> Result, String> { let v: serde_json::Value = serde_json::from_str(text).map_err(|e| format!("Schnitt-Argumente: {e}"))?; let level = LevelSpec::from_json(v.get("level").unwrap_or(&serde_json::Value::Null)); - let vis = Visibility::from_json(&v); + let mut vis = Visibility::from_json(&v); let mono = args.first().is_some_and(|&x| x != 0.0); let openings = args.get(1).is_some_and(|&x| x != 0.0); let key = args.get(2).copied().unwrap_or(0.0); @@ -60,6 +60,21 @@ pub fn section_plan_buf(p: &Project, args: &[f64], text: &str) -> Result let hidden_ids = crate::plan::overrides::hidden_elements(p, rv); let filtered = (!hidden_ids.is_empty()).then(|| without_elements(p, &hidden_ids)); let p = filtered.as_ref().unwrap_or(p); + // [184] Öffnungen mit Detailgrad grob (Strich im Schnitt): Wandschnitt an Sturz/Brüstung flach. Das ändert die + // Schnittflächen, gehört also in den Schlüssel (unten) und in die Sichtbarkeit. + let open_mv = { + let detail = Detail::parse(v.get("detail").and_then(|d| d.as_str()).unwrap_or("mittel")); + let mv_id = v.get("modelView").and_then(|m| m.as_str()).filter(|m| !m.is_empty()).or(level.model_view.as_deref()); + crate::plan::model_view::for_view_scaled(p, mv_id, detail, scale) + }; + vis.flat_openings = p + .openings + .as_deref() + .unwrap_or(&[]) + .iter() + .filter(|o| open_mv.section_look(o.kind == crate::model::ElementKind::Door, o.detail_level) == crate::plan::model_view::SectionLook::Line) + .map(|o| o.id.clone()) + .collect(); // [180] Ausgeblendete Klassen gehören in den Schlüssel: sie nehmen an der Verdeckung nicht teil, der Schnitt // hängt also an ihnen (graue nicht). let hkey = { @@ -68,8 +83,16 @@ pub fn section_plan_buf(p: &Project, args: &[f64], text: &str) -> Result let mut codes: Vec<&String> = vis.hidden_codes().collect(); codes.sort(); codes.dedup(); - let empty = ids.is_empty() && codes.is_empty(); - ids.iter().flat_map(|s| s.bytes().chain([0u8])).chain([1u8]).chain(codes.iter().flat_map(|s| s.bytes().chain([0u8]))).fold(if empty { 0 } else { 0xcbf2_9ce4_8422_2325u64 }, |h, b| (h ^ b as u64).wrapping_mul(0x0000_0100_0000_01b3)) + let mut flat: Vec<&String> = vis.flat_openings.iter().collect(); + flat.sort(); + let empty = ids.is_empty() && codes.is_empty() && flat.is_empty(); + ids.iter() + .flat_map(|s| s.bytes().chain([0u8])) + .chain([1u8]) + .chain(codes.iter().flat_map(|s| s.bytes().chain([0u8]))) + .chain([2u8]) + .chain(flat.iter().flat_map(|s| s.bytes().chain([0u8]))) + .fold(if empty { 0 } else { 0xcbf2_9ce4_8422_2325u64 }, |h, b| (h ^ b as u64).wrapping_mul(0x0000_0100_0000_01b3)) }; let key = (key, hkey); let mut w = crate::plan::buf::Writer::new(true); @@ -89,7 +112,6 @@ pub fn section_plan_buf(p: &Project, args: &[f64], text: &str) -> Result }; let hidden = v.get("hiddenLines").and_then(|b| b.as_bool()).unwrap_or(false); let detail = Detail::parse(v.get("detail").and_then(|d| d.as_str()).unwrap_or("mittel")); - let detail_arg = detail; // [173] Modelldarstellung: ausdrücklich angefragt (Blatt-Ausschnitt), sonst die der Ebene; ihre Basis // ersetzt den Detailgrad. Ohne Wahl wie bisher. let mv_id = v.get("modelView").and_then(|m| m.as_str()).filter(|m| !m.is_empty()).or(level.model_view.as_deref()); @@ -112,7 +134,6 @@ pub fn section_plan_buf(p: &Project, args: &[f64], text: &str) -> Result let prims = trees; w.group(&prims); // [184] Öffnungen wie im Grundriss: Detailgrad aus Stufe bzw. Massstab (mittel ab 1:200 grob). - let open_mv = crate::plan::model_view::for_view_scaled(p, mv_id, detail_arg, scale); let mut ops = Vec::new(); if openings { for (l, s) in &parts { diff --git a/src-tauri/core/src/plan/section/shapes.rs b/src-tauri/core/src/plan/section/shapes.rs index d2b03ef4..2b81eba9 100644 --- a/src-tauri/core/src/plan/section/shapes.rs +++ b/src-tauri/core/src/plan/section/shapes.rs @@ -355,7 +355,7 @@ pub(super) fn is_void_solid(s: &ExtrudedSolid) -> bool { /// [106] Schnitt parallel zur Wand durch die Leibungen: Die geschnittene Schicht springt an den /// Öffnungen um ihren Rücksprung zurück (Loch geweitet), ihre Zusatzstücke (Leibungsdämmung, Putz, /// Überdämmung), die die Schnittebene quert, kommen als Schnittfläche im Stil der Schicht dazu. -pub(super) fn parallel_reveal_cuts(mut cuts: Vec, p: &Project, plane: &Plane, walls: &[Option<&Wall>]) -> Result, String> { +pub(super) fn parallel_reveal_cuts(mut cuts: Vec, p: &Project, plane: &Plane, walls: &[Option<&Wall>], flat: &HashSet) -> Result, String> { use crate::opening_detail::SIDES; let (base, u_raw) = (plane.base(), plane.u_model()); let l = hypot2(u_raw.0, u_raw.1); @@ -403,6 +403,9 @@ pub(super) fn parallel_reveal_cuts(mut cuts: Vec, p: &Project, plane: &Plan vec![[ua, z0], [ub, z0], [ub, z1], [ua, z1]] }; for o in p.openings_of_wall(&w.id) { + if flat.contains(&o.id) { + continue; + } let Some(r) = crate::opening_detail::opening_reveal(p, w, o) else { continue }; let (zb, zt) = opening_extent(p, w, o); // Rücksprung je Seite dieser Schicht; die seitlichen reichen in die Ecken oben/unten. diff --git a/src-tauri/core/src/plan/section/tests.rs b/src-tauri/core/src/plan/section/tests.rs index a5a16619..985643d3 100644 --- a/src-tauri/core/src/plan/section/tests.rs +++ b/src-tauri/core/src/plan/section/tests.rs @@ -556,6 +556,43 @@ fn anschlag_im_schnitt_sturz_nase_und_bruestung() { assert_eq!(k, count["insulation"], "Einzug gehört zum Band"); } +/// [184] Grob (Fenster nur als Strich): Sturz-Unterkante und Brüstungs-Oberkante des Wandschnitts sind flach — +/// kein Anschlag, keine Nase, kein Schichteinzug. Fein (ohne `flat_openings`) bleibt wie bisher. +#[test] +fn grob_wandschnitt_an_oeffnung_flach() { + let mut p = sample_flush(); + let o1 = p.openings.as_deref().unwrap().iter().find(|o| o.id == "O1").unwrap().clone(); + let w1 = p.walls.iter().find(|w| w.id == "W1").unwrap().clone(); + let (u, n) = axis_frame(&w1); + let m = o1.position + o1.width / 2.0; + let c = (w1.start.x + u.0 * m, w1.start.y + u.1 * m); + let l = LevelSpec { kind: "section".into(), line: Some([Vec2 { x: c.0 - n.0 * 3.0, y: c.1 - n.1 * 3.0 }, Vec2 { x: c.0 + n.0 * 3.0, y: c.1 + n.1 * 3.0 }]), ..Default::default() }; + let (zb, zt) = opening_extent(&p, &w1, &o1); + // Anschlag 5 cm und Überdämmung 3 cm: im Fein-Schnitt Nase bzw. Einzug. + for t in p.window_types.iter_mut().flatten() { + t.inset_face = Some(WindowTypeInsetFace::Aussen); + t.inset_from_face = Some(0.18); + t.rebate_depth = Some(0.05); + } + for o in p.openings.iter_mut().flatten().filter(|o| o.id == "O1") { + o.layer_reveals = Some(vec![crate::model::LayerReveal { layer: 1.0, mode: crate::model::RevealMode::Ueberdaemmt, amount: Some(0.03), ..Default::default() }]); + } + // Alle Wandschnitt-Kanten in der Öffnungshöhe: nur zb und zt (keine Stufe dazwischen). + let ys = |vis: &Visibility| -> Vec { + let out = compute_section_vis(&p, &l, &[], vis).unwrap().unwrap(); + let mut ys: Vec = out.cuts.iter().filter(|c| c.kind == Kind::Wall && c.source_id.as_deref() == Some("W1")).flat_map(|c| c.pts.iter().map(|q| q[1])).filter(|y| *y > zb - 0.1 && *y < zt + 0.1).collect(); + ys.sort_by(|a, b| a.partial_cmp(b).unwrap()); + ys.dedup_by(|a, b| (*a - *b).abs() < 1e-6); + ys + }; + let fine = ys(&Visibility::default()); + assert!(fine.iter().any(|y| (y - (zt - 0.05)).abs() < 1e-6) && fine.iter().any(|y| (y - (zb + 0.05)).abs() < 1e-6), "fein: Anschlag {fine:?}"); + let flat = Visibility { flat_openings: ["O1".to_string()].into(), ..Default::default() }; + let rough = ys(&flat); + assert!(rough.iter().all(|y| (y - zb).abs() < 1e-6 || (y - zt).abs() < 1e-6), "grob: keine Stufe {rough:?}"); + assert!(rough.iter().any(|y| (y - zb).abs() < 1e-6) && rough.iter().any(|y| (y - zt).abs() < 1e-6), "{rough:?}"); +} + /// [G3] Rundbogen-Fenster: an der Schnittstelle reicht die Wand bis an den Bogen, Rahmen/Glas folgen. #[test] fn rundbogen_im_schnitt() { diff --git a/src-tauri/core/src/plan/section/ts_faelle.rs b/src-tauri/core/src/plan/section/ts_faelle.rs index 0a66bd50..9228ebc0 100644 --- a/src-tauri/core/src/plan/section/ts_faelle.rs +++ b/src-tauri/core/src/plan/section/ts_faelle.rs @@ -264,8 +264,8 @@ fn schichten_aussen_aussen_und_override_auf_allen_schichten() { let w2 = p.walls.iter().find(|w| w.id == "W2").unwrap().clone(); let w4 = p.walls.iter().find(|w| w.id == "W4").unwrap().clone(); let u = (1.0, 0.0); - let b2 = split_wall_layers(&cp, &p, &layers, &w2, u, &Plane { point: [0.0; 3], normal: [1.0, 0.0, 0.0] }).unwrap(); - let b4 = split_wall_layers(&cp, &p, &layers, &w4, u, &Plane { point: [0.0; 3], normal: [1.0, 0.0, 0.0] }).unwrap(); + let b2 = split_wall_layers(&cp, &p, &layers, &w2, u, &Plane { point: [0.0; 3], normal: [1.0, 0.0, 0.0] }, &Default::default()).unwrap(); + let b4 = split_wall_layers(&cp, &p, &layers, &w4, u, &Plane { point: [0.0; 3], normal: [1.0, 0.0, 0.0] }, &Default::default()).unwrap(); // W4 (Aussenseite −x): layers[0] an uMin; W2 gespiegelt: layers[0] an uMax. assert_eq!(b4[0].component_id.as_deref(), Some(layers[0].component_id.as_str())); assert!(close(bbox(&b4[0].pts)[0], 0.0)); @@ -273,6 +273,6 @@ fn schichten_aussen_aussen_und_override_auf_allen_schichten() { // Override der Wand gilt für jede Schicht p.walls[1].background = Some("#123456".into()); let w = p.walls[1].clone(); - let bands = split_wall_layers(&cp, &p, &layers, &w, u, &Plane { point: [0.0; 3], normal: [1.0, 0.0, 0.0] }).unwrap(); + let bands = split_wall_layers(&cp, &p, &layers, &w, u, &Plane { point: [0.0; 3], normal: [1.0, 0.0, 0.0] }, &Default::default()).unwrap(); assert!(bands.iter().all(|b| b.fill.as_deref() == Some("#123456"))); } diff --git a/src-tauri/core/src/plan/walls.rs b/src-tauri/core/src/plan/walls.rs index 1e1985c7..5ab36651 100644 --- a/src-tauri/core/src/plan/walls.rs +++ b/src-tauri/core/src/plan/walls.rs @@ -984,7 +984,8 @@ fn opening_detail_plan(c: &Ctx, out: &mut Vec, w: &Wall, o: &Opening, let id = Some(o.id.as_str()); let frame = od::frame_of(p, o); // Anschlag je Seite. - if let (Some(r), Some(f)) = (rebate, frame.as_ref()) { + // [184] Grob: Leibung gerade, kein Anschlag. + if let (Some(r), Some(f)) = (rebate.filter(|_| s.detail != Detail::Grob), frame.as_ref()) { if let Some((z0, z1)) = f.rebate_zone(total) { let category = c.cat(&w.category_code); let angle = atan2(w.end.y - w.start.y, w.end.x - w.start.x) * 180.0 / std::f64::consts::PI;