[148] Flachdach: Attika (parapetHeight/Width/ComponentId) in 3D, Schnitt, Ansicht, Grundriss, Objekt-Info
Neues Modul roof_parapet.rs: Ringkörper auf dem Traufumriss des Flachdachs (kurze Kanten werden zusammengezogen, damit der Innenring nicht umklappt). 3D über emit_roofs, Schnitt mit Schraffur des Bauteils, Ansicht über die Dach-Sichtflächen, Grundriss-Innenkante auf der Dach-Ebene. Musterhaus komplex: Erker mit Betonattika. Gefälle der Dachhaut bleibt offen (TODO).
This commit is contained in:
21 files changed
+350
-21
No files matched your search
@@ -823,6 +823,13 @@ fn roofs(c: &Ctx, out: &mut Vec<Primitive>, bounds: &mut Bounds) {
|
||||
out.push(line(pts[i], pts[(i + 1) % n], "roof-eaves", ROOF_EAVES_MM, overhead.clone(), stroke, greyed));
|
||||
}
|
||||
}
|
||||
// Attika ([148]): Innenkante des Ringkörpers (Aussenkante = Traufe).
|
||||
if let Some(pp) = crate::roof_parapet::parapet(roof, &geo) {
|
||||
let n = pp.inner.len();
|
||||
for i in 0..n {
|
||||
out.push(line(pv(pp.inner[i]), pv(pp.inner[(i + 1) % n]), "roof-parapet", ROOF_EAVES_MM, overhead.clone(), stroke, greyed));
|
||||
}
|
||||
}
|
||||
for l in &geo.ridges {
|
||||
out.push(line(pv(l[0]), pv(l[1]), "roof-ridge", ROOF_RIDGE_MM, overhead.clone(), stroke, greyed));
|
||||
}
|
||||
|
||||
@@ -253,7 +253,8 @@ pub(super) fn collect_roof_faces(p: &Project, frame: &[f64; 9], walls: &[RWall])
|
||||
})
|
||||
.map(|q| q.to_vec());
|
||||
// Ohne Wände bis ans Dach zusätzlich die Giebeldreiecke ([132]: Stirnen immer).
|
||||
if floors.contains(roof.floor_id.as_str()) { fascia.collect() } else { g.gables.iter().cloned().chain(fascia).collect::<Vec<_>>() }
|
||||
let parapet = crate::roof_parapet::parapet(roof, &g).map(|pp| crate::roof_parapet::view_faces(&pp)).unwrap_or_default();
|
||||
if floors.contains(roof.floor_id.as_str()) { fascia.chain(parapet).collect() } else { g.gables.iter().cloned().chain(fascia).chain(parapet).collect::<Vec<_>>() }
|
||||
};
|
||||
roofs.push(RoofIn { id: roof.id.clone(), fill, planes: crate::roof_assembly::planar_faces(&solids.top, &front(&solids.top)), gables });
|
||||
let wall_comp = solids.parts.iter().find(|pt| pt.role == crate::roof_assembly::Role::DormerWall && pt.layer == 0).and_then(|pt| p.component(&pt.component_id));
|
||||
@@ -269,7 +270,8 @@ pub(super) fn collect_roof_faces(p: &Project, frame: &[f64; 9], walls: &[RWall])
|
||||
// in der Ansicht auf der Kante).
|
||||
let total: f64 = p.roof_layers(roof).iter().map(|l| l.thickness.max(0.0)).sum();
|
||||
let fascia = fascia_quads(&g.planes, total).into_iter().map(|q| q.to_vec());
|
||||
let gables = if floors.contains(roof.floor_id.as_str()) { fascia.collect() } else { g.gables.iter().cloned().chain(fascia).collect() };
|
||||
let parapet = crate::roof_parapet::parapet(roof, &g).map(|pp| crate::roof_parapet::view_faces(&pp)).unwrap_or_default();
|
||||
let gables = if floors.contains(roof.floor_id.as_str()) { fascia.chain(parapet).collect() } else { g.gables.iter().cloned().chain(fascia).chain(parapet).collect() };
|
||||
roofs.push(RoofIn { id: roof.id.clone(), fill, planes: g.planes.clone(), gables });
|
||||
}
|
||||
Ok(project_faces(frame, &[], &[], &roofs))
|
||||
|
||||
@@ -190,7 +190,8 @@ pub(super) fn projection_edges(p: &Project, plane: &Plane, walls_r: &[RWall], wi
|
||||
// Stirnflächen der Ränder ([132]): Flachdächer zeigen sonst hinter dem Schnitt nur eine Linie.
|
||||
let total: f64 = p.roof_layers(roof).iter().map(|l| l.thickness.max(0.0)).sum();
|
||||
let fascia: Vec<Vec<[f64; 3]>> = crate::plan::elevation::fascia_quads(&g.planes, total).into_iter().map(|q| q.to_vec()).collect();
|
||||
for poly in g.planes.iter().chain(&g.gables).chain(&fascia) {
|
||||
let parapet = crate::roof_parapet::parapet(roof, &g).map(|pp| crate::roof_parapet::view_faces(&pp)).unwrap_or_default();
|
||||
for poly in g.planes.iter().chain(&g.gables).chain(&fascia).chain(¶pet) {
|
||||
let w: Vec<[f64; 3]> = poly.iter().map(|q| [q[0], q[2], q[1]]).collect();
|
||||
if w.len() >= 3 {
|
||||
push(&mut faces, &w, [0.0; 3], owner, 0, true);
|
||||
|
||||
@@ -148,6 +148,18 @@ pub(super) fn append_roof_sections(cuts: &mut Vec<Cut>, p: &Project, plane: &Pla
|
||||
let (ux, uy) = plane.u_model();
|
||||
let nb = crate::roof_assembly::neighbors_rc(p);
|
||||
for (index, roof) in roofs.iter().enumerate() {
|
||||
// Attika ([148]): geschnittener Ringkörper, Schraffur des Bauteils.
|
||||
if let Some(pp) = crate::roof_parapet::parapet(roof, &crate::roof::roof_geometry(&roof.params(), p.roof_base_elevation(roof))) {
|
||||
let hatch = roof.parapet_component_id.as_deref().and_then(|id| p.component(id)).and_then(|comp| resolve_hatch(p, &comp.hatch_id, None, None, None));
|
||||
for pts in crate::roof_assembly::section_rings(&crate::roof_parapet::mesh(&pp), (bx, by), (ux, uy)) {
|
||||
let mut c = Cut::new(Kind::Roof, index, pts);
|
||||
if let Some(h) = &hatch {
|
||||
c.fill = Some(poche_fill(h.pattern).to_string());
|
||||
c.hatch = Some(h.clone());
|
||||
}
|
||||
cuts.push(c);
|
||||
}
|
||||
}
|
||||
// Verschnittene Dächer und Gauben ([G5]): Schnitt durch die Körper je Schicht.
|
||||
if let Some(solids) = crate::roof_assembly::roof_solids_with(p, index, &nb) {
|
||||
let rl = p.roof_layers(roof);
|
||||
|
||||
Reference in new issue
Block a user