Merge [281] Geneigte Decken und Rampen (IFC-Datensatz der geneigten Decke auf 27, 26 bleibt Geländer)

This commit is contained in:
Claude committed 2026-11-18 00:50:05 +00:00
commit b6d8a6c2ad
60 files changed
+1273 -66

No files matched your search

+2 -2
View File
@@ -68,7 +68,7 @@ fn axis(w: &Wall) -> Option<([f64; 2], [f64; 2], f64)> {
fn overlaps_z(p: &Project, w: &Wall, c: &Ceiling) -> bool {
let (wb, wt) = p.wall_vertical_extent(w);
let (cb, ct) = p.ceiling_vertical_extent(c);
let (cb, ct) = p.ceiling_vertical_span(c);
wt.min(ct) - wb.max(cb) > Z_EPS
}
@@ -412,7 +412,7 @@ pub(crate) fn bearing_outlines_memo(p: &Project, known: &HashMap<String, WallCut
if c.outline.len() < 3 {
continue;
}
let (cb, ct) = p.ceiling_vertical_extent(c);
let (cb, ct) = p.ceiling_vertical_span(c);
let near: Vec<usize> = (0..p.walls.len()).filter(|&i| ext[i].1.min(ct) - ext[i].0.max(cb) > Z_EPS).collect();
let mut key: Vec<(u64, WallCuts)> = near.iter().map(|&i| (stamps.get(i).copied().unwrap_or(0), cuts_of(&p.walls[i]).clone())).collect();
// [216] Die Sehnen-Zonen der Bogenwände hängen auch an Öffnungen (anderer Geschosse): mit in den Schlüssel.
+2 -1
View File
@@ -83,7 +83,7 @@ pub(crate) fn emit_slabs_from(p: &Project, bearing: &[Option<Vec<crate::flat::Po
let outline: Vec<RVec2> = d.ring.clone();
for (layer_idx, z_bottom, z_top) in d.slabs {
let Some(layers) = layers.filter(|_| layer_idx >= 0) else {
out.push(RSlab { outline: outline.clone(), z_bottom, z_top, color: SLAB_RGB, ceiling_id: c.id.clone(), hatch: None, cut: None, monolith: None, source: SlabSource::Ceiling { index: ci, layer: None } });
out.push(RSlab { outline: outline.clone(), z_bottom, z_top, color: SLAB_RGB, ceiling_id: c.id.clone(), hatch: None, cut: None, monolith: None, slope: c.slope_plane(), source: SlabSource::Ceiling { index: ci, layer: None } });
continue;
};
let l = &layers[layer_idx as usize];
@@ -111,6 +111,7 @@ pub(crate) fn emit_slabs_from(p: &Project, bearing: &[Option<Vec<crate::flat::Po
hatch: resolve_component_hatch(p, &l.component_id, None),
cut,
monolith: None,
slope: c.slope_plane(),
source: SlabSource::Ceiling { index: ci, layer: Some(layer_idx as usize) },
});
}
+1 -1
View File
@@ -133,7 +133,7 @@ pub fn column_slabs(p: &Project) -> Vec<RSlab> {
for (foot, z_bottom, z_top) in column_pieces(p, c) {
let outline: Vec<RVec2> = foot.iter().map(|q| [q.x, q.y]).collect();
if z_top - z_bottom > 1e-6 && outline.iter().flatten().all(|v| v.is_finite()) {
out.push(RSlab { outline, z_bottom, z_top, color, ceiling_id: c.id.clone(), hatch: None, cut: None, monolith: None, source: SlabSource::Column { index } });
out.push(RSlab { outline, z_bottom, z_top, color, ceiling_id: c.id.clone(), hatch: None, cut: None, monolith: None, slope: None, source: SlabSource::Column { index } });
}
}
}
+11
View File
@@ -85,12 +85,23 @@ pub struct RSlab {
pub cut: Option<RCutMeta>,
#[serde(skip_serializing_if = "Option::is_none")]
pub monolith: Option<String>,
/// [281] Geneigte Decke/Rampe: Neigungsebene `[ox, oy, gx, gy]` — jede Höhe der Platte (Ober- und
/// Unterkante) liegt am Grundrisspunkt (x, y) um `gx·(x−ox) + gy·(y−oy)` höher ([`RSlab::dz`]).
#[serde(skip_serializing_if = "Option::is_none")]
pub slope: Option<[f64; 4]>,
/// Herkunft der Platte (nur im Kern, nicht serialisiert): der Schnitt ordnet seine Bänder darüber
/// der Decke bzw. Deckenschicht oder der Treppe zu, statt die Platten abzuzählen.
#[serde(skip)]
pub source: SlabSource,
}
impl RSlab {
/// [281] Höhenversatz am Grundrisspunkt (x, y) (waagrecht 0).
pub fn dz(&self, x: f64, y: f64) -> f64 {
self.slope.as_ref().map_or(0.0, |g| crate::model::helpers::slope_dz(g, x, y))
}
}
/// Herkunft einer `RSlab`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum SlabSource {
+1
View File
@@ -79,6 +79,7 @@ fn stair_slabs(stairs: &[(usize, &Stair)], slabs: Vec<crate::stairs3d::Slab>) ->
hatch: None,
cut: None,
monolith: s.monolith.then(|| stair.id.clone()),
slope: None,
source: SlabSource::Stair { index: si },
}
})
+2 -1
View File
@@ -624,7 +624,8 @@ pub(crate) fn floor_context_with(p: &Project, floor_id: &str, with_ceilings: boo
/// Wie [`floor_context_with`] mit schon gerechneten Platten-Umrissen je Decke (`bearing`, Index wie
/// `Project::ceilings`, s. `bearing::bearing_outlines_memo`; [214] 3D-Cache).
pub(crate) fn floor_context_from(p: &Project, floor_id: &str, with_ceilings: bool, bearing: &[Option<Vec<crate::flat::Polygon>>]) -> FloorContext {
let only = |c: &Ceiling| with_ceilings && c.floor_id == floor_id && c.outline.len() >= 3;
// [281] Geneigte Decken schneiden die Wandschichten (noch) nicht ein: die Schnitt-Bänder sind waagrecht.
let only = |c: &Ceiling| with_ceilings && c.floor_id == floor_id && c.outline.len() >= 3 && c.slope_plane().is_none();
let ceilings: Vec<CeilingIn> = p
.ceilings
.as_deref()