[109][110] Merge: SIA-400-Schraffuren (Dämmschlange, EPS/XPS, Holzfaser, Holz, Naturstein, Erdreich, Kies …), Linientyp ohne Strichstärke (Format 4, Migration)

Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
Claude committed 2026-10-30 02:48:39 +00:00
commit 081f8023c5
35 files changed
+855 -411

No files matched your search

+1 -1
View File
@@ -575,7 +575,7 @@ fn emit_inner(c: &Ctx, d: &Drawing2D, attrs: Attrs, geom: &Drawing2DGeom, greyed
let ls_idx = attrs.line_style_id.filter(|s| !s.is_empty()).and_then(|id| p.line_styles.iter().position(|l| l.id == id));
let ls = ls_idx.map(|i| &p.line_styles[i]);
let color = attrs.color.or(ls.map(|l| l.color.as_str())).or(category.map(|k| k.color.as_str())).unwrap_or(MONO_INK);
let weight = resolve_stroke_weight(attrs.weight, d.stroke_weight_source, category, ls.map(|l| l.weight).or(category.map(|k| k.lw)).unwrap_or(WALL_FALLBACK_MM));
let weight = resolve_stroke_weight(attrs.weight, d.stroke_weight_source, category, category.map(|k| k.lw).unwrap_or(WALL_FALLBACK_MM));
let dash_scale = match d.dash_scale {
Some(s) if s > 0.0 => s,
_ => 1.0,
+9 -3
View File
@@ -26,7 +26,9 @@ const SECTION_HIDDEN_MM: f64 = 0.13;
const SECTION_HIDDEN_DASH: [f64; 2] = [0.12, 0.08];
/// Achswinkel geschnittener Wände/Decken für wandrelative Muster (s. `toSection.ts`).
const SECTION_WALL_AXIS_ANGLE_DEG: f64 = 90.0;
const SECTION_SLAB_AXIS_ANGLE_DEG: f64 = 90.0;
/// Decken liegen: wandbezogene Muster laufen waagrecht entlang der Schicht ([109]; vorher 90° wie Wände,
/// dann lagen Querstriche der Dämmung längs und die Dämmschlange stand quer).
const SECTION_SLAB_AXIS_ANGLE_DEG: f64 = 0.0;
/// Seitenrand (m) der Geländelinie um den Inhalt des Schnitts.
const TERRAIN_MARGIN: f64 = 6.0;
/// Neutrale Füllung geschnittener freier Körper.
@@ -434,7 +436,9 @@ fn wall_section_style(p: &Project, wall: &Wall) -> Option<(String, HatchRender)>
}
let best = best?;
let category = p.layer_category(&wall.category_code);
let angle = atan2(wall.end.y - wall.start.y, wall.end.x - wall.start.x) * 180.0 / std::f64::consts::PI;
// Im Schnitt steht die geschnittene Wand senkrecht — wandbezogene Muster wie bei den Schicht-Bändern
// (`split_wall_layers`), nicht nach dem Grundriss-Winkel der Wand ([109]).
let angle = SECTION_WALL_AXIS_ANGLE_DEG;
let hatch_id = resolve_hatch_id(wall.hatch_id.as_deref(), wall.hatch_source, category, Some(&best.hatch_id)).unwrap_or(&best.hatch_id);
let hatch = resolve_hatch(p, hatch_id, Some(angle), resolve_foreground(best, wall.foreground.as_deref(), category, wall.foreground_source), None)?;
Some((poche_fill(hatch.pattern).to_string(), hatch))
@@ -897,7 +901,9 @@ fn append_roof_sections(cuts: &mut Vec<Cut>, p: &Project, plane: &Plane) {
for h in &holes {
pieces = pieces.iter().flat_map(|pc| crate::opening_shape::subtract_convex(pc, h)).collect();
}
let hatch = if layer.component_id.is_empty() { None } else { p.component(&layer.component_id).and_then(|comp| resolve_hatch(p, &comp.hatch_id, None, None, None)) };
// Wandbezogene Muster laufen entlang der Dachneigung ([109]: Dämmschlange über die Schichtdicke).
let slope_deg = atan2(z1 - z0, t_hi - t_lo) * 180.0 / std::f64::consts::PI;
let hatch = if layer.component_id.is_empty() { None } else { p.component(&layer.component_id).and_then(|comp| resolve_hatch(p, &comp.hatch_id, Some(slope_deg), None, None)) };
for pts in pieces {
let mut c = Cut::new(Kind::Roof, index, pts);
if let Some(h) = &hatch {
+1 -1
View File
@@ -101,7 +101,7 @@ pub fn resolve_hatch(p: &Project, hatch_id: &str, wall_angle_deg: Option<f64>, f
angle,
origin: p_origin,
color: foreground.unwrap_or(HATCH_INK).to_string(),
line_weight: ls.map_or(0.13, |l| l.weight),
line_weight: h.line_weight.unwrap_or(0.13),
dash: ls.and_then(|l| l.dash.clone()),
kind: h.kind,
lines: h.lines,
+1 -1
View File
@@ -225,7 +225,7 @@ fn wall_poche(c: &Ctx, out: &mut Vec<Primitive>, e: &EffWall, gaps: &[(f64, f64)
a,
b,
"layer-joint",
jls.map_or(layer_mm, |s| s.weight * detail.layer_factor()),
wt.layers.get(li).and_then(|l| l.joint_weight_mm).filter(|w| w.is_finite() && *w > 0.0).map_or(layer_mm, |w| w * detail.layer_factor()),
Some(jls.and_then(|s| s.dash.clone())),
Some(jls.map_or(stroke, |s| s.color.as_str())),
greyed,