[280] Träger/Unterzug als eigenes Bauteil: Project.beams, Plan (gestrichelt mit Achse), Schnitt, Ansicht, 3D, IFC IfcBeam, DXF, Befehl traeger, Objekt-Info, Griffe, Beispiel Musterhaus komplex
This commit is contained in:
97 files changed
+1479
-81
No files matched your search
@@ -126,6 +126,8 @@ pub enum SlabOwner<'a> {
|
||||
Ceiling(&'a Ceiling, Option<usize>),
|
||||
Stair(&'a Stair),
|
||||
Column(&'a Column),
|
||||
/// [280] Träger.
|
||||
Beam(&'a Beam),
|
||||
}
|
||||
|
||||
/// Je emittierter Platte (Deckenschicht, Treppentritt, Podest) ihre Herkunft (`RSlab::source`).
|
||||
@@ -138,6 +140,7 @@ pub fn slab_owners<'a>(p: &'a Project, slabs: &[RSlab]) -> Vec<SlabOwner<'a>> {
|
||||
SlabSource::Ceiling { index, layer } => ceilings.get(index).map_or(SlabOwner::None, |c| SlabOwner::Ceiling(c, layer)),
|
||||
SlabSource::Stair { index } => stairs.get(index).map_or(SlabOwner::None, SlabOwner::Stair),
|
||||
SlabSource::Column { index } => p.columns.as_deref().and_then(|c| c.get(index)).map_or(SlabOwner::None, SlabOwner::Column),
|
||||
SlabSource::Beam { index } => p.beams.as_deref().and_then(|c| c.get(index)).map_or(SlabOwner::None, SlabOwner::Beam),
|
||||
SlabSource::None => SlabOwner::None,
|
||||
})
|
||||
.collect()
|
||||
@@ -685,14 +688,20 @@ pub(super) fn attach_cut_styles(cuts: Vec<Cut>, p: &Project, plane: &Plane, wall
|
||||
cp.category = Some(st.category_code.clone());
|
||||
}
|
||||
// [141] Stütze: Stil und Rang ihres Bauteils (wie im Grundriss); ohne Bauteil dominiert sie.
|
||||
SlabOwner::Column(c) => {
|
||||
cp.source_id = Some(c.id.clone());
|
||||
cp.category = Some(c.category_code.clone());
|
||||
let comp = c.component_id.as_deref().filter(|s| !s.is_empty()).and_then(|id| p.component(id));
|
||||
// [280] Träger genauso (eigene Felder, gleiche Auflösung).
|
||||
o @ (SlabOwner::Column(_) | SlabOwner::Beam(_)) => {
|
||||
let (id, code, component_id, hatch_id, hatch_source, foreground, foreground_source) = match o {
|
||||
SlabOwner::Column(c) => (&c.id, &c.category_code, &c.component_id, &c.hatch_id, c.hatch_source, &c.foreground, c.foreground_source),
|
||||
SlabOwner::Beam(c) => (&c.id, &c.category_code, &c.component_id, &c.hatch_id, c.hatch_source, &c.foreground, c.foreground_source),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
cp.source_id = Some(id.clone());
|
||||
cp.category = Some(code.clone());
|
||||
let comp = component_id.as_deref().filter(|s| !s.is_empty()).and_then(|id| p.component(id));
|
||||
if let Some(k) = comp {
|
||||
let category = p.layer_category(&c.category_code);
|
||||
let hid = resolve_hatch_id(c.hatch_id.as_deref(), c.hatch_source, category, Some(&k.hatch_id)).unwrap_or(&k.hatch_id);
|
||||
if let Some(h) = resolve_hatch(p, hid, None, resolve_foreground(k, c.foreground.as_deref(), category, c.foreground_source), None) {
|
||||
let category = p.layer_category(code);
|
||||
let hid = resolve_hatch_id(hatch_id.as_deref(), hatch_source, category, Some(&k.hatch_id)).unwrap_or(&k.hatch_id);
|
||||
if let Some(h) = resolve_hatch(p, hid, None, resolve_foreground(k, foreground.as_deref(), category, foreground_source), None) {
|
||||
cp.fill = Some(poche_fill(h.pattern).to_string());
|
||||
cp.hatch = Some(h);
|
||||
}
|
||||
|
||||
@@ -602,6 +602,7 @@ pub(crate) fn edge_categories(p: &Project, walls: &[Option<&Wall>], slabs: &[ban
|
||||
bands::SlabOwner::Ceiling(c, _) => &c.category_code,
|
||||
bands::SlabOwner::Stair(st) => &st.category_code,
|
||||
bands::SlabOwner::Column(c) => &c.category_code,
|
||||
bands::SlabOwner::Beam(c) => &c.category_code,
|
||||
bands::SlabOwner::None => continue,
|
||||
};
|
||||
m.insert((Kind::Slab, i), code.clone());
|
||||
@@ -628,6 +629,7 @@ pub(crate) fn edge_ids(p: &Project, walls: &[Option<&Wall>], slabs: &[bands::Sla
|
||||
bands::SlabOwner::Ceiling(c, _) => &c.id,
|
||||
bands::SlabOwner::Stair(st) => &st.id,
|
||||
bands::SlabOwner::Column(c) => &c.id,
|
||||
bands::SlabOwner::Beam(c) => &c.id,
|
||||
bands::SlabOwner::None => continue,
|
||||
};
|
||||
m.insert((Kind::Slab, i), id.clone());
|
||||
|
||||
@@ -329,7 +329,7 @@ impl<'a> SectionMv<'a> {
|
||||
pos.get(li).copied()
|
||||
})
|
||||
.collect();
|
||||
let columns = p.columns.as_deref().unwrap_or(&[]).iter().map(|c| c.id.clone()).collect();
|
||||
let columns = p.columns.as_deref().unwrap_or(&[]).iter().map(|c| c.id.clone()).chain(p.beams.iter().flatten().map(|b| b.id.clone())).collect();
|
||||
SectionMv { o, layer_pos, columns }
|
||||
}
|
||||
|
||||
|
||||
@@ -348,6 +348,7 @@ pub(crate) fn model_view_faces(p: &Project, vis: &Visibility, view: &dyn Fn([f64
|
||||
Some(SlabOwner::Ceiling(c, _)) => (Some(c.id.clone()), false, false),
|
||||
Some(SlabOwner::Stair(s)) => (Some(s.id.clone()), true, false),
|
||||
Some(SlabOwner::Column(c)) => (Some(c.id.clone()), false, true),
|
||||
Some(SlabOwner::Beam(c)) => (Some(c.id.clone()), false, true),
|
||||
_ => (None, false, false),
|
||||
},
|
||||
Kind::Roof => (roofs.get(i).map(|r| r.id.clone()), false, false),
|
||||
|
||||
Reference in new issue
Block a user