[146] Merge: Linienenden und -ecken als Projekteinstellung (Vorgabe flach + Gehrung)

This commit is contained in:
Claude committed 2026-11-06 01:52:05 +00:00
commit 35b628c5e7
65 files changed
+1342 -487

No files matched your search

+23
View File
@@ -2847,6 +2847,29 @@ Format · [90] Versionsvergleich · [91] Assistent · [92] Speckle.
`<Geschoss>#<Epoche>`, Projektwechsel passt also neu ein. Tests: vitest `geometry.test.ts` (leer/NaN/normal),
e2e `initialZoom.spec.ts` (Massstab 1:30–1:400 und Inhalt sichtbar nach Neu, Musterhaus, Musterhaus komplex).
Nur Linux/Chromium geprüft, nicht in der Tauri-App.
- ◐ **[146] Linienenden und -ecken einstellbar.** (6.11., Maintainer: „Manche Linienenden sind rund, manche eckig.
Globale Einstellung.") Bestand vorher: render2d (WebGPU-Szene) und Kern `gpu_compile` (Metal-Chunks) zeichneten volle
Striche mit runden Kappen/Ecken, Strich-Shader runde Strichenden, Bögen (SDF) flach; Plan-SVG rund nur bei vollen
Linien/Kantenläufen ([141]), Polygone `linejoin=round`; Druck-SVG (`print_svg.rs`, `sceneToPrintSvg.ts`) rund; React-SVG
über CSS `linecap: round`, `miterlimit 8`. Neu: Projekt-Felder `lineCap` (`butt`/`round`/`square`) und `lineJoin`
(`miter`/`round`/`bevel`), fehlt = flach + Gehrung (Grenze 4, darüber gefast); Kodierung `cap | join << 2`
(`plan/line_ends.rs`, `model/lineEnds.ts`), reist als `Plan.lineEnds` (generatePlan/Schnitt/Ansicht). Wirkt in:
render2d (Gehrungs-/Fasen-Dreiecke, vorstehende Kappe; Szenenkopf-Wort 44 statt Reserve-0; Strich-Shader `count + 16·cap`,
innere Ecken gestrichelter Züge bleiben rund; Bogen-Kappe in `wdash.w`), `gpu_compile` (gleich; gepacktes Miter-Byte jetzt
`(m−1)/3`, Byte 0 = 1, `chunks.rs` dekodiert; Chunk-Cache verwirft bei Wechsel), Plan-SVG (`<g>` mit den Attributen),
Druck-SVG/PDF (Attribute am `<svg>`), React-SVG-Ansicht (`<g>`, CSS `inherit`). Punkt-Muster bleiben überall rund ([96]).
Kerben an Wandecken: volle Einzel-Linien und Kantenläufe gleicher Farbe/Breite(/Deckkraft) werden an Enden, an denen
genau zwei zusammentreffen, zu Zügen genäht (`stitch_runs_members`; Szene, `gpu_compile` bis zum nächsten Strich-Muster,
Plan-SVG, Druck-SVG), ein Zug steht an der Stelle seines spätesten Teils. UI: Einstellungen → Projekt („Linienenden",
„Linienecken"), beide Felder ein Undo-Schritt. Tests: Rust `line_ends` (Kodierung), render2d (`flach_mit_gehrung_ist_standard`,
`spitzer_winkel_ueber_gehrungsgrenze_wird_gefast`, `vorstehende_und_runde_kappen`, `strich_instanzen_tragen_die_kappe`,
`linienenden_im_kopf`), Kern (`ecke_aus_zwei_linien_wird_ein_zug_mit_gehrung`, `umriss_ecke_als_zug`), vitest
`plan/lineEnds.test.ts`. Goldens neu (Plan/Schnitt/Ansicht + CLI: `<g>` mit Attributen, genähte `<polyline>` statt
Einzel-`<line>`/`<path>`, keine `linecap=round` mehr; Komplex-EG 1:50 mit Schraffur 4.95 → 1.05 MB, v. a. Höhenlinien).
Geprüft: cargo test Kern + render2d, WASM gebaut (Linux, `--no-opt`), tsc, vitest, CLI-SVG vorher/nachher in Chromium
(Ecke, T-Stoss, Tür, Masslinie). **Offen:** DXF/DWG ohne Einstellung (acadrust schreibt `$ENDCAPS/$JOINSTYLE` nur in DWG;
CAD zeichnet Stiftbreiten selbst); Druck-SVG streicht Polygone weiter rundum (keine `noStrokeEdges`); Nähen in den
Metal-Chunks nur innerhalb eines Chunks; nicht in der Tauri-App/Metal und nicht im WebGPU-Browser angesehen. · M
- ◐ **[68] Baugrube / Geländebearbeitung.** (30.10.) Kontext-Objekt `excavation` (Rust-Modell, `ContextObject`):
Sohle (`outline`, `bottom` m ±0.00), Böschung `slope` (Standard 45°, je Kante `edgeSlopes`), Schüttung `fillSlope`
(33.7°), Bermen `bermWidth`/`bermHeight`. Neues Gelände = clamp(t, b − d·tan β, b + H(d)) mit d = Abstand zum
+168 -28
View File
@@ -36,6 +36,8 @@ use crate::hatch::{self, v2, Hatch, HatchKind, Pattern, Run, V2, DASH_MM_TO_M};
use crate::jsmath::hypot2;
use crate::jsnum;
use crate::plan::buf::{self, PlanBuf, Prim, Style};
use crate::plan::line_ends::{LineEnds, MITER_LIMIT};
use crate::plan::scene::stitch_runs;
use std::f64::consts::PI;
const PX_PER_M: f64 = 90.0;
@@ -285,14 +287,21 @@ fn snorm8(v: f64) -> u32 {
((r as i32) & 0xff) as u32
}
/// Gepacktes Normalen-Wort: snorm8 nx | ny | side | miter (=127).
/// Gepacktes Normalen-Wort: snorm8 nx | ny | side | miter-Byte (0 = Faktor 1, s. [`miter_word`]).
#[inline]
fn normal_word(nx: f64, ny: f64, side: f64) -> u32 {
snorm8(nx) | (snorm8(ny) << 8) | (snorm8(side) << 16) | (127 << 24)
snorm8(nx) | (snorm8(ny) << 8) | (snorm8(side) << 16)
}
/// Wie [`normal_word`] mit Längenfaktor `m` in [1, 4] ([146] Gehrungsspitze, vorstehende Kappe):
/// Byte = snorm8((m − 1) / 3), der Shader (`render2d/chunks.rs`) rechnet `1 + max(w, 0) · 3`.
#[inline]
fn miter_word(nx: f64, ny: f64, side: f64, m: f64) -> u32 {
normal_word(nx, ny, side) | (snorm8((m - 1.0) / 3.0) << 24)
}
/// Fächer-Zentrum (1, 0, 0) gepackt.
const CENTER_WORD: u32 = 127 | (127 << 24);
const CENTER_WORD: u32 = 127;
#[inline]
fn left_normal(d: V2) -> V2 {
@@ -322,6 +331,12 @@ struct Compiler {
scratch: Vec<V2>,
seg_dir: Vec<Option<V2>>,
seg_ang: Vec<[Option<f64>; 2]>,
/// Linienenden und -ecken ([146]).
ends: LineEnds,
/// Volle, offene Züge je (Farbe, Breite), am Ende zusammengenäht ([146]): Wand-Umrisse zweier
/// Wände treffen sich an der Ecke als EIN Zug mit Ecke statt zwei Enden (keine Kerbe).
solid: Vec<(Rgba, f64, Vec<Vec<V2>>)>,
solid_of: std::collections::HashMap<[u64; 5], usize>,
}
impl Compiler {
@@ -390,8 +405,37 @@ impl Compiler {
/// Linienzug mit Strichmuster `dash` (Papier-mm): gültiges Muster bis [`MAX_LINE_DASH`]
/// Einträge → Shader-Instanzen; längeres → CPU-Zerlegung; ungültiges/fehlendes → durchgezogen.
/// Vollen offenen Zug zum Zusammennähen vormerken (gezeichnet am Ende von `compile`).
fn defer_solid(&mut self, pts_m: &[V2], color: Rgba, stroke_mm: f64) {
if pts_m.len() < 2 {
return;
}
let k = [color[0].to_bits(), color[1].to_bits(), color[2].to_bits(), color[3].to_bits(), stroke_mm.to_bits()];
let gi = match self.solid_of.get(&k) {
Some(&g) => g,
None => {
self.solid.push((color, stroke_mm, Vec::new()));
self.solid_of.insert(k, self.solid.len() - 1);
self.solid.len() - 1
}
};
self.solid[gi].2.push(pts_m.to_vec());
}
fn flush_solid(&mut self) {
for (color, stroke_mm, runs) in std::mem::take(&mut self.solid) {
for (pts, closed) in stitch_runs(runs) {
self.stroke_polyline(&pts, closed, color, stroke_mm, false);
}
}
self.solid_of.clear();
}
fn stroke_styled(&mut self, pts_m: &[V2], closed: bool, dash: Option<&[f64]>, color: Rgba, stroke_mm: f64) {
let Some(d) = dash.filter(|d| !d.is_empty()) else {
if !closed {
return self.defer_solid(pts_m, color, stroke_mm);
}
return self.stroke_polyline(pts_m, closed, color, stroke_mm, false);
};
match dash_cycle_m(d) {
@@ -401,9 +445,15 @@ impl Compiler {
if closed && pts_m.len() > 2 {
run.push(pts_m[0]);
}
// Punkte im Muster brauchen runde Enden ([96]), auch bei flacher Einstellung.
let saved = self.ends;
if d.iter().step_by(2).any(|v| *v <= 0.0) {
self.ends.cap = 1;
}
for piece in hatch::apply_dash_runs(vec![run], &line_dash_for_runs(d)) {
self.stroke_polyline(&piece, false, color, stroke_mm, false);
}
self.ends = saved;
}
None => self.stroke_polyline(pts_m, closed, color, stroke_mm, false),
}
@@ -416,8 +466,12 @@ impl Compiler {
if pts_m.len() < 2 {
return;
}
// Maler-Reihenfolge: vorgemerkte volle Züge vor diesem Strich zeichnen ([146]).
self.flush_solid();
let close = closed && pts_m.len() > 2 && (pts_m[0].x != pts_m[pts_m.len() - 1].x || pts_m[0].y != pts_m[pts_m.len() - 1].y);
let n_seg = pts_m.len() - 1 + usize::from(close);
// [146] Linienende im Muster-Zähler (`count + 16 · cap`); Punkte (Länge 0) immer rund ([96]).
let cap = if cycle_m.iter().step_by(2).any(|d| *d <= 0.0) { 1 } else { self.ends.cap as u32 };
let seg = |i: usize| (pts_m[i], pts_m[(i + 1) % pts_m.len()]);
let mut run = 0.0f64;
for i in 0..n_seg {
@@ -455,7 +509,7 @@ impl Compiler {
(s0 * PX_PER_M) as f32,
(run * PX_PER_M) as f32,
total as f32,
cycle_m.len() as f32,
(cycle_m.len() as u32 + 16 * cap) as f32,
]);
self.dash_inst.extend_from_slice(&dash);
s0 += l;
@@ -475,6 +529,12 @@ impl Compiler {
/// Wie `push_vert`, mit bereits gepacktem Normalen-Wort `w` (nur im gepackten Layout benutzt).
#[inline]
fn push_vert_w(&mut self, p: V2, w: u32, nx: f64, ny: f64, side: f64) -> u32 {
self.push_vert_m(p, w, nx, ny, side, 1.0)
}
/// Wie `push_vert_w` mit Längenfaktor `m` (Gehrungsspitze, Ecke der vorstehenden Kappe).
#[inline]
fn push_vert_m(&mut self, p: V2, w: u32, nx: f64, ny: f64, side: f64, m: f64) -> u32 {
if self.packed {
self.line_verts.extend_from_slice(&[(p.x as f32).to_bits(), (p.y as f32).to_bits(), w]);
(self.line_verts.len() / 3 - 1) as u32
@@ -485,7 +545,7 @@ impl Compiler {
(nx as f32).to_bits(),
(ny as f32).to_bits(),
(side as f32).to_bits(),
1.0f32.to_bits(),
(m as f32).to_bits(),
]);
(self.line_verts.len() / 6 - 1) as u32
}
@@ -582,7 +642,55 @@ impl Compiler {
let d_in = if has_in { seg_dir[i_in] } else { None };
let d_out = if has_out { seg_dir[i_out] } else { None };
let p = s_pts[v];
let ends = self.ends;
match (d_in, d_out) {
(Some(d1), Some(d2)) if ends.join != 1 => {
// [146] Gehrung (bis `MITER_LIMIT`, sonst gefast) bzw. Fase auf der Aussenseite.
let turn = d1.x * d2.y - d1.y * d2.x;
let dot = d1.x * d2.x + d1.y * d2.y;
if (turn.abs() < 1e-6 && dot > 0.0) || dot < -0.9999 {
continue;
}
let outer = if turn > 0.0 { -1.0 } else { 1.0 };
let n1 = left_normal(d1);
let n2 = left_normal(d2);
let u1 = v2(outer * n1.x, outer * n1.y);
let u2 = v2(outer * n2.x, outer * n2.y);
let i_c = self.push_vert_w(p, CENTER_WORD, 1.0, 0.0, 0.0);
let i1 = self.push_vert(p, u1.x, u1.y, 1.0);
let i2 = self.push_vert(p, u2.x, u2.y, 1.0);
let cos_half = ((1.0 + dot) * 0.5).sqrt();
let m = if cos_half > 1e-9 { 1.0 / cos_half } else { f64::INFINITY };
if ends.join == 0 && m <= MITER_LIMIT {
let bx = u1.x + u2.x;
let by = u1.y + u2.y;
let bl = hypot2(bx, by);
let (bx, by) = (bx / bl, by / bl);
let w = if self.packed { miter_word(bx, by, 1.0, m) } else { 0 };
let it = self.push_vert_m(p, w, bx, by, 1.0, m);
self.line_idx.extend_from_slice(&[i_c, i1, it, i_c, it, i2]);
} else {
self.line_idx.extend_from_slice(&[i_c, i1, i2]);
}
}
(None, Some(d)) | (Some(d), None) if ends.cap != 1 => {
// [146] Flach: nichts; vorstehend: Rechteck um die halbe Breite nach aussen.
if ends.cap == 2 {
let e = if d_in.is_none() { v2(-d.x, -d.y) } else { d };
let n = left_normal(d);
let r2 = std::f64::consts::FRAC_1_SQRT_2;
let ia = self.push_vert(p, n.x, n.y, 1.0);
let ib = self.push_vert(p, n.x, n.y, -1.0);
let (ax, ay) = ((n.x + e.x) * r2, (n.y + e.y) * r2);
let (cx, cy) = ((-n.x + e.x) * r2, (-n.y + e.y) * r2);
let m = std::f64::consts::SQRT_2;
let wa = if self.packed { miter_word(ax, ay, 1.0, m) } else { 0 };
let wc = if self.packed { miter_word(cx, cy, 1.0, m) } else { 0 };
let ic = self.push_vert_m(p, wa, ax, ay, 1.0, m);
let id = self.push_vert_m(p, wc, cx, cy, 1.0, m);
self.line_idx.extend_from_slice(&[ia, ic, id, ia, id, ib]);
}
}
(Some(d1), Some(d2)) => {
// Runder Übergang nur auf der äusseren Seite der Ecke.
let turn = d1.x * d2.y - d1.y * d2.x;
@@ -680,7 +788,7 @@ impl Compiler {
break;
}
}
self.stroke_polyline(&run, false, color, stroke_mm, false);
self.defer_solid(&run, color, stroke_mm);
}
}
@@ -734,8 +842,11 @@ fn hatch_draws_lines(h: &Hatch) -> bool {
/// Kompiliert die Primitive eines Plan-Puffers. `px_per_meter` steuert nur die Bogen-
/// Tessellierung (0 = zoomunabhängig). `packed` = kompakte Linien-Vertices (nativer Renderer).
pub fn compile(plan: &PlanBuf, px_per_meter: f64, packed: bool) -> GpuOut {
pub fn compile(plan: &PlanBuf, px_per_meter: f64, packed: bool, ends: LineEnds) -> GpuOut {
let mut c = Compiler {
ends,
solid: Vec::new(),
solid_of: std::collections::HashMap::new(),
packed,
fill_pos: Vec::new(),
fill_idx: Vec::new(),
@@ -868,6 +979,7 @@ pub fn compile(plan: &PlanBuf, px_per_meter: f64, packed: bool) -> GpuOut {
}
}
}
c.flush_solid();
GpuOut {
fill_pos: c.fill_pos,
@@ -932,9 +1044,9 @@ fn draw_circle_like(
/// Flache Ausgabe (s. Modulkopf) für die Primitive `[from, to)` eines Plan-Puffers (v2); leer bei
/// unlesbarem Puffer oder ungültigem Bereich.
pub fn compile_flat(bytes: &[u8], from: usize, to: usize, px_per_meter: f64, packed: bool) -> Vec<u32> {
pub fn compile_flat(bytes: &[u8], from: usize, to: usize, px_per_meter: f64, packed: bool, ends: LineEnds) -> Vec<u32> {
let Some(plan) = buf::View::parse(bytes).and_then(|v| v.gpu(from, to)) else { return Vec::new() };
let o = compile(&plan, px_per_meter, packed);
let o = compile(&plan, px_per_meter, packed, ends);
let mut meta: Vec<f64> = vec![
o.origin.0,
o.origin.1,
@@ -1012,8 +1124,36 @@ mod tests {
PlanBuf { colors: vec![[0.0, 0.0, 0.0, 1.0], [0.5, 0.5, 0.5, 1.0]], hatches: vec![], prims }
}
/// [146] Zwei einzelne volle Linien mit gemeinsamem Ende (Wand-Umrisse zweier Wände an der
/// Ecke) werden EIN Zug: Gehrung statt zweier flacher Enden (keine Kerbe); andere Enden/Ecken je
/// Einstellung.
#[test]
fn ecke_aus_zwei_linien_wird_ein_zug_mit_gehrung() {
let corner = |ends: LineEnds, packed: bool| {
let mut b = line(1.0, 1.0, false);
if let Prim::Line { b: bb, .. } = &mut b {
*bb = v2(1.0, 1.0);
}
compile(&plan(vec![line(0.0, 1.0, false), b]), 90.0, packed, ends)
};
let o = corner(LineEnds::default(), false);
assert_eq!(o.line_idx.len(), 2 * 6 + 2 * 3, "zwei Quads + Gehrung, keine Kappen");
let m: Vec<f32> = o.line_verts.chunks_exact(6).map(|v| f32::from_bits(v[5])).filter(|m| *m != 1.0).collect();
assert_eq!(m.len(), 1);
assert!((m[0] - std::f32::consts::SQRT_2).abs() < 1e-6);
// Gepackt: Faktor im obersten Byte als snorm8((m − 1) / 3), 0 = 1.
let p = corner(LineEnds::default(), true);
let bytes: Vec<i8> = p.line_verts.chunks_exact(3).map(|v| (v[2] >> 24) as u8 as i8).collect();
let tips: Vec<f32> = bytes.iter().filter(|b| **b != 0).map(|b| 1.0 + (*b as f32 / 127.0).max(0.0) * 3.0).collect();
assert_eq!(tips.len(), 1);
assert!((tips[0] - std::f32::consts::SQRT_2).abs() < 0.02, "{tips:?}");
// Gefast: ein Dreieck; vorstehend: je offenes Ende ein Rechteck.
assert_eq!(corner(LineEnds { cap: 0, join: 2 }, false).line_idx.len(), 2 * 6 + 3);
assert_eq!(corner(LineEnds { cap: 2, join: 0 }, false).line_idx.len(), 2 * 6 + 2 * 3 + 2 * 6);
}
fn line_idx_count(p: &PlanBuf) -> u32 {
compile(p, 90.0, false).line_batches.iter().map(|b| b.count).sum()
compile(p, 90.0, false, LineEnds::default()).line_batches.iter().map(|b| b.count).sum()
}
#[test]
@@ -1080,7 +1220,7 @@ mod tests {
},
color: -1,
});
let o = compile(&p, 90.0, true);
let o = compile(&p, 90.0, true, LineEnds::default());
assert_eq!(o.fill_idx.len(), 6);
assert_eq!(o.fill_batches[0].color, [1.0, 1.0, 1.0, 0.5]);
// Schraffur (0.13 mm, grau) und Umriss (0.5 mm) als eigene Batches.
@@ -1099,7 +1239,7 @@ mod tests {
Prim::DrawingArc { style: st(), stroke: 0, weight_mm: 0.5, center: v2(0.0, 0.0), r: 1.0, a0: 0.0, a1: 0.0, dash: None },
Prim::Placeholder,
]);
let o = compile(&p, 0.0, false);
let o = compile(&p, 0.0, false, LineEnds::default());
assert!(!o.fill_idx.is_empty());
assert_eq!(o.line_batches.len(), 2);
assert_eq!(o.bounds, (-1.0, -1.0, 2.0, 2.0));
@@ -1107,7 +1247,7 @@ mod tests {
#[test]
fn kaputter_puffer_leer() {
assert!(compile_flat(&[1, 2, 3], 0, 0, 90.0, true).is_empty());
assert!(compile_flat(&[1, 2, 3], 0, 0, 90.0, true, LineEnds::default()).is_empty());
let mut w = buf::Writer::new(false);
w.push(&crate::plan::prim::Primitive::Line {
a: crate::model::Vec2 { x: 0.0, y: 0.0 },
@@ -1125,9 +1265,9 @@ mod tests {
opacity: None,
});
let enc = w.finish();
assert!(!compile_flat(&enc, 0, 1, 90.0, true).is_empty());
assert!(compile_flat(&enc, 0, 2, 90.0, true).is_empty(), "Bereich ausserhalb");
assert!(!compile_flat(&enc, 1, 1, 90.0, true).is_empty(), "leerer Bereich = leere Geometrie");
assert!(!compile_flat(&enc, 0, 1, 90.0, true, LineEnds::default()).is_empty());
assert!(compile_flat(&enc, 0, 2, 90.0, true, LineEnds::default()).is_empty(), "Bereich ausserhalb");
assert!(!compile_flat(&enc, 1, 1, 90.0, true, LineEnds::default()).is_empty(), "leerer Bereich = leere Geometrie");
}
// --- Strichmuster im Shader (Chunk-Pfad, gleiche Instanzen wie render2d `DashSegment`) ---
@@ -1142,7 +1282,7 @@ mod tests {
#[test]
fn gestrichelte_linie_als_shader_instanz() {
let o = compile(&plan(vec![dashed(1.0, 4.0, false, vec![0.12, 0.08])]), 90.0, true);
let o = compile(&plan(vec![dashed(1.0, 4.0, false, vec![0.12, 0.08])]), 90.0, true, LineEnds::default());
assert!(o.line_idx.is_empty() && o.line_verts.is_empty(), "keine durchgezogenen Striche mehr");
assert_eq!(o.dash_inst.len(), DASH_INST_FLOATS);
let d = inst(&o, 0);
@@ -1162,7 +1302,7 @@ mod tests {
#[test]
fn gestrichelter_zug_phase_laeuft_durch() {
// Verkettete Linien: ein Zug, Phase über die Ecke, ungerades Muster verdoppelt.
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![1.0]), dashed(1.0, 3.0, true, vec![1.0])]), 90.0, true);
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![1.0]), dashed(1.0, 3.0, true, vec![1.0])]), 90.0, true, LineEnds::default());
assert_eq!(o.dash_inst.len(), 2 * DASH_INST_FLOATS);
assert_eq!(inst(&o, 1)[4], 90.0);
assert_eq!(inst(&o, 1)[5], 270.0);
@@ -1170,21 +1310,21 @@ mod tests {
assert_eq!(o.dash_batches.len(), 1);
assert_eq!(o.dash_batches[0].count, 2);
// Einzeln (nicht verkettet): jede Linie beginnt ihr Muster neu.
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![1.0]), dashed(1.0, 3.0, false, vec![1.0])]), 90.0, true);
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![1.0]), dashed(1.0, 3.0, false, vec![1.0])]), 90.0, true, LineEnds::default());
assert_eq!(inst(&o, 1)[4], 0.0);
assert_eq!(inst(&o, 1)[5], 180.0);
}
#[test]
fn ungueltiges_muster_durchgezogen_langes_muster_zerlegt() {
let solid = compile(&plan(vec![line(0.0, 1.0, false)]), 90.0, true);
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![0.0, -1.0])]), 90.0, true);
let solid = compile(&plan(vec![line(0.0, 1.0, false)]), 90.0, true, LineEnds::default());
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![0.0, -1.0])]), 90.0, true, LineEnds::default());
assert!(o.dash_inst.is_empty());
assert_eq!(o.line_idx.len(), solid.line_idx.len(), "Nullmuster = durchgezogen");
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![])]), 90.0, true);
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![])]), 90.0, true, LineEnds::default());
assert!(o.dash_inst.is_empty() && o.line_idx.len() == solid.line_idx.len());
// 9 Einträge → verdoppelt 18 > MAX_LINE_DASH: CPU-Zerlegung (mehrere Stücke).
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![1.0; 9])]), 90.0, true);
let o = compile(&plan(vec![dashed(0.0, 1.0, false, vec![1.0; 9])]), 90.0, true, LineEnds::default());
assert!(o.dash_inst.is_empty());
assert!(o.line_idx.len() > 2 * solid.line_idx.len());
}
@@ -1197,7 +1337,7 @@ mod tests {
Prim::Circle { style: st(), fill: 1, stroke: 0, weight_mm: 0.18, center: v2(3.0, 0.0), r: 1.0, dash: d.clone() },
Prim::DrawingArc { style: st(), stroke: 0, weight_mm: 0.18, center: v2(0.0, 0.0), r: 2.0, a0: 0.0, a1: 1.0, dash: d },
]);
let o = compile(&p, 90.0, true);
let o = compile(&p, 90.0, true, LineEnds::default());
assert!(o.line_idx.is_empty(), "alle Striche gestrichelt");
assert!(!o.fill_idx.is_empty(), "Kreisfüllung bleibt");
let n = o.dash_inst.len() / DASH_INST_FLOATS;
@@ -1229,7 +1369,7 @@ mod tests {
xs.push(xs[xs.len() - 1] + 0.05 + rnd() * 1.5);
}
let prims: Vec<Prim> = xs.windows(2).enumerate().map(|(i, w)| dashed(w[0], w[1], i > 0, pat.clone())).collect();
let o = compile(&plan(prims), 90.0, true);
let o = compile(&plan(prims), 90.0, true, LineEnds::default());
let runs = hatch::apply_dash_runs(vec![xs.iter().map(|&x| v2(x, 0.0)).collect()], &line_dash_for_runs(&pat));
let total_len = xs[xs.len() - 1];
for _ in 0..300 {
@@ -1267,14 +1407,14 @@ mod tests {
/// dieser Folge — die zweite Linie deckt die gestrichelte (z. B. verdeckte Kante unter einer Wand).
#[test]
fn strich_batches_in_maler_reihenfolge() {
let o = compile(&plan(vec![line(0.0, 1.0, false), dashed(0.0, 1.0, false, vec![2.0, 1.0]), dashed(0.0, 2.0, false, vec![2.0, 1.0]), line(2.0, 3.0, false)]), 90.0, true);
let o = compile(&plan(vec![line(0.0, 1.0, false), dashed(0.0, 1.0, false, vec![2.0, 1.0]), dashed(0.0, 2.0, false, vec![2.0, 1.0]), line(2.0, 3.0, false)]), 90.0, true, LineEnds::default());
assert_eq!(o.line_batches.len(), 2, "keine Zusammenfassung über den Strich-Batch hinweg");
assert_eq!(o.dash_batches.len(), 1, "zwei gestrichelte ohne Linie dazwischen = ein Batch");
assert_eq!(o.dash_batches[0].count, 2);
assert_eq!(o.dash_batches[0].line_at, o.line_batches[0].count);
assert_eq!(o.line_batches[1].start, o.dash_batches[0].line_at);
// Ohne Strich dazwischen werden gleich gestylte Linien weiter zusammengefasst.
let o = compile(&plan(vec![line(0.0, 1.0, false), line(2.0, 3.0, false)]), 90.0, true);
let o = compile(&plan(vec![line(0.0, 1.0, false), line(2.0, 3.0, false)]), 90.0, true, LineEnds::default());
assert_eq!(o.line_batches.len(), 1);
}
@@ -1297,7 +1437,7 @@ mod tests {
opacity: None,
});
let enc = w.finish();
let out = compile_flat(&enc, 0, 1, 90.0, true);
let out = compile_flat(&enc, 0, 1, 90.0, true, LineEnds::default());
let m = out[0] as usize;
let meta: Vec<f64> = (0..m).map(|i| f64::from_bits(out[2 + 2 * i] as u64 | ((out[3 + 2 * i] as u64) << 32))).collect();
let (n_fill, n_line) = (meta[10] as usize, meta[11] as usize);
+50
View File
@@ -6,6 +6,36 @@ use super::manual::*;
use serde::{Deserialize, Serialize};
use ts_rs::TS;
/// Linienenden aller Striche im Plan/Schnitt/Ansicht und in den Exporten ([146]); fehlt = flach.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, TS)]
pub enum LineCap {
#[default]
#[serde(rename = "butt")]
Butt,
#[serde(rename = "round")]
Round,
#[serde(rename = "square")]
Square,
#[serde(other)]
#[ts(skip)]
Unknown,
}
/// Linienecken (Stoss zweier Segmente eines Zugs) ([146]); fehlt = Gehrung (Grenze 4, sonst gefast).
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, TS)]
pub enum LineJoin {
#[default]
#[serde(rename = "miter")]
Miter,
#[serde(rename = "round")]
Round,
#[serde(rename = "bevel")]
Bevel,
#[serde(other)]
#[ts(skip)]
Unknown,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, TS)]
pub enum LineStyleKind {
#[default]
@@ -4690,6 +4720,14 @@ pub struct Project {
#[serde(rename = "scaleLineWeights", default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub scale_line_weights: Option<bool>,
/// Linienenden aller Striche ([146]); fehlt = flach (`butt`).
#[serde(rename = "lineCap", default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub line_cap: Option<LineCap>,
/// Linienecken aller Striche ([146]); fehlt = Gehrung (`miter`, Grenze 4).
#[serde(rename = "lineJoin", default, skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub line_join: Option<LineJoin>,
/// Grafik-Kategorie-Baum (geschossübergreifend).
pub layers: Vec<LayerCategory>,
pub walls: Vec<Wall>,
@@ -5493,6 +5531,18 @@ impl Project {
None => Default::default(),
};
}
"lineCap" => {
self.line_cap = match v {
Some(v) => <Option<LineCap>>::deserialize(v).map_err(|e| e.to_string())?,
None => Default::default(),
};
}
"lineJoin" => {
self.line_join = match v {
Some(v) => <Option<LineJoin>>::deserialize(v).map_err(|e| e.to_string())?,
None => Default::default(),
};
}
"layers" => {
self.layers = match v {
Some(v) => <Vec<LayerCategory>>::deserialize(v).map_err(|e| e.to_string())?,
+2
View File
@@ -74,6 +74,8 @@ pub fn opening_preview(p: &Project, opening_id: &str) -> Option<Project> {
walls: vec![wall],
openings: Some(vec![op]),
scale_line_weights: p.scale_line_weights,
line_cap: p.line_cap,
line_join: p.line_join,
..Default::default()
})
}
+79
View File
@@ -0,0 +1,79 @@
//! Linienenden und -ecken ([146]): EINE Projekt-Einstellung (`Project.lineCap`/`lineJoin`) für alle
//! Ausgabewege — Bildschirm (render2d-Szene, GPU-Chunks), Plan-SVG, Druck-SVG/PDF, DXF. Über die
//! WASM-Grenze als kleine Zahl `cap | join << 2` (0 = flach + Gehrung, der Standard).
use crate::model::{LineCap, LineJoin, Project};
/// Gehrungsgrenze (Gehrungslänge / Strichbreite, wie SVG `stroke-miterlimit`); darüber gefast.
pub const MITER_LIMIT: f64 = 4.0;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct LineEnds {
/// 0 flach (butt), 1 rund, 2 vorstehend (square).
pub cap: u8,
/// 0 Gehrung (miter), 1 rund, 2 gefast (bevel).
pub join: u8,
}
impl LineEnds {
pub fn of(p: &Project) -> Self {
let cap = match p.line_cap {
Some(LineCap::Round) => 1,
Some(LineCap::Square) => 2,
_ => 0,
};
let join = match p.line_join {
Some(LineJoin::Round) => 1,
Some(LineJoin::Bevel) => 2,
_ => 0,
};
Self { cap, join }
}
/// Aus der Kodierung `cap | join << 2`; Unsinn (NaN, ausserhalb) → Standard.
pub fn from_code(c: f64) -> Self {
if !c.is_finite() || !(0.0..16.0).contains(&c) {
return Self::default();
}
let c = c as u32;
let cap = (c & 3) as u8;
let join = ((c >> 2) & 3) as u8;
Self { cap: if cap > 2 { 0 } else { cap }, join: if join > 2 { 0 } else { join } }
}
pub fn code(self) -> u32 {
self.cap as u32 | (self.join as u32) << 2
}
pub fn svg_cap(self) -> &'static str {
["butt", "round", "square"][self.cap as usize]
}
pub fn svg_join(self) -> &'static str {
["miter", "round", "bevel"][self.join as usize]
}
/// SVG-Attribute für einen umschliessenden `<g>` (Kinder erben sie).
pub fn svg_attrs(self) -> String {
format!("stroke-linecap=\"{}\" stroke-linejoin=\"{}\" stroke-miterlimit=\"{}\"", self.svg_cap(), self.svg_join(), MITER_LIMIT)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn kodierung_rundreise_und_unsinn() {
for cap in 0..3 {
for join in 0..3 {
let e = LineEnds { cap, join };
assert_eq!(LineEnds::from_code(e.code() as f64), e);
}
}
assert_eq!(LineEnds::from_code(f64::NAN), LineEnds::default());
assert_eq!(LineEnds::from_code(3.0), LineEnds::default());
assert_eq!(LineEnds::from_code(-1.0), LineEnds::default());
let mut p = Project::default();
assert_eq!(LineEnds::of(&p), LineEnds { cap: 0, join: 0 });
p.line_cap = Some(LineCap::Square);
p.line_join = Some(LineJoin::Bevel);
assert_eq!(LineEnds::of(&p).code(), 2 | 2 << 2);
assert_eq!(LineEnds::of(&p).svg_attrs(), "stroke-linecap=\"square\" stroke-linejoin=\"bevel\" stroke-miterlimit=\"4\"");
}
}
+1
View File
@@ -32,3 +32,4 @@ pub mod elevation_geom;
pub mod pick;
pub mod sketch;
pub mod ceiling_plan;
pub mod line_ends;
+70 -25
View File
@@ -65,17 +65,61 @@ fn dash_attr(d: &[f64]) -> String {
/// Anweisungsliste.
struct Out {
s: String,
first: bool,
recs: Vec<String>,
/// Volle Einzel-Linien je (Farbe, Stift, Deckkraft) zum Zusammennähen ([146]): Wand-Umrisse zweier
/// Wände treffen sich als EIN Zug mit Ecke; jeder Zug steht an der Stelle seiner spätesten Linie.
solid: Vec<((String, String, String), Vec<Vec<V2>>, Vec<usize>)>,
}
impl Out {
fn rec(&mut self, fields: &[&str]) {
if !self.first {
self.s.push('\u{1e}');
self.recs.push(fields.join("\u{1f}"));
}
fn defer_solid(&mut self, key: (String, String, String), a: V2, b: V2) {
self.recs.push(String::new());
let slot = self.recs.len() - 1;
let gi = match self.solid.iter().position(|g| g.0 == key) {
Some(g) => g,
None => {
self.solid.push((key, Vec::new(), Vec::new()));
self.solid.len() - 1
}
};
self.solid[gi].1.push(vec![a, b]);
self.solid[gi].2.push(slot);
}
fn finish(mut self) -> String {
for ((color, pen, o), runs, slots) in std::mem::take(&mut self.solid) {
for (pts, closed, members) in crate::plan::scene::stitch_runs_members(&runs) {
let slot = members.iter().map(|&m| slots[m]).max().unwrap_or(0);
let line = pts.len() == 2 && !closed;
let mut attrs = if line {
vec![("x1", r3(pts[0].x)), ("y1", r3(pts[0].y)), ("x2", r3(pts[1].x)), ("y2", r3(pts[1].y)), ("stroke", color.clone()), ("stroke-width", pen.clone())]
} else {
vec![("points", pts_attr(&pts)), ("fill", "none".to_string()), ("stroke", color.clone()), ("stroke-width", pen.clone())]
};
if !o.is_empty() {
attrs.push(("opacity", o.clone()));
}
let tag = if line { "line" } else if closed { "polygon" } else { "polyline" };
let mut f: Vec<&str> = vec!["E", "0", tag];
for (k, v) in &attrs {
f.push(k);
f.push(v);
}
let r = f.join("\u{1f}");
if self.recs[slot].is_empty() {
self.recs[slot] = r;
} else {
self.recs[slot].push('\u{1e}');
self.recs[slot].push_str(&r);
}
}
}
self.first = false;
self.s.push_str(&fields.join("\u{1f}"));
self.recs.retain(|r| !r.is_empty());
self.recs.join("\u{1e}")
}
/// Datensatz aus festen Feldern und Name/Wert-Paaren.
@@ -140,7 +184,6 @@ fn poly_node(pts: &str, fill: &str, stroke: &str, stroke_mm: f64) -> Vec<(&'stat
if stroke != "none" && stroke_mm > 0.0 {
a.push(("stroke", stroke.to_string()));
a.push(("stroke-width", js_number(stroke_mm)));
a.push(("stroke-linejoin", "round".to_string()));
} else {
a.push(("stroke", "none".to_string()));
}
@@ -155,11 +198,8 @@ fn line_attrs(a: V2, b: V2, color: &str, stroke_mm: f64, dash: Option<&[f64]>) -
("y2", r3(b.y)),
("stroke", color.to_string()),
("stroke-width", js_number(stroke_mm)),
("stroke-linecap", "round".to_string()),
];
if let Some(d) = dash.filter(|d| !d.is_empty()) {
v.push(("stroke-dasharray", dash_attr(d)));
}
push_dash(&mut v, dash);
v
}
@@ -169,16 +209,13 @@ fn polyline_attrs(pts: &[V2], color: &str, stroke_mm: f64, dash: Option<&[f64]>)
("fill", "none".to_string()),
("stroke", color.to_string()),
("stroke-width", js_number(stroke_mm)),
("stroke-linecap", "round".to_string()),
("stroke-linejoin", "round".to_string()),
];
if let Some(d) = dash.filter(|d| !d.is_empty()) {
v.push(("stroke-dasharray", dash_attr(d)));
}
push_dash(&mut v, dash);
v
}
/// Strichmuster + runde Kappe bei Punkten (Bögen, Kreise).
/// Strichmuster + runde Kappe bei Punkten. Sonst erben Enden und Ecken die Projekt-Einstellung
/// ([146]) vom `<svg>`, das TS anlegt (`planToPrintSvg.ts`).
fn push_dash(v: &mut Vec<(&'static str, String)>, dash: Option<&[f64]>) {
if let Some(d) = dash.filter(|d| !d.is_empty()) {
v.push(("stroke-dasharray", dash_attr(d)));
@@ -392,6 +429,11 @@ fn entry(out: &mut Out, view: &View, i: usize, hatches: &[(i32, Hatch, i32)], m:
let p = hatch::motif_points_opt(a, b, &Motif { points: pts, length }, 1.0).unwrap_or_else(|| vec![a, b]);
polyline_attrs(&p, &color, pen, d.as_deref())
} else {
let o = opacity_of(greyed, obj(3));
if d.as_deref().is_none_or(|d| d.is_empty()) && pen > 0.0 {
out.defer_solid((color, js_number(pen), o), a, b);
return Some(());
}
line_attrs(a, b, &color, pen, d.as_deref())
};
let tag = if rec.zigzag.is_some() || rec.motif.is_some() { "polyline" } else { "line" };
@@ -601,14 +643,14 @@ pub fn print_svg_ops(parts: &mut [Part], o: &PrintOptions) -> Option<String> {
let content_w = (max_x - min_x) * k;
let content_h = (max_y - min_y) * k;
let m = Map { off_x: (o.page_w - content_w) / 2.0, off_y: (o.page_h - content_h) / 2.0, min_x, max_y, k };
let mut out = Out { s: String::new(), first: true };
let mut out = Out { recs: Vec::new(), solid: Vec::new() };
for part in parts.iter_mut() {
let hatches = part.view.hatch_table()?;
for i in part.from..part.to {
entry(&mut out, &part.view, i, &hatches, m)?;
}
}
Some(out.s)
Some(out.finish())
}
#[cfg(test)]
@@ -646,9 +688,10 @@ mod tests {
let js = "{\"kind\":\"drawingText\",\"at\":{\"x\":1,\"y\":2},\"text\":\"aa bb\",\"heightM\":0.5,\"angle\":0.5,\"color\":\"#123\",\"wrapWidth\":2,\"marks\":{\"bold\":true}}";
let t: SingleText = serde_json::from_str(js).unwrap();
let m = Map { off_x: 0.0, off_y: 0.0, min_x: 0.0, max_y: 10.0, k: 10.0 };
let mut out = Out { s: String::new(), first: true };
let mut out = Out { recs: Vec::new(), solid: Vec::new() };
text_node(&mut out, &t, m, "0.5".into());
let recs: Vec<Vec<&str>> = out.s.split('\u{1e}').map(|r| r.split('\u{1f}').collect()).collect();
let s = out.finish();
let recs: Vec<Vec<&str>> = s.split('\u{1e}').map(|r| r.split('\u{1f}').collect()).collect();
// Drehung um den Anker (10, 80 mm), eine Zeile (Spalte 20 mm), je Wort/Leerraum ein Run.
assert_eq!(recs[0], ["X", "transform", "rotate(-28.648 10 80)", "opacity", "0.5"]);
assert_eq!(recs[1], ["L", "", "x", "10", "y", "80", "text-anchor", "start"]);
@@ -664,9 +707,10 @@ mod tests {
let js = r##"{"at":{"x":0,"y":10},"text":"","heightM":0.25,"angle":0,"wrapWidth":2,"doc":{"version":1,"paragraphs":[{"runs":[{"text":"aaaa bbbb","marks":{}}]},{"runs":[{"text":"c","marks":{"sizePt":72}}],"lineHeight":2}]}}"##;
let t: SingleText = serde_json::from_str(js).unwrap();
let m = Map { off_x: 0.0, off_y: 0.0, min_x: 0.0, max_y: 10.0, k: 10.0 };
let mut out = Out { s: String::new(), first: true };
let mut out = Out { recs: Vec::new(), solid: Vec::new() };
text_node(&mut out, &t, m, String::new());
let recs: Vec<Vec<&str>> = out.s.split('\u{1e}').map(|r| r.split('\u{1f}').collect()).collect();
let s = out.finish();
let recs: Vec<Vec<&str>> = s.split('\u{1e}').map(|r| r.split('\u{1f}').collect()).collect();
let lines: Vec<&Vec<&str>> = recs.iter().filter(|r| r[0] == "L").collect();
assert_eq!(lines.len(), 2);
// Absatz-Zeilenhöhe 2 × Basisgrösse (2.5 mm).
@@ -680,9 +724,10 @@ mod tests {
let js = r##"{"at":{"x":2,"y":3},"doc":{"version":1,"paragraphs":[{"runs":[{"text":"Wohnen","marks":{"bold":true}}],"align":"center"}]},"extraLines":[{"text":"17.01 m²","align":"center"}],"basePt":10,"color":"#333"}"##;
let t: StampText = serde_json::from_str(js).unwrap();
let m = Map { off_x: 0.0, off_y: 0.0, min_x: 0.0, max_y: 10.0, k: 20.0 };
let mut out = Out { s: String::new(), first: true };
let mut out = Out { recs: Vec::new(), solid: Vec::new() };
stamp_node(&mut out, &t, m, "0.3".into());
let recs: Vec<Vec<&str>> = out.s.split('\u{1e}').map(|r| r.split('\u{1f}').collect()).collect();
let s = out.finish();
let recs: Vec<Vec<&str>> = s.split('\u{1e}').map(|r| r.split('\u{1f}').collect()).collect();
assert_eq!(recs[0], ["X", "opacity", "0.3"]);
// Anker (40, 140 mm); 10 pt = 3.528 mm, Live-Zeile 0.8 ×; Block um den Anker zentriert.
assert_eq!(&recs[1][..4], ["L", "", "x", "40"]);
+36 -9
View File
@@ -95,6 +95,8 @@ pub struct Scene {
pub polylines: Vec<SStroke>,
pub arcs: Vec<SArc>,
pub lines: Vec<SLine>,
/// Linienenden und -ecken ([146], `LineEnds::code`), im Kopfwort der Binärszene.
pub line_ends: u32,
}
// ── Farben (wie `toRgba`/`withOpacity` der TS-Fassung) ──────────────────────────────────────────
@@ -259,8 +261,14 @@ fn stitch_key(p: V2) -> (u64, u64) {
/// Ergebnis: (Punkte, geschlossen). Gleiche Wahl wie die lineare Suche der TS-Fassung (der
/// erste passende Lauf in Pool-Reihenfolge); ein Raster über den Endpunkten findet die Kandidaten.
pub fn stitch_runs(runs: Vec<Vec<V2>>) -> Vec<(Vec<V2>, bool)> {
stitch_runs_members(&runs).into_iter().map(|(c, closed, _)| (c, closed)).collect()
}
/// Wie [`stitch_runs`], zusätzlich die Indizes der beteiligten Läufe je Zug ([146]: Zeichen-
/// Reihenfolge je Zug statt je Gruppe).
pub fn stitch_runs_members(runs: &[Vec<V2>]) -> Vec<(Vec<V2>, bool, Vec<usize>)> {
let mut end_count: HashMap<(u64, u64), u32> = HashMap::new();
for r in &runs {
for r in runs {
for p in [r[0], r[r.len() - 1]] {
*end_count.entry(stitch_key(p)).or_insert(0) += 1;
}
@@ -291,6 +299,7 @@ pub fn stitch_runs(runs: Vec<Vec<V2>>) -> Vec<(Vec<V2>, bool)> {
continue;
}
used[seed] = true;
let mut members = vec![seed];
let mut chain = runs[seed].clone();
let mut extended = true;
while extended && !(chain.len() > 2 && same_pt(chain[0], chain[chain.len() - 1])) {
@@ -337,6 +346,7 @@ pub fn stitch_runs(runs: Vec<Vec<V2>>) -> Vec<(Vec<V2>, bool)> {
continue;
}
used[ci] = true;
members.push(ci);
extended = true;
break;
}
@@ -345,7 +355,7 @@ pub fn stitch_runs(runs: Vec<Vec<V2>>) -> Vec<(Vec<V2>, bool)> {
if closed {
chain.pop();
}
out.push((chain, closed));
out.push((chain, closed, members));
}
out
}
@@ -365,7 +375,8 @@ struct EdgeGroup {
color: Rgba,
width_mm: f64,
runs: Vec<Vec<V2>>,
z: f64,
/// Zeichen-Stelle je Lauf; ein genähter Zug liegt an der spätesten seiner Läufe ([146]).
zs: Vec<f64>,
}
struct Builder {
@@ -409,14 +420,14 @@ impl Builder {
let gi = match self.group_of.get(&k) {
Some(&g) => g,
None => {
self.groups.push(EdgeGroup { color, width_mm, runs: Vec::new(), z });
self.groups.push(EdgeGroup { color, width_mm, runs: Vec::new(), zs: Vec::new() });
self.group_of.insert(k, self.groups.len() - 1);
self.groups.len() - 1
}
};
let g = &mut self.groups[gi];
g.runs.push(run);
g.z = jsnum::max(g.z, z);
g.zs.push(z);
}
}
@@ -562,7 +573,18 @@ pub fn build_scene(parts: &mut [Part], greyed_ranges: &[(usize, usize)]) -> Opti
b.flush();
let col = with_opacity(stroke_color_for(cls.as_deref(), col_s.as_deref()), cls.as_deref(), greyed);
let z = b.z();
b.s.lines.push(SLine { a, b: bb, color: col, width_mm: w, dash, z });
let solid = match &dash {
SDash::List(d) => d.is_empty(),
_ => true,
};
if solid && w > 0.0 {
// [146] Volle Einzel-Linien (Wand-Umrisse im Raster-Pfad u. a.) mit den
// Kantenläufen gleicher Farbe/Breite zusammennähen: an Ecken EIN Zug mit
// Gehrung statt zweier flacher Enden (keine Kerbe).
b.edge_run(vec![a, bb], col, w, z);
} else {
b.s.lines.push(SLine { a, b: bb, color: col, width_mm: w, dash, z });
}
}
}
}
@@ -605,11 +627,12 @@ pub fn build_scene(parts: &mut [Part], greyed_ranges: &[(usize, usize)]) -> Opti
b.flush();
let groups = std::mem::take(&mut b.groups);
for g in groups {
for (pts, closed) in stitch_runs(g.runs) {
for (pts, closed, members) in stitch_runs_members(&g.runs) {
if pts.len() < 2 {
continue;
}
let s = SStroke { pts, color: g.color, width_mm: g.width_mm, dash: SDash::Absent, z: g.z, width_screen: false };
let z = members.iter().fold(f64::NEG_INFINITY, |m, &i| jsnum::max(m, g.zs[i]));
let s = SStroke { pts, color: g.color, width_mm: g.width_mm, dash: SDash::Absent, z, width_screen: false };
if closed {
b.s.outlines.push(s);
} else {
@@ -742,7 +765,7 @@ pub fn encode_scene_bin(s: &Scene, texts: &[SText]) -> Vec<u8> {
}
let mut out = Vec::with_capacity(total);
out.extend_from_slice(b"DR2S");
for v in [1u32, s.fills.len() as u32, s.outlines.len() as u32, s.polylines.len() as u32, s.arcs.len() as u32, s.lines.len() as u32, texts.len() as u32, n_pts as u32, n_dash as u32, str_bytes as u32, 0] {
for v in [1u32, s.fills.len() as u32, s.outlines.len() as u32, s.polylines.len() as u32, s.arcs.len() as u32, s.lines.len() as u32, texts.len() as u32, n_pts as u32, n_dash as u32, str_bytes as u32, s.line_ends] {
out.extend_from_slice(&v.to_le_bytes());
}
out.extend_from_slice(&pts);
@@ -830,6 +853,7 @@ mod tests {
],
arcs: vec![SArc { center: v2(1.0, 1.0), from: v2(2.0, 1.0), to: v2(1.0, 2.0), r: 1.0, color: [1.0, 0.0, 0.0, 1.0], width_mm: 0.125, dash: SDash::Absent }],
lines: vec![SLine { a: v2(0.0, 0.0), b: v2(2600000.5, 1200000.25), color: [0.0, 0.5, 0.0, 1.0], width_mm: 0.35, dash: SDash::List(vec![3.0, 1.0, 0.5, 1.0]), z: 4.0 }],
line_ends: 0,
};
let t = |x: f64, y: f64, content: &str, size_mm: f64, color: Rgba, align: u32| SText { pos: v2(x, y), size_mm, color, align, content: content.as_bytes().to_vec() };
let texts = vec![
@@ -847,6 +871,9 @@ mod tests {
assert_eq!(encode_scene_bin(&s, &t), FIXTURE);
// Leere Szene = reiner Kopf; Landeskoordinaten bleiben f64.
assert_eq!(encode_scene_bin(&Scene::default(), &[]).len(), 48);
// [146] Linienenden im letzten Kopfwort (früher 0).
let le = encode_scene_bin(&Scene { line_ends: 9, ..Scene::default() }, &[]);
assert_eq!(&le[44..48], &9u32.to_le_bytes());
let mut l = Scene::default();
l.lines.push(SLine { a: v2(2600000.123456, 1200000.654321), b: v2(0.0, 0.0), color: [0.0; 4], width_mm: 0.1, dash: SDash::Null, z: 0.0 });
let b = encode_scene_bin(&l, &[]);
+85 -33
View File
@@ -10,7 +10,10 @@ use crate::hatch::{self, Pattern, V2};
use crate::jsnum;
use crate::plan::print_svg::{hatch_dash_paper, hatch_lines, is_generated, quantize_pen};
use crate::plan::buf::{whole, F_COLOR, F_DASH_LIST, F_GREYED, F_OPACITY, T_ARC, T_CIRCLE, T_DRAWING_ARC, T_DRAWING_TEXT, T_LINE, T_POLYGON, T_TEXT};
use crate::plan::line_ends::LineEnds;
use crate::plan::parts::Part;
use crate::plan::scene::stitch_runs_members;
use std::collections::HashMap;
use serde_json::Value;
use std::f64::consts::PI;
@@ -48,6 +51,53 @@ pub struct SvgOptions {
pub max_y: f64,
/// Schraffurlinien ausbreiten (wie der Druckpfad, an der Fläche beschnitten); Standard aus.
pub hatch: bool,
/// Linienenden und -ecken ([146]) als Attribute eines umschliessenden `<g>`.
pub line_ends: LineEnds,
}
/// Volle, offene Striche gleicher Farbe/Breite/Deckkraft, am Ende zusammengenäht ([146]): Wand-Umrisse
/// zweier Wände treffen sich an der Ecke als EIN Zug mit Ecke (Gehrung) statt mit zwei flachen Enden.
/// Jeder Zug steht an der Stelle seines spätesten Laufs (Zeichen-Reihenfolge wie bisher).
#[derive(Default)]
struct Stitcher {
groups: Vec<(String, Vec<Vec<V2>>, Vec<usize>)>,
of: HashMap<String, usize>,
}
impl Stitcher {
/// `attrs` = ` stroke=… stroke-width=…{op}`; `slot` = Platzhalter in `out`.
fn add(&mut self, attrs: String, run: Vec<V2>, slot: usize) {
let gi = *self.of.entry(attrs.clone()).or_insert_with(|| {
self.groups.push((attrs, Vec::new(), Vec::new()));
self.groups.len() - 1
});
self.groups[gi].1.push(run);
self.groups[gi].2.push(slot);
}
fn finish(self, out: &mut [String], xs: &dyn Fn(f64) -> String, ys: &dyn Fn(f64) -> String) {
for (attrs, runs, slots) in self.groups {
for (pts, closed, members) in stitch_runs_members(&runs) {
if pts.len() < 2 {
continue;
}
let slot = members.iter().map(|&m| slots[m]).max().unwrap_or(0);
let el = if !closed && pts.len() == 2 {
format!("<line x1=\"{}\" y1=\"{}\" x2=\"{}\" y2=\"{}\"{attrs}/>", xs(pts[0].x), ys(pts[0].y), xs(pts[1].x), ys(pts[1].y))
} else {
let pl = pts.iter().map(|q| format!("{},{}", xs(q.x), ys(q.y))).collect::<Vec<_>>().join(" ");
let tag = if closed { "polygon" } else { "polyline" };
format!("<{tag} points=\"{pl}\" fill=\"none\"{attrs}/>")
};
if out[slot].is_empty() {
out[slot] = el;
} else {
out[slot].push('\n');
out[slot].push_str(&el);
}
}
}
}
}
/// Zahl aus JSON (null/fehlend → NaN wie `undefined`/`NaN` in JS-Rechnungen).
@@ -91,6 +141,7 @@ pub fn plan_svg(parts: &mut [Part], o: &SvgOptions) -> Option<String> {
let xs = |x: f64| num(x);
let ys = |y: f64| num(top - y);
let mut out: Vec<String> = Vec::new();
let mut stitch = Stitcher::default();
for part in parts.iter_mut() {
let hatches = if o.hatch { part.view.hatch_table()? } else { Vec::new() };
for i in part.from..part.to {
@@ -128,30 +179,18 @@ pub fn plan_svg(parts: &mut [Part], o: &SvgOptions) -> Option<String> {
None => Vec::new(),
};
if !nse.is_empty() && stroke != "none" && !stroke.is_empty() {
let k = pts.len();
let mut d = String::new();
for e in 0..k {
if nse.contains(&e) {
continue;
}
if e == 0 || nse.contains(&(e - 1)) {
d.push_str(&format!("M{},{}", xs(pts[e].x), ys(pts[e].y)));
}
let q = pts[(e + 1) % k];
d.push_str(&format!(" L{},{}", xs(q.x), ys(q.y)));
}
out.push(format!("<polygon points=\"{pl}\" fill=\"{fill}\" stroke=\"none\"{}/>", op(greyed, opacity(4))));
if !d.is_empty() {
out.push(format!(
"<path d=\"{d}\" fill=\"none\" stroke=\"{stroke}\" stroke-width=\"{}\" stroke-linejoin=\"round\" stroke-linecap=\"round\"{}/>",
num(f[2] * mm_to_m),
op(greyed, opacity(4))
));
// Sichtbare Kantenläufe zum Zusammennähen ([146]), Kanten in Ring-Reihenfolge.
let nse_f: Vec<f64> = nse.iter().map(|&e| e as f64).collect();
let attrs = format!(" stroke=\"{stroke}\" stroke-width=\"{}\"{}", num(f[2] * mm_to_m), op(greyed, opacity(4)));
for run in crate::plan::scene::visible_edge_runs(&pts, &nse_f) {
out.push(String::new());
stitch.add(attrs.clone(), run, out.len() - 1);
}
continue;
}
out.push(format!(
"<polygon points=\"{pl}\" fill=\"{fill}\" stroke=\"{stroke}\" stroke-width=\"{}\" stroke-linejoin=\"round\"{}/>",
"<polygon points=\"{pl}\" fill=\"{fill}\" stroke=\"{stroke}\" stroke-width=\"{}\"{}/>",
num(f[2] * mm_to_m),
op(greyed, opacity(4))
));
@@ -196,11 +235,14 @@ pub fn plan_svg(parts: &mut [Part], o: &SvgOptions) -> Option<String> {
}
T_LINE => {
let color = if fl & F_COLOR != 0 { esc(part.str(f[1]).unwrap_or("")) } else { "#000".into() };
let mut dash = dash_attr(part)?;
// [141] Volle Linien mit runder Kappe wie Bildschirm (render2d) und Druck: Wand-Umrisse
// zweier Wände treffen sich an der Ecke ohne Kerbe (Stumpf-Kappe liess sie offen).
if dash.is_empty() {
dash = " stroke-linecap=\"round\"".into();
let dash = dash_attr(part)?;
// [146] Volle Linien: mit Kantenläufen gleicher Farbe/Breite zusammennähen (Ecke statt
// zweier Enden); Enden und Ecken erben die Projekt-Einstellung vom `<g>`.
if dash.is_empty() && f[2] > 0.0 {
out.push(String::new());
let attrs = format!(" stroke=\"{color}\" stroke-width=\"{}\"{}", num(f[2] * mm_to_m), op(greyed, opacity(3)));
stitch.add(attrs, vec![V2 { x: f[4], y: f[5] }, V2 { x: f[6], y: f[7] }], out.len() - 1);
continue;
}
out.push(format!(
"<line x1=\"{}\" y1=\"{}\" x2=\"{}\" y2=\"{}\" stroke=\"{color}\" stroke-width=\"{}\"{dash}{}/>",
@@ -326,8 +368,10 @@ pub fn plan_svg(parts: &mut [Part], o: &SvgOptions) -> Option<String> {
}
}
}
stitch.finish(&mut out, &xs, &ys);
out.retain(|s| !s.is_empty());
Some(format!(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"{} 0 {} {}\" width=\"{}mm\" height=\"{}mm\">\n<rect x=\"{}\" y=\"0\" width=\"{}\" height=\"{}\" fill=\"#ffffff\"/>\n{}\n</svg>\n",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"{} 0 {} {}\" width=\"{}mm\" height=\"{}mm\">\n<rect x=\"{}\" y=\"0\" width=\"{}\" height=\"{}\" fill=\"#ffffff\"/>\n<g {}>\n{}\n</g>\n</svg>\n",
num(x0),
num(w),
num(h),
@@ -336,6 +380,7 @@ pub fn plan_svg(parts: &mut [Part], o: &SvgOptions) -> Option<String> {
num(x0),
num(w),
num(h),
o.line_ends.svg_attrs(),
out.join("\n")
))
}
@@ -355,10 +400,11 @@ mod tests {
assert_eq!(op(false, Some(1.0)), "");
}
/// [141] Wand-Umrisse als volle Linien bzw. offene Kantenläufe (Stossfugen nicht gestrichen) tragen
/// runde Kappen: an der Ecke zweier Wände bleibt keine Kerbe (Stumpf-Kappe, halbe Strichbreite).
/// [146] Wand-Umrisse als volle Linie bzw. offene Kantenläufe (Stossfugen nicht gestrichen) werden
/// an der gemeinsamen Ecke zu EINEM Zug genäht (Gehrung statt zweier flacher Enden = keine Kerbe);
/// Enden und Ecken stehen einmal am umschliessenden `<g>`.
#[test]
fn umriss_mit_runder_kappe() {
fn umriss_ecke_als_zug() {
use crate::model::Vec2;
use crate::plan::buf::{View, Writer};
use crate::plan::prim::Primitive;
@@ -392,10 +438,16 @@ mod tests {
let view = View::parse(&bytes).unwrap();
let n = view.len();
let mut parts = vec![Part::new(view, 0, n).unwrap()];
let svg = plan_svg(&mut parts, &SvgOptions { scale_denominator: 50.0, margin_m: 0.5, min_x: 0.0, min_y: 0.0, max_x: 4.0, max_y: 4.0, hatch: false }).unwrap();
let path = svg.lines().find(|l| l.starts_with("<path")).unwrap();
assert!(path.contains("stroke-linecap=\"round\""), "{path}");
let line = svg.lines().find(|l| l.starts_with("<line")).unwrap();
assert!(line.contains("stroke-linecap=\"round\""), "{line}");
let opts = |line_ends| SvgOptions { scale_denominator: 50.0, margin_m: 0.5, min_x: 0.0, min_y: 0.0, max_x: 4.0, max_y: 4.0, hatch: false, line_ends };
let svg = plan_svg(&mut parts, &opts(LineEnds::default())).unwrap();
assert!(svg.contains("<g stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"4\">"), "{svg}");
assert!(!svg.contains("<path"), "keine einzelnen Kantenläufe mehr: {svg}");
// Lauf (4,0)→(0,0) des Polygons und die Linie (0,0)→(0,4) bilden einen Zug mit Ecke in (0,0).
let pl = svg.lines().find(|l| l.starts_with("<polyline")).unwrap();
assert!(pl.contains("points=\"4,4.5 0,4.5 0,0.5\"") || pl.contains("points=\"0,0.5 0,4.5 4,4.5\""), "{pl}");
assert!(!pl.contains("linecap"), "{pl}");
let mut parts = vec![Part::new(View::parse(&bytes).unwrap(), 0, n).unwrap()];
let svg = plan_svg(&mut parts, &opts(LineEnds { cap: 1, join: 2 })).unwrap();
assert!(svg.contains("<g stroke-linecap=\"round\" stroke-linejoin=\"bevel\""), "{svg}");
}
}
+2 -1
View File
@@ -15,7 +15,7 @@ const REQUIRED_ARRAYS: [&str; 3] = ["walls", "layers", "drawingLevels"];
const DEFAULT_ARRAYS: [&str; 5] = ["lineStyles", "hatches", "components", "wallTypes", "drawings2d"];
/// Bekannte Felder von `Project` (für die Meldung unbekannter Felder).
const KNOWN_KEYS: [&str; 51] = [
const KNOWN_KEYS: [&str; 53] = [
"formatVersion", "id", "name", "lineStyles", "textStyles", "hatches", "components", "wallTypes",
"ceilingTypes", "roofTypes", "blockDefs", "doorTypes", "windowTypes", "stairTypes", "pens",
"penSets", "activePenSetId", "customPalettes", "builtinPaletteBanks", "drawingLevels", "layers",
@@ -23,6 +23,7 @@ const KNOWN_KEYS: [&str; 51] = [
"extrudedSolids", "columns", "groups", "parametricWalls", "overrideRules", "viewSnapshots",
"viewSnapshotFolders", "viewTemplates", "layouts", "masterLayouts", "layoutFolders", "publishSets", "publishLog", "projectNumber", "referenceElevationMasl",
"geoAnchor", "roomProgram", "roomProgramTolerance", "parcelArea", "sunStudy", "siteRules", "scaleLineWeights",
"lineCap", "lineJoin",
];
/// Ergebnis des Einlesens.
+7 -5
View File
@@ -1,19 +1,21 @@
//! Bindungen der GPU-Kompilierung (`crate::gpu_compile`). Ausgabe-Layout s. dort.
use crate::plan::line_ends::LineEnds;
use wasm_bindgen::prelude::wasm_bindgen;
/// Primitive `[from, to)` eines Plan-Puffers (v2) → Vertex-/Index-/Batch-Daten als ein
/// `u32`-Puffer; leer bei unlesbarem Puffer oder ungültigem Bereich.
/// `u32`-Puffer; leer bei unlesbarem Puffer oder ungültigem Bereich. `line_ends` = Linienenden
/// und -ecken `cap | join << 2` ([146], 0 = flach + Gehrung).
#[wasm_bindgen]
pub fn gpu_compile_flat(buf: &[u8], from: u32, to: u32, px_per_meter: f64, packed_lines: bool) -> Vec<u32> {
crate::gpu_compile::compile_flat(buf, from as usize, to as usize, px_per_meter, packed_lines)
pub fn gpu_compile_flat(buf: &[u8], from: u32, to: u32, px_per_meter: f64, packed_lines: bool, line_ends: u32) -> Vec<u32> {
crate::gpu_compile::compile_flat(buf, from as usize, to as usize, px_per_meter, packed_lines, LineEnds::from_code(line_ends as f64))
}
/// Wie [`gpu_compile_flat`] auf einem gehaltenen Puffer (`plan_buf_hold`); leer, wenn er nicht
/// mehr gehalten wird.
#[wasm_bindgen]
pub fn gpu_compile_held(id: u32, from: u32, to: u32, px_per_meter: f64, packed_lines: bool) -> Vec<u32> {
super::plan_buf::with_held(id, |b| crate::gpu_compile::compile_flat(b, from as usize, to as usize, px_per_meter, packed_lines)).unwrap_or_default()
pub fn gpu_compile_held(id: u32, from: u32, to: u32, px_per_meter: f64, packed_lines: bool, line_ends: u32) -> Vec<u32> {
super::plan_buf::with_held(id, |b| crate::gpu_compile::compile_flat(b, from as usize, to as usize, px_per_meter, packed_lines, LineEnds::from_code(line_ends as f64))).unwrap_or_default()
}
/// Ear-Clipping eines Rings `[x, y, …]` → Dreiecks-Indizes.
+8 -3
View File
@@ -7,6 +7,7 @@ use crate::plan::parts::{parts_from, ranges_from};
use crate::plan::scene::SText;
use crate::plan::text::scene_texts;
use crate::plan::scene::{build_scene, encode_scene_bin, encode_scene_f64, Scene};
use crate::plan::line_ends::LineEnds;
use wasm_bindgen::prelude::wasm_bindgen;
fn scene_of(segs: &[f64], greyed: &[f64]) -> Option<Scene> {
@@ -23,12 +24,16 @@ fn texts_of(segs: &[f64], greyed: &[f64], paper_scale_n: f64) -> Option<Vec<STex
}
/// render2d-Szene v1 (Bytes für `set_scene_bin`/`push_native_scene`) samt Texten, gesetzt beim
/// Massstab 1:`paper_scale_n` (die Abschnitte tragen das Text-JSON). Leer = Fehler.
/// Massstab 1:`paper_scale_n` (die Abschnitte tragen das Text-JSON). `line_ends` = Linienenden
/// und -ecken `cap | join << 2` ([146]). Leer = Fehler.
#[wasm_bindgen]
pub fn plan_scene_bin(segs: &[f64], greyed: &[f64], paper_scale_n: f64) -> Vec<u8> {
pub fn plan_scene_bin(segs: &[f64], greyed: &[f64], paper_scale_n: f64, line_ends: u32) -> Vec<u8> {
let Some(texts) = texts_of(segs, greyed, paper_scale_n) else { return Vec::new() };
match scene_of(segs, greyed) {
Some(s) => encode_scene_bin(&s, &texts),
Some(mut s) => {
s.line_ends = LineEnds::from_code(line_ends as f64).code();
encode_scene_bin(&s, &texts)
}
None => Vec::new(),
}
}
+6 -3
View File
@@ -1,19 +1,22 @@
//! Bindung des SVG-Text-Exports (`crate::plan::svg`) auf gehaltenen Plan-Puffern (Abschnitte wie
//! `plan_parts`). Leerer Text = Puffer fehlt oder kaputt (TS legt neu ab und fragt nochmals).
use crate::plan::line_ends::LineEnds;
use crate::plan::parts::parts_from;
use crate::plan::svg::{plan_svg, SvgOptions};
use wasm_bindgen::prelude::wasm_bindgen;
/// `opts` = `[Massstab-Nenner, Rand m, minX, minY, maxX, maxY, (Schraffur 0/1)]`.
/// `opts` = `[Massstab-Nenner, Rand m, minX, minY, maxX, maxY, (Schraffur 0/1, (Linienenden
/// `cap | join << 2`, [146]))]`.
#[wasm_bindgen]
pub fn plan_svg_string(segs: &[f64], opts: &[f64]) -> String {
let hatch = opts.len() == 7 && opts[6] != 0.0;
let hatch = opts.len() >= 7 && opts[6] != 0.0;
let line_ends = LineEnds::from_code(opts.get(7).copied().unwrap_or(0.0));
let [n, margin, min_x, min_y, max_x, max_y] = match <[f64; 6]>::try_from(&opts[..opts.len().min(6)]) {
Ok(a) => a,
Err(_) => return String::new(),
};
let Some(held) = super::plan_buf::held_for_segs(segs) else { return String::new() };
let Some(mut parts) = parts_from(segs, |nr| held.iter().find(|e| e.0 == nr).map(|e| &*e.1)) else { return String::new() };
plan_svg(&mut parts, &SvgOptions { scale_denominator: n, margin_m: margin, min_x, min_y, max_x, max_y, hatch }).unwrap_or_default()
plan_svg(&mut parts, &SvgOptions { scale_denominator: n, margin_m: margin, min_x, min_y, max_x, max_y, hatch, line_ends }).unwrap_or_default()
}
+4 -2
View File
@@ -31,7 +31,7 @@ const GREY: f32 = 0.549;
const PX_PER_M: f64 = 90.0;
/// Linien-Shader fuer das KOMPAKTE Vertex-Format der Webview (12 statt 24 Byte):
/// `position` (2 x f32) + `packed` (4 x snorm8 = bisector.xy, side, miter).
/// `position` (2 x f32) + `packed` (4 x snorm8 = bisector.xy, side, (miter − 1) / 3).
/// Rechnung identisch zu `shaders::LINE_WGSL`.
const LINE_PACKED_WGSL: &str = r#"
struct Globals {
@@ -58,7 +58,9 @@ fn vs_main(in : VsIn) -> @builtin(position) vec4<f32> {
if (len > 1e-6) {
unit_px = dir_px / len;
}
let width_px = max(1.0, globals.stroke_px * globals.stroke_scale) * in.packed.w;
// Laengenfaktor ([146]): Byte 0 = 1 (normale Kante), bis 4 (Gehrungsspitze, Ecke der Kappe).
let miter = 1.0 + max(in.packed.w, 0.0) * 3.0;
let width_px = max(1.0, globals.stroke_px * globals.stroke_scale) * miter;
let offset_px = unit_px * (width_px * 0.5) * in.packed.z;
return vec4<f32>(clip_p.xy + offset_px / (globals.viewport_px * 0.5), clip_p.z, clip_p.w);
}
+1
View File
@@ -127,6 +127,7 @@ pub fn demo_scene() -> Scene {
color: ink,
align: TextAlign::Center,
}],
line_ends: 0,
}
}
+2 -2
View File
@@ -81,7 +81,7 @@ struct ArcInstance {
/// (r_screen, a0, sweep, r_model)
geom: [f32; 4],
color: [f32; 4],
/// (width_mm, dash_total, dash_count, _pad)
/// (width_mm, dash_total, dash_count, cap) — cap [146]: 0 flach, 1 rund, 2 vorstehend
wdash: [f32; 4],
/// bis zu MAX_ARC_DASH An/Aus-Laengen (Modell-Meter).
dash: [f32; 4],
@@ -95,7 +95,7 @@ impl ArcInstance {
center: a.center,
geom: [a.r_screen, a.a0, a.sweep, a.r_model],
color: a.color,
wdash: [a.width_mm, a.dash_total, a.dash_count as f32, 0.0],
wdash: [a.width_mm, a.dash_total, a.dash_count as f32, a.cap as f32],
dash: a.dash,
}
}
+16 -3
View File
@@ -3,7 +3,8 @@
//
// Aufbau (alle Abschnitte lueckenlos hintereinander, kein Fuellmaterial):
// Kopf, 48 Byte: magic "DR2S" | version u32 | n_fills n_outlines n_polylines n_arcs
// n_lines n_texts (je u32) | n_pts u32 | n_dash u32 | str_bytes u32 | 0 u32
// n_lines n_texts (je u32) | n_pts u32 | n_dash u32 | str_bytes u32 |
// line_ends u32 ([146] `cap | join << 2`, frueher 0 = flach + Gehrung)
// Punkte: n_pts x (x f64, y f64) in Modell-Metern (LV95-gross moeglich). Gemeinsamer
// Pool, der der Reihe nach verbraucht wird: Fuellungen, Umrisse, Polylinien
// (je `n` Punkte), Boegen (je 3: Mitte, von, nach), Linien (je 2), Texte (je 1).
@@ -123,7 +124,8 @@ pub fn decode_scene(bytes: &[u8]) -> Result<Scene, String> {
let n_pts = r.u32() as u64;
let n_dash = r.u32() as u64;
let str_bytes = r.u32() as u64;
let _reserved = r.u32();
// Frueher reserviert (0), seit [146] Linienenden/-ecken `cap | join << 2`.
let line_ends = r.u32() & 0xf;
// Gesamtlaenge in u64 vorab pruefen (u32-Zaehler * kleine Faktoren laufen nicht
// ueber), bevor irgendetwas alloziert wird.
@@ -207,6 +209,7 @@ pub fn decode_scene(bytes: &[u8]) -> Result<Scene, String> {
if pts.next != n_pts || dashes.next != dashes.v.len() {
return Err("Pools nicht vollstaendig verbraucht".into());
}
scene.line_ends = line_ends;
Ok(scene)
}
@@ -240,6 +243,7 @@ mod tests {
Text { pos: [3.0, 4.0], content: String::new(), size_mm: 2.0, color: [0.0, 0.0, 0.0, 1.0], align: TextAlign::Right },
Text { pos: [5.0, 6.0], content: "A".into(), size_mm: 1.0, color: [0.0, 0.0, 1.0, 1.0], align: TextAlign::Left },
],
line_ends: 0,
}
}
@@ -264,6 +268,15 @@ mod tests {
assert_same(&decode_scene(&b).unwrap(), &Scene::default());
}
#[test]
fn linienenden_im_kopf() {
// [146] Das frühere Reservewort trägt `cap | join << 2`; alte Szenen (0) = flach + Gehrung.
assert_eq!(decode_scene(FIXTURE).unwrap().line_ends, 0);
let mut v = FIXTURE.to_vec();
v[44..48].copy_from_slice(&(1u32 | 2 << 2).to_le_bytes());
assert_eq!(decode_scene(&v).unwrap().line_ends, 9);
}
#[test]
fn rejects_foreign_version_magic_and_truncation() {
let mut v = FIXTURE.to_vec();
@@ -417,7 +430,7 @@ mod roundtrip {
(pts.len() / 16) as u32,
(dash.len() / 4) as u32,
strs.len() as u32,
0,
s.line_ends,
] {
out.extend_from_slice(&v.to_le_bytes());
}
+26 -6
View File
@@ -211,7 +211,6 @@ fn fs_main(in : VsOut) -> @location(0) vec4<f32> {
// 1) Radiale Kante (Strichbreite quer zum Bogen), analytisch antialiased.
let d_ring_px = abs(dist - r_s) * pps;
let half_w_px = 0.5 * max(1.0, width_mm * g.stroke_scale);
let cov_radial = 1.0 - smoothstep(half_w_px - 0.6, half_w_px + 0.6, d_ring_px);
// 2) Winkel-Clamp auf [min(0,sweep), max(0,sweep)] mit Butt-Cap an den Enden.
let theta = atan2(rel.y, rel.x);
@@ -228,7 +227,17 @@ fn fs_main(in : VsOut) -> @location(0) vec4<f32> {
sd = -min(da - lo, hi - da);
}
let cap_px = sd * r_s * pps; // signierter Abstand zur Kappe (Geraete-px)
let cov_cap = 1.0 - smoothstep(-0.5, 0.5, cap_px);
// [146] Linienende: 0 flach, 1 rund (Abstand zum Endpunkt), 2 vorstehend (um halbe Breite).
let cap_kind = i32(in.wdash.w + 0.5);
var cov_cap = 1.0 - smoothstep(-0.5, 0.5, cap_px);
var cov_radial = 1.0 - smoothstep(half_w_px - 0.6, half_w_px + 0.6, d_ring_px);
if (cap_kind == 2) {
cov_cap = 1.0 - smoothstep(-0.5, 0.5, cap_px - half_w_px);
} else if (cap_kind == 1 && cap_px > 0.0) {
cov_cap = 1.0;
let d_end = length(vec2<f32>(cap_px, d_ring_px));
cov_radial = 1.0 - smoothstep(half_w_px - 0.6, half_w_px + 0.6, d_end);
}
// 3) Dash: Bogenlaenge ab a0 (Modell-Meter) modulo Muster, weicher Uebergang.
var cov_dash = 1.0;
@@ -359,7 +368,10 @@ fn fs_main(in : VsOut) -> @location(0) vec4<f32> {
let sc = clamp(s, in.seg.x, in.seg.y);
let e_out = abs(s - sc);
let total = in.pat.x;
let n = i32(in.pat.y + 0.5);
// `count` traegt `16 · cap` ([146]): 0 flach, 1 rund, 2 vorstehend.
let nc = i32(in.pat.y + 0.5);
let n = nc % 16;
let cap_kind = nc / 16;
var e_in = 0.0;
if (n > 0 && total > 1e-6) {
let k = floor(sc / total);
@@ -391,9 +403,17 @@ fn fs_main(in : VsOut) -> @location(0) vec4<f32> {
// [140] Deckung unter 1 Geraete-px wie `LINE_WGSL`.
var a = globals.color.a * clamp(globals.stroke_px * globals.stroke_scale, 0.35, 1.0);
if (e > 0.0) {
// Rundes Strich-Ende (Abstand zum Strich), Kante ~1 px weich wie die Boegen.
let d = sqrt(e * e + y * y);
a = a * (1.0 - smoothstep(hw - 0.5, hw + 0.5, d));
// Innere Ecke eines Zugs (nicht in einer Luecke): rund verbunden wie bisher.
let inner = e_in <= 0.0 && sc > 1e-3 && sc < in.seg.z - 1e-3;
if (cap_kind == 1 || inner) {
// Rundes Strich-Ende (Abstand zum Strich), Kante ~1 px weich wie die Boegen.
let d = sqrt(e * e + y * y);
a = a * (1.0 - smoothstep(hw - 0.5, hw + 0.5, d));
} else if (cap_kind == 2) {
a = a * (1.0 - smoothstep(hw - 0.5, hw + 0.5, max(e, abs(y))));
} else {
a = a * (1.0 - smoothstep(0.0, 1.0, e));
}
}
if (a <= 0.002) {
discard;
+164 -4
View File
@@ -62,6 +62,8 @@ pub struct ArcInstanceData {
pub dash_count: u32,
/// Summe der gueltigen `dash`-Eintraege (Zykluslaenge, Modell-Meter).
pub dash_total: f32,
/// Linienende ([146]): 0 flach, 1 rund, 2 vorstehend.
pub cap: u32,
}
/// Hoechstzahl Eintraege eines Linien-Strichmusters (nach Verdoppeln ungerader Muster), die der
@@ -84,7 +86,8 @@ pub struct DashSegment {
pub run_len: f32,
/// Zykluslaenge (Bildschirm-Einheiten).
pub total: f32,
/// Gueltige Eintraege in `dash` (gerade Indizes = Strich, ungerade = Luecke).
/// Gueltige Eintraege in `dash` (gerade Indizes = Strich, ungerade = Luecke) plus
/// `16 · cap` ([146] Linienende: 0 flach, 1 rund, 2 vorstehend; Muster mit Punkten immer rund).
pub count: u32,
/// An/Aus-Laengen (Bildschirm-Einheiten).
pub dash: [f32; MAX_LINE_DASH],
@@ -315,11 +318,17 @@ fn stroke_dashed_or_solid(
// Ungueltiges Muster: ein offener Zug (wie `split_dash` → ein Stueck); sehr lange
// Muster zerlegt weiter die CPU.
_ => {
// Punkte im Muster brauchen runde Enden ([96]), auch bei flacher Einstellung ([146]).
let saved = geo.ends;
if d.iter().step_by(2).any(|v| *v <= 0.0) {
geo.ends.cap = 1;
}
for piece in split_dash(pts, d) {
if piece.len() >= 2 {
geo.stroke_polyline(&piece, false, color, stroke_mm, width_screen, bounds);
}
}
geo.ends = saved;
}
},
_ => geo.stroke_polyline(pts, closed, color, stroke_mm, width_screen, bounds),
@@ -508,6 +517,27 @@ pub struct GpuGeometry {
pub draw_sequence: Vec<(BatchKind, u32)>,
/// Modell-Bounds (Meter) fuer Debug/Einpassen; nicht render-kritisch.
pub bounds: [f32; 4], // [min_x, min_y, max_x, max_y]
/// Linienenden und -ecken der Szene ([146]).
pub ends: LineEnds,
}
/// Linienenden und -ecken ([146], `Scene::line_ends`): cap 0 flach, 1 rund, 2 vorstehend;
/// join 0 Gehrung (bis [`MITER_LIMIT`], sonst gefast), 1 rund, 2 gefast.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct LineEnds {
pub cap: u32,
pub join: u32,
}
/// Gehrungsgrenze wie SVG `stroke-miterlimit` (Gehrungslaenge / Strichbreite).
pub const MITER_LIMIT: f32 = 4.0;
impl LineEnds {
pub fn from_code(c: u32) -> Self {
let cap = c & 3;
let join = (c >> 2) & 3;
Self { cap: if cap > 2 { 0 } else { cap }, join: if join > 2 { 0 } else { join } }
}
}
#[inline]
@@ -599,6 +629,8 @@ impl GpuGeometry {
*d = c * PX_PER_M;
}
let total: f32 = cycle_m.iter().sum::<f32>() * PX_PER_M;
// Punkte (Strich der Laenge 0) brauchen runde Enden, sonst sind sie unsichtbar ([96]).
let cap = if cycle_m.iter().step_by(2).any(|d| *d <= 0.0) { 1 } else { self.ends.cap };
let before = self.dash_segments.len();
let mut s0 = 0.0f32;
for (w, &l) in pts.windows(2).zip(&lens) {
@@ -613,7 +645,7 @@ impl GpuGeometry {
s0: s0 * PX_PER_M,
run_len: run * PX_PER_M,
total,
count: cycle_m.len() as u32,
count: cycle_m.len() as u32 + 16 * cap,
dash,
});
s0 += l;
@@ -772,6 +804,52 @@ impl GpuGeometry {
add_fan_arc(verts, idx, p, a0, a0 + sweep_sign * std::f32::consts::PI);
}
// [146] Gehrung (bis `MITER_LIMIT`, sonst gefast) bzw. Fase: Dreiecke auf der Aussenseite,
// Spitze mit Laengenfaktor `m` im 6. Vertex-Wert (Shader: Breite · miter).
#[inline]
fn add_miter_join(verts: &mut Vec<f32>, idx: &mut Vec<u32>, p: Point, d1: Point, d2: Point, miter: bool) {
let turn = d1[0] * d2[1] - d1[1] * d2[0];
let dot = d1[0] * d2[0] + d1[1] * d2[1];
if (turn.abs() < 1e-6 && dot > 0.0) || dot < -0.9999 {
return; // gerade bzw. Umkehr (flach wie SVG bei ueberschrittener Grenze)
}
let outer = if turn > 0.0 { -1.0 } else { 1.0 };
let n1 = left_normal_of(d1);
let n2 = left_normal_of(d2);
let u1 = [outer * n1[0], outer * n1[1]];
let u2 = [outer * n2[0], outer * n2[1]];
let ic = push_vert(verts, p, [1.0, 0.0], 0.0);
let i1 = push_vert(verts, p, u1, 1.0);
let i2 = push_vert(verts, p, u2, 1.0);
let cos_half = ((1.0 + dot) * 0.5).max(0.0).sqrt();
let m = if cos_half > 1e-6 { 1.0 / cos_half } else { f32::INFINITY };
if miter && m <= MITER_LIMIT {
let b = [u1[0] + u2[0], u1[1] + u2[1]];
let bl = (b[0] * b[0] + b[1] * b[1]).sqrt();
verts.extend_from_slice(&[p[0], p[1], b[0] / bl, b[1] / bl, 1.0, m]);
let it = (verts.len() / 6 - 1) as u32;
idx.extend_from_slice(&[ic, i1, it, ic, it, i2]);
} else {
idx.extend_from_slice(&[ic, i1, i2]);
}
}
// [146] Vorstehende Kappe: Rechteck um die halbe Breite nach aussen (`e` = Richtung weg
// von der Linie); Ecken diagonal mit Faktor sqrt(2).
#[inline]
fn add_square_cap(verts: &mut Vec<f32>, idx: &mut Vec<u32>, p: Point, n: Point, e: Point) {
let r = std::f32::consts::FRAC_1_SQRT_2;
let m = std::f32::consts::SQRT_2;
let ia = push_vert(verts, p, n, 1.0);
let ib = push_vert(verts, p, n, -1.0);
verts.extend_from_slice(&[p[0], p[1], (n[0] + e[0]) * r, (n[1] + e[1]) * r, 1.0, m]);
let ic = (verts.len() / 6 - 1) as u32;
verts.extend_from_slice(&[p[0], p[1], (-n[0] + e[0]) * r, (-n[1] + e[1]) * r, 1.0, m]);
let id = (verts.len() / 6 - 1) as u32;
idx.extend_from_slice(&[ia, ic, id, ia, id, ib]);
}
let ends = self.ends;
for v in 0..k {
let has_in = closed || v > 0;
let has_out = closed || v < k - 1;
@@ -782,6 +860,19 @@ impl GpuGeometry {
};
let d_out = if has_out { seg_dir[v % segs] } else { None };
match (d_in, d_out) {
(Some(di), Some(do_)) if ends.join != 1 => {
add_miter_join(&mut self.line_verts, &mut self.line_idx, s[v], di, do_, ends.join == 0)
}
(None, Some(d)) if ends.cap != 1 => {
if ends.cap == 2 {
add_square_cap(&mut self.line_verts, &mut self.line_idx, s[v], left_normal_of(d), [-d[0], -d[1]]);
}
}
(Some(d), None) if ends.cap != 1 => {
if ends.cap == 2 {
add_square_cap(&mut self.line_verts, &mut self.line_idx, s[v], left_normal_of(d), d);
}
}
(Some(di), Some(do_)) => {
add_round_join(&mut self.line_verts, &mut self.line_idx, s[v], di, do_)
}
@@ -857,7 +948,7 @@ impl Bounds {
/// ist zoom-INVARIANT: Papier-mm-Striche wie auch die Bogen-Kanten werden erst im
/// Shader auf Geraete-px abgebildet — keine Neu-Tessellierung bei Zoom noetig.
pub fn compile_scene(scene: &Scene) -> GpuGeometry {
let mut geo = GpuGeometry::default();
let mut geo = GpuGeometry { ends: LineEnds::from_code(scene.line_ends), ..GpuGeometry::default() };
let mut bounds = Bounds::new();
// Maler-Reihenfolge herstellen: alle Elemente (Fuellungen, Umrisse, offene
@@ -982,6 +1073,7 @@ fn compile_arc(geo: &mut GpuGeometry, a: &Arc, bounds: &mut Bounds) {
dash,
dash_count,
dash_total,
cap: geo.ends.cap,
});
// Modell-Bounds: Bounding-Box des vollen Kreises (grosszuegig, aber sicher
// fuer "Einpassen"; der sichtbare Bogen liegt stets darin).
@@ -1077,6 +1169,74 @@ mod tests {
// --- Strichmuster im Shader (DashSegment, dash_coverage) -------------------
// --- [146] Linienenden und -ecken -------------------------------------------
fn poly_scene(pts: Vec<Point>, line_ends: u32) -> GpuGeometry {
compile_scene(&Scene {
polylines: vec![crate::types::Polyline { pts, color: [0.0, 0.0, 0.0, 1.0], width_mm: 0.5, dash: None, z: 0, width_screen: false }],
line_ends,
..Scene::default()
})
}
/// Längenfaktoren (6. Wert) aller Vertices.
fn miters(g: &GpuGeometry) -> Vec<f32> {
g.line_verts.chunks_exact(6).map(|v| v[5]).collect()
}
#[test]
fn flach_mit_gehrung_ist_standard() {
// Rechter Winkel: zwei Segment-Quads + Gehrung (2 Dreiecke, Spitze mit Faktor sqrt(2)),
// keine Kappen an den offenen Enden.
let g = poly_scene(vec![[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]], 0);
assert_eq!(g.line_idx.len(), 2 * 6 + 2 * 3);
let tip: Vec<f32> = miters(&g).into_iter().filter(|m| *m != 1.0).collect();
assert_eq!(tip.len(), 1);
assert!((tip[0] - std::f32::consts::SQRT_2).abs() < 1e-5, "{tip:?}");
// Gerade Linie: nur das Quad.
assert_eq!(poly_scene(vec![[0.0, 0.0], [1.0, 0.0]], 0).line_idx.len(), 6);
}
#[test]
fn spitzer_winkel_ueber_gehrungsgrenze_wird_gefast() {
// ~10 Grad Innenwinkel: Gehrungsfaktor ~11.5 > 4 → nur das Fasen-Dreieck.
let a = 10f32.to_radians();
let g = poly_scene(vec![[1.0, 0.0], [0.0, 0.0], [a.cos(), a.sin()]], 0);
assert_eq!(g.line_idx.len(), 2 * 6 + 3);
assert!(miters(&g).iter().all(|m| *m == 1.0));
// Gefast (join 2) auch im rechten Winkel.
let g = poly_scene(vec![[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]], 2 << 2);
assert_eq!(g.line_idx.len(), 2 * 6 + 3);
}
#[test]
fn vorstehende_und_runde_kappen() {
// Vorstehend: je Ende ein Rechteck (2 Dreiecke) mit zwei Ecken im Faktor sqrt(2).
let g = poly_scene(vec![[0.0, 0.0], [1.0, 0.0]], 2);
assert_eq!(g.line_idx.len(), 6 + 2 * 6);
assert_eq!(miters(&g).iter().filter(|m| (**m - std::f32::consts::SQRT_2).abs() < 1e-5).count(), 4);
// Rund (Kappe + Ecke rund): Halbkreis-Fächer an beiden Enden, Fächer an der Ecke.
let r = poly_scene(vec![[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]], 1 | 1 << 2);
assert!(r.line_idx.len() > 2 * 6 + 2 * 3 * 10, "{}", r.line_idx.len());
assert!(miters(&r).iter().all(|m| *m == 1.0));
}
#[test]
fn strich_instanzen_tragen_die_kappe() {
let scene = |line_ends, dash: Vec<f32>| Scene {
lines: vec![Line { a: [0.0, 0.0], b: [3.0, 0.0], color: [0.0; 4], width_mm: 0.25, dash: Some(dash), z: 0 }],
line_ends,
..Scene::default()
};
assert_eq!(compile_scene(&scene(0, vec![2.0, 1.0])).dash_segments[0].count, 2);
assert_eq!(compile_scene(&scene(2, vec![2.0, 1.0])).dash_segments[0].count, 2 + 32);
// Punkte bleiben rund, auch bei flacher Einstellung.
assert_eq!(compile_scene(&scene(0, vec![2.0, 1.0, 0.0, 1.0])).dash_segments[0].count, 4 + 16);
// Bögen: Kappe im Instanz-Feld.
let arc = Scene { arcs: vec![Arc { center: [0.0, 0.0], from: [1.0, 0.0], to: [0.0, 1.0], r: 1.0, color: [0.0; 4], width_mm: 0.25, dash: None }], line_ends: 1, ..Scene::default() };
assert_eq!(compile_scene(&arc).arcs[0].cap, 1);
}
fn dashed_line(a: Point, b: Point, dash: Vec<f32>) -> Scene {
Scene { lines: vec![Line { a, b, color: [0.2, 0.2, 0.2, 1.0], width_mm: 0.13, dash: Some(dash), z: 0 }], ..Scene::default() }
}
@@ -1136,7 +1296,7 @@ mod tests {
assert!((c[0] - 12.0 * DASH_MM_TO_M).abs() < 1e-6);
let geo = compile_scene(&dashed_line([0.0, 0.0], [5.0, 0.0], vec![12.0, 1.5, 0.0, 1.5]));
assert_eq!(geo.dash_segments.len(), 1);
assert_eq!(geo.dash_segments[0].count, 4);
assert_eq!(geo.dash_segments[0].count, 4 + 16, "Punkte: Kappe rund ([146])");
// Deckung: der Punkt liegt bei 13.5 mm (Muster-Raum) und ist rund sichtbar, die Luecken nicht.
let px = PX_PER_M; // 1 Bildschirm-Einheit = 1 px
let cyc: Vec<f32> = c.iter().map(|d| d * px).collect();
+4
View File
@@ -180,6 +180,10 @@ pub struct Scene {
pub lines: Vec<Line>,
#[serde(default)]
pub texts: Vec<Text>,
/// Linienenden und -ecken ([146]) `cap | join << 2`: cap 0 flach, 1 rund, 2 vorstehend;
/// join 0 Gehrung (Grenze 4, sonst gefast), 1 rund, 2 gefast. 0 = Standard.
#[serde(default)]
pub line_ends: u32,
}
/// Rechteckiger Ausschnitt in BILDSCHIRM-Einheiten (viewBox), analog `ViewBox`
+11
View File
@@ -29,6 +29,7 @@ import type {
} from "./model/types";
import { generatePlan, computeKennzahlen, checkRoomProgram } from "./core";
import { addedItems } from "./core";
import { lineEndsOf, type LineEnds } from "./core";
import { programStatusLabel } from "./panels/KennzahlenSection";
import { sectionPlaneFromLevel, sectionUAxisModel } from "./core";
import { setDxfImportTrigger } from "./io/dxfImportHook";
@@ -1634,6 +1635,12 @@ export default function App() {
// Befehle auf die echten Setter an (siehe native/settingsWindow.ts).
const setScaleLineWeights = (on: boolean) =>
applyChange((p) => setFieldIfChanged(p, "scaleLineWeights", on ? true : undefined));
// [146] Linienenden/-ecken: Standard (flach, Gehrung) = Feld weglassen; beide Felder ein Undo-Schritt.
const setLineEnds = (e: LineEnds) =>
groupChanges(() => {
applyChange((p) => setFieldIfChanged(p, "lineCap", e.cap === "butt" ? undefined : e.cap));
applyChange((p) => setFieldIfChanged(p, "lineJoin", e.join === "miter" ? undefined : e.join));
});
useSettingsWindowHost(
{
themeMode,
@@ -1641,6 +1648,7 @@ export default function App() {
snapColor,
referenceElevationMasl: project.referenceElevationMasl,
scaleLineWeights: project.scaleLineWeights === true,
lineEnds: lineEndsOf(project),
offline,
aiAccess,
layout,
@@ -1651,6 +1659,7 @@ export default function App() {
onSnapColorChange: setSnapColor,
onReferenceElevationChange: (n) => applyChange((p) => setFieldIfChanged(p, "referenceElevationMasl", n)),
onScaleLineWeightsChange: setScaleLineWeights,
onLineEndsChange: setLineEnds,
onOfflineChange,
onAiAccessChange: setAiAccessEnabled,
onApplyLayout: (l) => setLayout(reconcileLayout(l)),
@@ -2728,6 +2737,8 @@ export default function App() {
onReferenceElevationChange={(n) => applyChange((p) => setFieldIfChanged(p, "referenceElevationMasl", n))}
scaleLineWeights={project.scaleLineWeights === true}
onScaleLineWeightsChange={setScaleLineWeights}
lineEnds={lineEndsOf(project)}
onLineEndsChange={setLineEnds}
offline={offline}
onOfflineChange={onOfflineChange}
aiAccess={aiAccess}
+54 -69
View File
@@ -1,77 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0.1 0 6.8 7.58564" width="68mm" height="75.85641mm">
<rect x="0.1" y="0" width="6.8" height="7.58564" fill="#ffffff"/>
<polygon points="6.1725,7.08564 6.1725,4.48564 5.4,4.48564 5.4,7.08564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.4,7.08564 5.4,6.18564 4,6.18564 4,7.08564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.4,4.88564 5.4,4.48564 4,4.48564 4,4.88564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,7.08564 4,4.48564 0.8275,4.48564 0.8275,7.08564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="6.1725,4.48564 6.1725,1.88564 0.8275,1.88564 0.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.6,1.88564 6.4,1.88564 6.4,0.5 0.6,0.5" fill="#b8735c" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,4.54564 6,4.54564 6,4.48564 1,4.48564" fill="#c9c2b3" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,4.58564 6,4.58564 6,4.54564 1,4.54564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,4.78564 6,4.78564 6,4.58564 1,4.58564" fill="#9aa0a6" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.8275,7.08564 6.1725,7.08564 6.1725,4.48564 5.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.1725,7.08564 1.1725,4.48564 0.8275,4.48564 0.8275,7.08564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="3.325,7.08564 3.475,7.08564 3.475,4.48564 3.325,4.48564" fill="#8c5544" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,4.48564 6,4.48564 6,2.05885 1,2.05885" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.8275,4.48564 6.1725,4.48564 6.1725,1.88564 5.8275,1.88564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.1725,4.48564 1.1725,1.88564 0.8275,1.88564 0.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="6,2.05885 6,2.28564 1,2.28564 1,2.05885" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.8275,1.88564 6.1725,1.88564 6.1725,2.28564 5.8275,2.28564" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.8275,1.88564 1.1725,1.88564 1.1725,2.28564 1,2.28564 0.8275,2.11314" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,2.05885 6,2.05885 6,2.45885 1,2.45885" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.8275,2.05885 6.1725,2.05885 6.1725,2.45885 5.8275,2.45885" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.8275,2.05885 1.1725,2.05885 1.1725,2.45885 1,2.45885 0.8275,2.28635" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.8275,7.08564 1.8,7.08564 1.8,4.48564 0.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.8,4.98564 2.7,4.98564 2.7,4.48564 1.8,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="2.7,7.08564 4,7.08564 4,4.48564 2.7,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,7.08564 5,7.08564 5,6.18564 4,6.18564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,4.98564 5,4.98564 5,4.48564 4,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5,7.08564 6.1725,7.08564 6.1725,4.48564 5,4.48564" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,4.48564 6,4.48564 6,2.05885 1,2.05885" fill="#ffffff" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="6,2.05885 6,2.11314 1,2.11314 1,2.05885" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1,2.05885 6,2.05885 6,2.28635 1,2.28635" fill="#8f959e" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.8,7.08564 2.7,7.08564 2.7,4.98564 1.8,4.98564" fill="#dcdcdc" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.836,7.08564 2.664,7.08564 2.664,5.04864 1.836,5.04864" fill="#ececec" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.8,5.06564 2.7,5.06564 2.7,4.98564 1.8,4.98564" fill="#a7adb5" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.8,7.08564 1.88,7.08564 1.88,5.06564 1.8,5.06564" fill="#a7adb5" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,6.18564 5,6.18564 5,4.98564 4,4.98564" fill="#dcdcdc" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.98,6.22064 5.02,6.22064 5.02,6.18564 3.98,6.18564" fill="#cccccb" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.95,6.24564 5.05,6.24564 5.05,6.22064 3.95,6.22064" fill="#cccccb" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="4.06,6.12564 4.94,6.12564 4.94,5.04564 4.06,5.04564" fill="none" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="4.12,6.06564 4.88,6.06564 4.88,5.10564 4.12,5.10564" fill="#d3d8dd" stroke="#2b3039" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="4,5.06564 5,5.06564 5,4.98564 4,4.98564" fill="#a7adb5" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,6.18564 4.08,6.18564 4.08,5.06564 4,5.06564" fill="#a7adb5" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<g stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4">
<polygon points="6.1725,7.08564 6.1725,4.48564 5.4,4.48564 5.4,7.08564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="5.4,7.08564 5.4,6.18564 4,6.18564 4,7.08564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="5.4,4.88564 5.4,4.48564 4,4.48564 4,4.88564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="4,7.08564 4,4.48564 0.8275,4.48564 0.8275,7.08564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="6.1725,4.48564 6.1725,1.88564 0.8275,1.88564 0.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="0.6,1.88564 6.4,1.88564 6.4,0.5 0.6,0.5" fill="#b8735c" stroke="none" stroke-width="0"/>
<polygon points="1,4.54564 6,4.54564 6,4.48564 1,4.48564" fill="#c9c2b3" stroke="none" stroke-width="0"/>
<polygon points="1,4.58564 6,4.58564 6,4.54564 1,4.54564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="1,4.78564 6,4.78564 6,4.58564 1,4.58564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="5.8275,7.08564 6.1725,7.08564 6.1725,4.48564 5.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="1.1725,7.08564 1.1725,4.48564 0.8275,4.48564 0.8275,7.08564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="3.325,7.08564 3.475,7.08564 3.475,4.48564 3.325,4.48564" fill="#8c5544" stroke="none" stroke-width="0"/>
<polygon points="1,4.48564 6,4.48564 6,2.05885 1,2.05885" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="5.8275,4.48564 6.1725,4.48564 6.1725,1.88564 5.8275,1.88564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="1.1725,4.48564 1.1725,1.88564 0.8275,1.88564 0.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="6,2.05885 6,2.28564 1,2.28564 1,2.05885" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="5.8275,1.88564 6.1725,1.88564 6.1725,2.28564 5.8275,2.28564" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="0.8275,1.88564 1.1725,1.88564 1.1725,2.28564 1,2.28564 0.8275,2.11314" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="1,2.05885 6,2.05885 6,2.45885 1,2.45885" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="5.8275,2.05885 6.1725,2.05885 6.1725,2.45885 5.8275,2.45885" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="0.8275,2.05885 1.1725,2.05885 1.1725,2.45885 1,2.45885 0.8275,2.28635" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="0.8275,7.08564 1.8,7.08564 1.8,4.48564 0.8275,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="1.8,4.98564 2.7,4.98564 2.7,4.48564 1.8,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="2.7,7.08564 4,7.08564 4,4.48564 2.7,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="4,7.08564 5,7.08564 5,6.18564 4,6.18564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="4,4.98564 5,4.98564 5,4.48564 4,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="5,7.08564 6.1725,7.08564 6.1725,4.48564 5,4.48564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="1,4.48564 6,4.48564 6,2.05885 1,2.05885" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="6,2.05885 6,2.11314 1,2.11314 1,2.05885" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="1,2.05885 6,2.05885 6,2.28635 1,2.28635" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="1.8,7.08564 2.7,7.08564 2.7,4.98564 1.8,4.98564" fill="#dcdcdc" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="1.836,7.08564 2.664,7.08564 2.664,5.04864 1.836,5.04864" fill="#ececec" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="1.8,5.06564 2.7,5.06564 2.7,4.98564 1.8,4.98564" fill="#a7adb5" stroke="none" stroke-width="0"/>
<polygon points="1.8,7.08564 1.88,7.08564 1.88,5.06564 1.8,5.06564" fill="#a7adb5" stroke="none" stroke-width="0"/>
<polygon points="4,6.18564 5,6.18564 5,4.98564 4,4.98564" fill="#dcdcdc" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="3.98,6.22064 5.02,6.22064 5.02,6.18564 3.98,6.18564" fill="#cccccb" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="3.95,6.24564 5.05,6.24564 5.05,6.22064 3.95,6.22064" fill="#cccccb" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="4.06,6.12564 4.94,6.12564 4.94,5.04564 4.06,5.04564" fill="none" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="4.12,6.06564 4.88,6.06564 4.88,5.10564 4.12,5.10564" fill="#d3d8dd" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="4,5.06564 5,5.06564 5,4.98564 4,4.98564" fill="#a7adb5" stroke="none" stroke-width="0"/>
<polygon points="4,6.18564 4.08,6.18564 4.08,5.06564 4,5.06564" fill="#a7adb5" stroke="none" stroke-width="0"/>
<line x1="4.88" y1="6.06564" x2="4.12" y2="5.58564" stroke="#7d858f" stroke-width="0.01" stroke-dasharray="0.22 0.18"/>
<line x1="4.88" y1="5.10564" x2="4.12" y2="5.58564" stroke="#7d858f" stroke-width="0.01" stroke-dasharray="0.22 0.18"/>
<line x1="4.12" y1="6.06564" x2="4.5" y2="5.10564" stroke="#7d858f" stroke-width="0.01" stroke-dasharray="0.22 0.18"/>
<line x1="4.88" y1="6.06564" x2="4.5" y2="5.10564" stroke="#7d858f" stroke-width="0.01" stroke-dasharray="0.22 0.18"/>
<polygon points="0.6,1.88564 6.4,1.88564 6.4,2.05885 0.6,2.05885" fill="#b8735c" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="0.8275" y1="7.08564" x2="1.8" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="1.8" y1="7.08564" x2="1.8" y2="4.98564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="1" y1="4.48564" x2="0.8275" y2="4.48564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="0.8275" y1="4.48564" x2="0.8275" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="1.8" y1="4.98564" x2="2.7" y2="4.98564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="2.7" y1="7.08564" x2="4" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4" y1="6.18564" x2="4" y2="4.98564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="2.7" y1="4.98564" x2="2.7" y2="7.08564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="4" y1="7.08564" x2="5" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5" y1="6.18564" x2="4" y2="6.18564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="4" y1="4.98564" x2="5" y2="4.98564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="5" y1="7.08564" x2="6.1725" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.1725" y1="7.08564" x2="6.1725" y2="4.48564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.1725" y1="4.48564" x2="6" y2="4.48564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="5" y1="4.98564" x2="5" y2="6.18564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="6" y1="4.48564" x2="6" y2="2.05885" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="1" y1="2.05885" x2="1" y2="4.48564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="6.1725" y1="4.48564" x2="6.1725" y2="2.05885" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.8275" y1="2.05885" x2="0.8275" y2="4.48564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.6" y1="1.88564" x2="6.4" y2="1.88564" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="6.4" y1="1.88564" x2="6.4" y2="0.5" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="0.5" x2="0.6" y2="0.5" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.6" y1="0.5" x2="0.6" y2="1.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="1.88564" x2="6.4" y2="2.05885" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="2.05885" x2="0.6" y2="2.05885" stroke="#2b3039" stroke-width="0.013" stroke-linecap="round"/>
<line x1="0.6" y1="2.05885" x2="0.6" y2="1.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.6" y1="7.08564" x2="6.4" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<polygon points="0.6,1.88564 6.4,1.88564 6.4,2.05885 0.6,2.05885" fill="#b8735c" stroke="none" stroke-width="0"/>
<polyline points="1.8,7.08564 1.8,4.98564 2.7,4.98564 2.7,7.08564" fill="none" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="5,6.18564 4,6.18564 4,4.98564 5,4.98564" fill="none" stroke="#2b3039" stroke-width="0.013"/>
<polyline points="6.1725,4.48564 6,4.48564 6,2.05885" fill="none" stroke="#2b3039" stroke-width="0.013"/>
<polyline points="1,2.05885 1,4.48564 0.8275,4.48564" fill="none" stroke="#2b3039" stroke-width="0.013"/>
<polyline points="2.7,7.08564 4,7.08564 5,7.08564 6.1725,7.08564 6.1725,4.48564 6.1725,2.05885" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<polyline points="0.8275,2.05885 0.8275,4.48564 0.8275,7.08564 1.8,7.08564" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<line x1="0.6" y1="1.88564" x2="6.4" y2="1.88564" stroke="#2b3039" stroke-width="0.013"/>
<line x1="6.4" y1="2.05885" x2="0.6" y2="2.05885" stroke="#2b3039" stroke-width="0.013"/>
<polyline points="6.4,2.05885 6.4,1.88564 6.4,0.5 0.6,0.5 0.6,1.88564 0.6,2.05885" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<line x1="0.6" y1="7.08564" x2="6.4" y2="7.08564" stroke="#1f242c" stroke-width="0.025"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

+85 -98
View File
@@ -1,129 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.6725 0 6.345 5.345" width="63.45mm" height="53.45mm">
<rect x="-0.6725" y="0" width="6.345" height="5.345" fill="#ffffff"/>
<polygon points="0,4.6725 5,4.6725 5,0.6725 0,0.6725" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.1725,4.5 4.8275,4.5 4.8275,0.845 0.1725,0.845" fill="#6b728000" stroke="#6b7280" stroke-width="0.002" stroke-linejoin="round"/>
<g stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4">
<polygon points="0,4.6725 5,4.6725 5,0.6725 0,0.6725" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="0.1725,4.5 4.8275,4.5 4.8275,0.845 0.1725,0.845" fill="#6b728000" stroke="#6b7280" stroke-width="0.002"/>
<text x="2.5" y="2.6725" font-size="0.3528" fill="#111111" font-family="sans-serif" text-anchor="middle">Wohnen</text>
<text x="2.5" y="3.09586" font-size="0.3528" fill="#111111" font-family="sans-serif" text-anchor="middle">17.01 m²</text>
<text x="2.5" y="3.51922" font-size="0.3528" fill="#111111" font-family="sans-serif" text-anchor="middle">HNF · Hauptnutzfläche</text>
<polygon points="-0.1725,4.845 0.8,4.845 0.8,4.825 -0.1525,4.825" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="-0.1525,4.825 0.8,4.825 0.8,4.665 0.0075,4.665" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="0.0075" y1="4.665" x2="0.8" y2="4.665" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="0.0075,4.665 0.8,4.665 0.8,4.515 0.1575,4.515" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.1575,4.515 0.8,4.515 0.8,4.5 0.1725,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="-0.1725,4.845 0.8,4.845 0.8,4.825 -0.1525,4.825" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="-0.1525,4.825 0.8,4.825 0.8,4.665 0.0075,4.665" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="0.0075,4.665 0.8,4.665 0.8,4.515 0.1575,4.515" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="0.1575,4.515 0.8,4.515 0.8,4.5 0.1725,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="-0.1725,4.845 0.8,4.845 0.8,4.5 0.1725,4.5" fill="none" stroke="none"/>
<path d="M-0.1725,4.845 L0.8,4.845 L0.8,4.5 L0.1725,4.5" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<polygon points="1.7,4.845 3,4.845 3,4.825 1.7,4.825" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.7,4.825 3,4.825 3,4.665 1.7,4.665" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="1.7" y1="4.665" x2="3" y2="4.665" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="1.7,4.665 3,4.665 3,4.515 1.7,4.515" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.7,4.515 2.34,4.515 2.34,4.5 1.7,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="2.46,4.515 3,4.515 3,4.5 2.46,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="1.7,4.845 3,4.845 3,4.825 1.7,4.825" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="1.7,4.825 3,4.825 3,4.665 1.7,4.665" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<line x1="1.7" y1="4.665" x2="3" y2="4.665" stroke="#1a1a1a" stroke-width="0.013"/>
<polygon points="1.7,4.665 3,4.665 3,4.515 1.7,4.515" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="1.7,4.515 2.34,4.515 2.34,4.5 1.7,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="2.46,4.515 3,4.515 3,4.5 2.46,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="1.7,4.845 3,4.845 3,4.5 1.7,4.5" fill="none" stroke="none"/>
<path d="M1.7,4.845 L3,4.845 L3,4.5M1.7,4.5 L1.7,4.845" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<line x1="1.7" y1="4.5" x2="2.34" y2="4.5" stroke="#1a1a1a" stroke-width="0.025" stroke-linecap="round"/>
<line x1="2.46" y1="4.5" x2="3" y2="4.5" stroke="#1a1a1a" stroke-width="0.025" stroke-linecap="round"/>
<polygon points="4,4.845 5.1725,4.845 5.1525,4.825 4,4.825" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,4.825 5.1525,4.825 4.9925,4.665 4,4.665" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="4" y1="4.665" x2="4.9925" y2="4.665" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="4,4.665 4.9925,4.665 4.8425,4.515 4,4.515" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4,4.515 4.8425,4.515 4.8275,4.5 4,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polyline points="2.34,4.5 1.7,4.5 1.7,4.845 3,4.845 3,4.5 2.46,4.5" fill="none" stroke="#1a1a1a" stroke-width="0.025"/>
<polygon points="4,4.845 5.1725,4.845 5.1525,4.825 4,4.825" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4,4.825 5.1525,4.825 4.9925,4.665 4,4.665" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4,4.665 4.9925,4.665 4.8425,4.515 4,4.515" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4,4.515 4.8425,4.515 4.8275,4.5 4,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4,4.845 5.1725,4.845 4.8275,4.5 4,4.5" fill="none" stroke="none"/>
<path d="M4,4.845 L5.1725,4.845M4.8275,4.5 L4,4.5 L4,4.845" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<polygon points="5.1725,4.845 5.1725,0.5 5.1525,0.52 5.1525,4.825" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.1525,4.825 5.1525,0.52 4.9925,0.68 4.9925,4.665" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="4.9925" y1="4.665" x2="4.9925" y2="0.68" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="4.9925,4.665 4.9925,0.68 4.8425,0.83 4.8425,4.515" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4.8425,4.515 4.8425,0.83 4.8275,0.845 4.8275,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.1725,4.845 5.1725,0.5 5.1525,0.52 5.1525,4.825" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="5.1525,4.825 5.1525,0.52 4.9925,0.68 4.9925,4.665" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4.9925,4.665 4.9925,0.68 4.8425,0.83 4.8425,4.515" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4.8425,4.515 4.8425,0.83 4.8275,0.845 4.8275,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="5.1725,4.845 5.1725,0.5 4.8275,0.845 4.8275,4.5" fill="none" stroke="none"/>
<path d="M5.1725,4.845 L5.1725,0.5M4.8275,0.845 L4.8275,4.5" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<polygon points="5.1725,0.5 4.4,0.5 4.4,0.52 5.1525,0.52" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.1525,0.52 4.4,0.52 4.4,0.68 4.9925,0.68" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="4.9925" y1="0.68" x2="4.4" y2="0.68" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="4.9925,0.68 4.4,0.68 4.4,0.83 4.8425,0.83" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4.8425,0.83 4.4,0.83 4.4,0.845 4.8275,0.845" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="5.1725,0.5 4.4,0.5 4.4,0.52 5.1525,0.52" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="5.1525,0.52 4.4,0.52 4.4,0.68 4.9925,0.68" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polyline points="4,4.665 4.9925,4.665 4.9925,0.68 4.4,0.68" fill="none" stroke="#1a1a1a" stroke-width="0.013"/>
<polygon points="4.9925,0.68 4.4,0.68 4.4,0.83 4.8425,0.83" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="4.8425,0.83 4.4,0.83 4.4,0.845 4.8275,0.845" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="5.1725,0.5 4.4,0.5 4.4,0.845 4.8275,0.845" fill="none" stroke="none"/>
<path d="M5.1725,0.5 L4.4,0.5 L4.4,0.845 L4.8275,0.845" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<polygon points="3,0.5 -0.1725,0.5 -0.1525,0.52 3,0.52" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="3,0.52 -0.1525,0.52 0.0075,0.68 3,0.68" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="3" y1="0.68" x2="0.0075" y2="0.68" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="3,0.68 0.0075,0.68 0.1575,0.83 3,0.83" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="3,0.83 2.46,0.83 2.46,0.845 3,0.845" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="2.34,0.83 0.1575,0.83 0.1725,0.845 2.34,0.845" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="4.8275,0.845 4.8275,4.5 4,4.5 4,4.845 5.1725,4.845 5.1725,0.5 4.4,0.5 4.4,0.845" fill="none" stroke="#1a1a1a" stroke-width="0.025"/>
<polygon points="3,0.5 -0.1725,0.5 -0.1525,0.52 3,0.52" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="3,0.52 -0.1525,0.52 0.0075,0.68 3,0.68" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="3,0.68 0.0075,0.68 0.1575,0.83 3,0.83" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="3,0.83 2.46,0.83 2.46,0.845 3,0.845" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="2.34,0.83 0.1575,0.83 0.1725,0.845 2.34,0.845" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="3,0.5 -0.1725,0.5 0.1725,0.845 3,0.845" fill="none" stroke="none"/>
<path d="M3,0.5 L-0.1725,0.5M3,0.845 L3,0.5" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<line x1="3" y1="0.845" x2="2.46" y2="0.845" stroke="#1a1a1a" stroke-width="0.025" stroke-linecap="round"/>
<line x1="2.34" y1="0.845" x2="0.1725" y2="0.845" stroke="#1a1a1a" stroke-width="0.025" stroke-linecap="round"/>
<polygon points="-0.1725,0.5 -0.1725,4.845 -0.1525,4.825 -0.1525,0.52" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="-0.1525,0.52 -0.1525,4.825 0.0075,4.665 0.0075,0.68" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<line x1="0.0075" y1="0.68" x2="0.0075" y2="4.665" stroke="#1a1a1a" stroke-width="0.013" stroke-linecap="round"/>
<polygon points="0.0075,0.68 0.0075,4.665 0.1575,4.515 0.1575,0.83" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="0.1575,0.83 0.1575,4.515 0.1725,4.5 0.1725,0.845" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="-0.1725,0.5 -0.1725,4.845 -0.1525,4.825 -0.1525,0.52" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="-0.1525,0.52 -0.1525,4.825 0.0075,4.665 0.0075,0.68" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polyline points="3,0.68 0.0075,0.68 0.0075,4.665 0.8,4.665" fill="none" stroke="#1a1a1a" stroke-width="0.013"/>
<polygon points="0.0075,0.68 0.0075,4.665 0.1575,4.515 0.1575,0.83" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="0.1575,0.83 0.1575,4.515 0.1725,4.5 0.1725,0.845" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="-0.1725,0.5 -0.1725,4.845 0.1725,4.5 0.1725,0.845" fill="none" stroke="none"/>
<path d="M-0.1725,0.5 L-0.1725,4.845M0.1725,4.5 L0.1725,0.845" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<polygon points="2.475,4.5 2.475,0.845 2.46,0.845 2.46,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="2.46,4.515 2.46,0.83 2.34,0.83 2.34,4.515" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="2.34,4.5 2.34,0.845 2.325,0.845 2.325,4.5" fill="#f0f0f0" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polyline points="2.46,0.845 3,0.845 3,0.5 -0.1725,0.5 -0.1725,4.845 0.8,4.845 0.8,4.5 0.1725,4.5 0.1725,0.845 2.34,0.845" fill="none" stroke="#1a1a1a" stroke-width="0.025"/>
<polygon points="2.475,4.5 2.475,0.845 2.46,0.845 2.46,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="2.46,4.515 2.46,0.83 2.34,0.83 2.34,4.515" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="2.34,4.5 2.34,0.845 2.325,0.845 2.325,4.5" fill="#f0f0f0" stroke="none" stroke-width="0"/>
<polygon points="2.475,4.5 2.475,0.845 2.325,0.845 2.325,4.5" fill="none" stroke="none"/>
<path d="M2.475,4.5 L2.475,0.845M2.325,0.845 L2.325,4.5" fill="none" stroke="#1a1a1a" stroke-width="0.025" stroke-linejoin="round" stroke-linecap="round"/>
<polygon points="3.2,4.2725 3.2,4.05917 4.2,4.05917 4.2,4.2725" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<line x1="3.2" y1="4.05917" x2="4.2" y2="4.05917" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<polygon points="3.2,4.05917 3.2,3.84583 4.2,3.84583 4.2,4.05917" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<line x1="3.2" y1="3.84583" x2="4.2" y2="3.84583" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<polygon points="3.2,3.84583 3.2,3.6325 4.2,3.6325 4.2,3.84583" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<line x1="3.2" y1="3.6325" x2="4.2" y2="3.6325" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<polygon points="3.2,3.6325 3.2,3.41917 4.2,3.41917 4.2,3.6325" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<line x1="3.2" y1="3.41917" x2="4.2" y2="3.41917" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<polygon points="3.2,3.41917 3.2,3.20583 4.2,3.20583 4.2,3.41917" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<line x1="3.2" y1="3.20583" x2="4.2" y2="3.20583" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<polygon points="3.2,3.20583 3.2,2.9925 4.2,2.9925 4.2,3.20583" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<line x1="2.475" y1="4.5" x2="2.475" y2="0.845" stroke="#1a1a1a" stroke-width="0.025"/>
<line x1="2.325" y1="0.845" x2="2.325" y2="4.5" stroke="#1a1a1a" stroke-width="0.025"/>
<polygon points="3.2,4.2725 3.2,4.05917 4.2,4.05917 4.2,4.2725" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="4.05917" x2="4.2" y2="4.05917" stroke="#1a1a1a" stroke-width="0.018"/>
<polygon points="3.2,4.05917 3.2,3.84583 4.2,3.84583 4.2,4.05917" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="3.84583" x2="4.2" y2="3.84583" stroke="#1a1a1a" stroke-width="0.018"/>
<polygon points="3.2,3.84583 3.2,3.6325 4.2,3.6325 4.2,3.84583" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="3.6325" x2="4.2" y2="3.6325" stroke="#1a1a1a" stroke-width="0.018"/>
<polygon points="3.2,3.6325 3.2,3.41917 4.2,3.41917 4.2,3.6325" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="3.41917" x2="4.2" y2="3.41917" stroke="#1a1a1a" stroke-width="0.018"/>
<polygon points="3.2,3.41917 3.2,3.20583 4.2,3.20583 4.2,3.41917" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="3.20583" x2="4.2" y2="3.20583" stroke="#1a1a1a" stroke-width="0.018"/>
<polygon points="3.2,3.20583 3.2,2.9925 4.2,2.9925 4.2,3.20583" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="2.9925" x2="4.2" y2="2.9925" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,2.9925 3.2,2.77917 4.2,2.77917 4.2,2.9925" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,2.9925 3.2,2.77917 4.2,2.77917 4.2,2.9925" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="2.77917" x2="4.2" y2="2.77917" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,2.77917 3.2,2.56583 4.2,2.56583 4.2,2.77917" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,2.77917 3.2,2.56583 4.2,2.56583 4.2,2.77917" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="2.56583" x2="4.2" y2="2.56583" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,2.56583 3.2,2.3525 4.2,2.3525 4.2,2.56583" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,2.56583 3.2,2.3525 4.2,2.3525 4.2,2.56583" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="2.3525" x2="4.2" y2="2.3525" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,2.3525 3.2,2.13917 4.2,2.13917 4.2,2.3525" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,2.3525 3.2,2.13917 4.2,2.13917 4.2,2.3525" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="2.13917" x2="4.2" y2="2.13917" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,2.13917 3.2,1.92583 4.2,1.92583 4.2,2.13917" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,2.13917 3.2,1.92583 4.2,1.92583 4.2,2.13917" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="1.92583" x2="4.2" y2="1.92583" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,1.92583 3.2,1.7125 4.2,1.7125 4.2,1.92583" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,1.92583 3.2,1.7125 4.2,1.7125 4.2,1.92583" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="1.7125" x2="4.2" y2="1.7125" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,1.7125 3.2,1.49917 4.2,1.49917 4.2,1.7125" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,1.7125 3.2,1.49917 4.2,1.49917 4.2,1.7125" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="1.49917" x2="4.2" y2="1.49917" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,1.49917 3.2,1.28583 4.2,1.28583 4.2,1.49917" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,1.49917 3.2,1.28583 4.2,1.28583 4.2,1.49917" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="1.28583" x2="4.2" y2="1.28583" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<polygon points="3.2,1.28583 3.2,1.0725 4.2,1.0725 4.2,1.28583" fill="none" stroke="#1a1a1a" stroke-width="0.0126" stroke-linejoin="round"/>
<polygon points="3.2,1.28583 3.2,1.0725 4.2,1.0725 4.2,1.28583" fill="none" stroke="#1a1a1a" stroke-width="0.0126"/>
<line x1="3.2" y1="1.0725" x2="4.2" y2="1.0725" stroke="#1a1a1a" stroke-width="0.0108" stroke-dasharray="0.012 0.008"/>
<line x1="3.2" y1="3.03917" x2="4.2" y2="3.03917" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<line x1="3.2" y1="3.15917" x2="4.2" y2="3.15917" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<line x1="3.7" y1="4.16583" x2="3.7" y2="1.1045" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<line x1="3.579" y1="1.3245" x2="3.7" y2="1.1045" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<line x1="3.821" y1="1.3245" x2="3.7" y2="1.1045" stroke="#1a1a1a" stroke-width="0.018" stroke-linecap="round"/>
<polygon points="3.2,4.2725 4.2,4.2725 4.2,1.0725 3.2,1.0725" fill="none" stroke="#1a1a1a" stroke-width="0.018" stroke-linejoin="round"/>
<line x1="3.2" y1="3.03917" x2="4.2" y2="3.03917" stroke="#1a1a1a" stroke-width="0.018"/>
<line x1="3.2" y1="3.15917" x2="4.2" y2="3.15917" stroke="#1a1a1a" stroke-width="0.018"/>
<line x1="3.7" y1="4.16583" x2="3.7" y2="1.1045" stroke="#1a1a1a" stroke-width="0.018"/>
<line x1="3.579" y1="1.3245" x2="3.7" y2="1.1045" stroke="#1a1a1a" stroke-width="0.018"/>
<line x1="3.821" y1="1.3245" x2="3.7" y2="1.1045" stroke="#1a1a1a" stroke-width="0.018"/>
<polygon points="3.2,4.2725 4.2,4.2725 4.2,1.0725 3.2,1.0725" fill="none" stroke="#1a1a1a" stroke-width="0.018"/>
<line x1="-1" y1="2.6725" x2="6" y2="2.6725" stroke="#1f242c" stroke-width="0.018" stroke-dasharray="0.6 0.15 0.04 0.15"/>
<line x1="-1" y1="2.9725" x2="-1" y2="2.3725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="-1" y1="2.3725" x2="-1" y2="1.7725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="-1" y1="1.7725" x2="-0.85" y2="2.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="-1" y1="1.7725" x2="-1.15" y2="2.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<polyline points="-1,2.9725 -1,2.3725 -1,1.7725" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<line x1="-1" y1="1.7725" x2="-0.85" y2="2.0125" stroke="#1f242c" stroke-width="0.025"/>
<line x1="-1" y1="1.7725" x2="-1.15" y2="2.0125" stroke="#1f242c" stroke-width="0.025"/>
<text x="-1.15" y="1.2825" font-size="0.5" fill="#1f242c" font-family="sans-serif" transform="rotate(0 -1.15 1.2825)">A</text>
<line x1="6" y1="2.9725" x2="6" y2="2.3725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6" y1="2.3725" x2="6" y2="1.7725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6" y1="1.7725" x2="6.15" y2="2.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6" y1="1.7725" x2="5.85" y2="2.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<polyline points="6,2.9725 6,2.3725 6,1.7725" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<line x1="6" y1="1.7725" x2="6.15" y2="2.0125" stroke="#1f242c" stroke-width="0.025"/>
<line x1="6" y1="1.7725" x2="5.85" y2="2.0125" stroke="#1f242c" stroke-width="0.025"/>
<text x="5.85" y="1.2825" font-size="0.5" fill="#1f242c" font-family="sans-serif" transform="rotate(0 5.85 1.2825)">A</text>
<polygon points="-1,2.3725 6,2.3725 6,2.9725 -1,2.9725" fill="none" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="-1,2.3725 6,2.3725 6,2.9725 -1,2.9725" fill="none" stroke="none" stroke-width="0"/>
<line x1="-1" y1="6.6725" x2="6" y2="6.6725" stroke="#1f242c" stroke-width="0.018" stroke-dasharray="0.6 0.15 0.04 0.15"/>
<line x1="-1" y1="6.9725" x2="-1" y2="6.3725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="-1" y1="6.3725" x2="-1" y2="5.7725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="-1" y1="5.7725" x2="-0.85" y2="6.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="-1" y1="5.7725" x2="-1.15" y2="6.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<polyline points="-1,6.9725 -1,6.3725 -1,5.7725" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<line x1="-1" y1="5.7725" x2="-0.85" y2="6.0125" stroke="#1f242c" stroke-width="0.025"/>
<line x1="-1" y1="5.7725" x2="-1.15" y2="6.0125" stroke="#1f242c" stroke-width="0.025"/>
<text x="-1.15" y="5.2825" font-size="0.5" fill="#1f242c" font-family="sans-serif" transform="rotate(0 -1.15 5.2825)">Süd</text>
<line x1="6" y1="6.9725" x2="6" y2="6.3725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6" y1="6.3725" x2="6" y2="5.7725" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6" y1="5.7725" x2="6.15" y2="6.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6" y1="5.7725" x2="5.85" y2="6.0125" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<polyline points="6,6.9725 6,6.3725 6,5.7725" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<line x1="6" y1="5.7725" x2="6.15" y2="6.0125" stroke="#1f242c" stroke-width="0.025"/>
<line x1="6" y1="5.7725" x2="5.85" y2="6.0125" stroke="#1f242c" stroke-width="0.025"/>
<text x="5.85" y="5.2825" font-size="0.5" fill="#1f242c" font-family="sans-serif" transform="rotate(0 5.85 5.2825)">Süd</text>
<polygon points="-1,6.3725 6,6.3725 6,6.9725 -1,6.9725" fill="none" stroke="none" stroke-width="0" stroke-linejoin="round"/>
<polygon points="-1,6.3725 6,6.3725 6,6.9725 -1,6.9725" fill="none" stroke="none" stroke-width="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+61 -90
View File
@@ -1,94 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0.1 0 6.8 7.58564" width="68mm" height="75.85641mm">
<rect x="0.1" y="0" width="6.8" height="7.58564" fill="#ffffff"/>
<polygon points="5.8275,4.78564 5.8425,4.78564 5.8425,7.08564 5.8275,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.8425,4.78564 5.9925,4.78564 5.9925,7.08564 5.8425,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.8425,1.88564 5.9925,1.88564 5.9925,4.58564 5.8425,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="6,4.48564 6.1525,4.48564 6.1525,7.08564 6,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.9925,4.78564 6,4.78564 6,7.08564 5.9925,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.9925,4.54564 6,4.54564 6,4.58564 5.9925,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="6.1525,1.88564 6.1725,1.88564 6.1725,7.08564 6.1525,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="0.8275,1.88564 0.8475,1.88564 0.8475,7.08564 0.8275,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="0.8475,4.48564 1,4.48564 1,7.08564 0.8475,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1,4.78564 1.0075,4.78564 1.0075,7.08564 1,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1,4.54564 1.0075,4.54564 1.0075,4.58564 1,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.0075,4.78564 1.1575,4.78564 1.1575,7.08564 1.0075,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.0075,1.88564 1.1575,1.88564 1.1575,4.58564 1.0075,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.1575,4.78564 1.1725,4.78564 1.1725,7.08564 1.1575,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.325,4.78564 3.34,4.78564 3.34,7.08564 3.325,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.34,4.78564 3.46,4.78564 3.46,7.08564 3.34,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.34,4.48564 3.46,4.48564 3.46,4.58564 3.34,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.46,4.78564 3.475,4.78564 3.475,7.08564 3.46,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.8275,1.88564 5.8425,1.88564 5.8425,4.48564 5.8275,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.9925,1.88564 6.1525,1.88564 6.1525,4.48564 5.9925,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="0.8475,1.88564 1.0075,1.88564 1.0075,4.48564 0.8475,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.1575,1.88564 1.1725,1.88564 1.1725,4.48564 1.1575,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1,4.48564 1.0075,4.48564 1.0075,4.54564 1,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.1575,4.48564 3.34,4.48564 3.34,4.54564 1.1575,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.46,4.48564 5.8425,4.48564 5.8425,4.54564 3.46,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="5.9925,4.48564 6,4.48564 6,4.54564 5.9925,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1.1575,4.54564 3.34,4.54564 3.34,4.58564 1.1575,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="3.46,4.54564 5.8425,4.54564 5.8425,4.58564 3.46,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="1,4.58564 6,4.58564 6,4.78564 1,4.78564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="0.6,0.5 6.4,0.5 6.4,0.73094 0.6,0.73094" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<polygon points="4.2,5.69897 4.2,5.99364 5.2,5.99364 5.2,5.69897" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013" stroke-linejoin="round"/>
<line x1="0.6" y1="0.5" x2="0.6" y2="0.73094" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="0.6" y1="0.73094" x2="6.4" y2="0.73094" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6.4" y1="0.73094" x2="6.4" y2="0.5" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6.4" y1="0.5" x2="0.6" y2="0.5" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="0.8275" y1="1.88564" x2="0.8275" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="0.8275" y1="7.08564" x2="1.1725" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="1.1725" y1="7.08564" x2="1.1725" y2="4.78564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="1.1725" y1="4.78564" x2="3.325" y2="4.78564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="3.325" y1="4.78564" x2="3.325" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="3.325" y1="7.08564" x2="3.475" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="3.475" y1="7.08564" x2="3.475" y2="4.78564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="3.475" y1="4.78564" x2="5.8275" y2="4.78564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.8275" y1="4.78564" x2="5.8275" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.8275" y1="7.08564" x2="6.1725" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6.1725" y1="7.08564" x2="6.1725" y2="1.88564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="6.1725" y1="1.88564" x2="5.8275" y2="1.88564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.8275" y1="1.88564" x2="5.8275" y2="4.48564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.8275" y1="4.48564" x2="1.1725" y2="4.48564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="1.1725" y1="4.48564" x2="1.1725" y2="1.88564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="1.1725" y1="1.88564" x2="0.8275" y2="1.88564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="4.2" y1="5.69897" x2="4.2" y2="5.99364" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="4.2" y1="5.99364" x2="5.2" y2="5.99364" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.2" y1="5.99364" x2="5.2" y2="5.69897" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.2" y1="5.69897" x2="4.2" y2="5.69897" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<line x1="5.8275" y1="7.08564" x2="5.4" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.4" y1="6.18564" x2="5.4" y2="4.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.4" y1="7.08564" x2="4" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4" y1="6.18564" x2="5.4" y2="6.18564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.4" y1="4.88564" x2="5.2" y2="4.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="4.88564" x2="4" y2="4.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4" y1="7.08564" x2="3.475" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="3.325" y1="7.08564" x2="1.1725" y2="7.08564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4" y1="4.88564" x2="4" y2="6.18564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="1.1725" y1="1.88564" x2="5.8275" y2="1.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.69897" x2="5.2" y2="5.52564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.52564" x2="4.2" y2="5.52564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="5.52564" x2="4.2" y2="5.69897" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.52564" x2="5.2" y2="5.35231" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.35231" x2="4.2" y2="5.35231" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="5.35231" x2="4.2" y2="5.52564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.35231" x2="5.2" y2="5.17897" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.17897" x2="4.2" y2="5.17897" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="5.17897" x2="4.2" y2="5.35231" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.17897" x2="5.2" y2="5.00564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.00564" x2="4.2" y2="5.00564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="5.00564" x2="4.2" y2="5.17897" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="5.00564" x2="5.2" y2="4.83231" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="4.83231" x2="4.2" y2="4.83231" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="4.83231" x2="4.2" y2="5.00564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="5.2" y1="4.83231" x2="5.2" y2="4.78564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="4.2" y1="4.78564" x2="4.2" y2="4.83231" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="1.88564" x2="6.4" y2="0.73094" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="0.5" x2="0.6" y2="0.5" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.6" y1="0.73094" x2="0.6" y2="1.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="1.88564" x2="6.4" y2="2.05885" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="6.4" y1="2.05885" x2="6.1725" y2="2.05885" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.8275" y1="2.05885" x2="0.6" y2="2.05885" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.6" y1="2.05885" x2="0.6" y2="1.88564" stroke="#2b3039" stroke-width="0.018" stroke-linecap="round"/>
<line x1="0.6" y1="7.08564" x2="6.4" y2="7.08564" stroke="#1f242c" stroke-width="0.025" stroke-linecap="round"/>
<g stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4">
<polygon points="5.8275,4.78564 5.8425,4.78564 5.8425,7.08564 5.8275,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.8425,4.78564 5.9925,4.78564 5.9925,7.08564 5.8425,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.8425,1.88564 5.9925,1.88564 5.9925,4.58564 5.8425,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="6,4.48564 6.1525,4.48564 6.1525,7.08564 6,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.9925,4.78564 6,4.78564 6,7.08564 5.9925,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.9925,4.54564 6,4.54564 6,4.58564 5.9925,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="6.1525,1.88564 6.1725,1.88564 6.1725,7.08564 6.1525,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="0.8275,1.88564 0.8475,1.88564 0.8475,7.08564 0.8275,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="0.8475,4.48564 1,4.48564 1,7.08564 0.8475,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1,4.78564 1.0075,4.78564 1.0075,7.08564 1,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1,4.54564 1.0075,4.54564 1.0075,4.58564 1,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1.0075,4.78564 1.1575,4.78564 1.1575,7.08564 1.0075,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1.0075,1.88564 1.1575,1.88564 1.1575,4.58564 1.0075,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1.1575,4.78564 1.1725,4.78564 1.1725,7.08564 1.1575,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="3.325,4.78564 3.34,4.78564 3.34,7.08564 3.325,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="3.34,4.78564 3.46,4.78564 3.46,7.08564 3.34,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="3.34,4.48564 3.46,4.48564 3.46,4.58564 3.34,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="3.46,4.78564 3.475,4.78564 3.475,7.08564 3.46,7.08564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.8275,1.88564 5.8425,1.88564 5.8425,4.48564 5.8275,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.9925,1.88564 6.1525,1.88564 6.1525,4.48564 5.9925,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="0.8475,1.88564 1.0075,1.88564 1.0075,4.48564 0.8475,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1.1575,1.88564 1.1725,1.88564 1.1725,4.48564 1.1575,4.48564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1,4.48564 1.0075,4.48564 1.0075,4.54564 1,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1.1575,4.48564 3.34,4.48564 3.34,4.54564 1.1575,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="3.46,4.48564 5.8425,4.48564 5.8425,4.54564 3.46,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="5.9925,4.48564 6,4.48564 6,4.54564 5.9925,4.54564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1.1575,4.54564 3.34,4.54564 3.34,4.58564 1.1575,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="3.46,4.54564 5.8425,4.54564 5.8425,4.58564 3.46,4.58564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="1,4.58564 6,4.58564 6,4.78564 1,4.78564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="0.6,0.5 6.4,0.5 6.4,0.73094 0.6,0.73094" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="4.2,5.69897 4.2,5.99364 5.2,5.99364 5.2,5.69897" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
<polygon points="0.6,0.5 0.6,0.73094 6.4,0.73094 6.4,0.5" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<polygon points="0.8275,1.88564 0.8275,7.08564 1.1725,7.08564 1.1725,4.78564 3.325,4.78564 3.325,7.08564 3.475,7.08564 3.475,4.78564 5.8275,4.78564 5.8275,7.08564 6.1725,7.08564 6.1725,1.88564 5.8275,1.88564 5.8275,4.48564 1.1725,4.48564 1.1725,1.88564" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<polygon points="4.2,5.69897 4.2,5.99364 5.2,5.99364 5.2,5.69897" fill="none" stroke="#1f242c" stroke-width="0.025"/>
<polyline points="5.8275,7.08564 5.4,7.08564 4,7.08564 3.475,7.08564" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<line x1="3.325" y1="7.08564" x2="1.1725" y2="7.08564" stroke="#2b3039" stroke-width="0.018"/>
<polyline points="4.2,4.88564 4,4.88564 4,6.18564 5.4,6.18564 5.4,4.88564 5.2,4.88564" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<line x1="1.1725" y1="1.88564" x2="5.8275" y2="1.88564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.69897" x2="5.2" y2="5.52564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.52564" x2="4.2" y2="5.52564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="4.2" y1="5.52564" x2="4.2" y2="5.69897" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.52564" x2="5.2" y2="5.35231" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.35231" x2="4.2" y2="5.35231" stroke="#2b3039" stroke-width="0.018"/>
<line x1="4.2" y1="5.35231" x2="4.2" y2="5.52564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.35231" x2="5.2" y2="5.17897" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.17897" x2="4.2" y2="5.17897" stroke="#2b3039" stroke-width="0.018"/>
<line x1="4.2" y1="5.17897" x2="4.2" y2="5.35231" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.17897" x2="5.2" y2="5.00564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.00564" x2="4.2" y2="5.00564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="4.2" y1="5.00564" x2="4.2" y2="5.17897" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="5.00564" x2="5.2" y2="4.83231" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="4.83231" x2="4.2" y2="4.83231" stroke="#2b3039" stroke-width="0.018"/>
<line x1="4.2" y1="4.83231" x2="4.2" y2="5.00564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="5.2" y1="4.83231" x2="5.2" y2="4.78564" stroke="#2b3039" stroke-width="0.018"/>
<line x1="4.2" y1="4.78564" x2="4.2" y2="4.83231" stroke="#2b3039" stroke-width="0.018"/>
<line x1="6.4" y1="0.5" x2="0.6" y2="0.5" stroke="#2b3039" stroke-width="0.018"/>
<polyline points="6.1725,2.05885 6.4,2.05885 6.4,1.88564 6.4,0.73094" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<polyline points="0.6,0.73094 0.6,1.88564 0.6,2.05885 0.8275,2.05885" fill="none" stroke="#2b3039" stroke-width="0.018"/>
<line x1="0.6" y1="7.08564" x2="6.4" y2="7.08564" stroke="#1f242c" stroke-width="0.025"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

+3
View File
@@ -84,3 +84,6 @@ export { callAiTool } from "./aiTools";
export type { AiHost } from "./aiTools";
export { PRESENTATION_TEMPLATE_ID, presentationDefaults, presentationSheetOps, planPresentationSheet } from "../plan/presentationSheet";
export type { PresentationOptions, PresentationPlan, PresentationLabels } from "../plan/presentationSheet";
export { lineEndsOf, lineEndsCode, lineEndsFromCode, lineEndsSvgAttrs, planLineEndsProps, MITER_LIMIT as LINE_MITER_LIMIT } from "../model/lineEnds";
export type { LineEnds } from "../model/lineEnds";
export type { LineCap, LineJoin } from "../model/types";
+6
View File
@@ -28,6 +28,7 @@
import type { HatchRender, Plan } from "../plan/generatePlan";
import { core } from "../engine/coreWasm";
import { lineEndsSvgAttrs } from "../model/lineEnds";
import { planParts, withPlanParts } from "../plan/planParts";
/** SVG-Namespace für die programmatisch erzeugten Knoten. */
@@ -107,6 +108,8 @@ export interface PrintSvgOptions {
bounds?: { minX: number; minY: number; maxX: number; maxY: number };
/** Ohne weisses Blatt dahinter (als Schicht über anderem Inhalt). */
transparent?: boolean;
/** Linienenden und -ecken ([146], `cap | join << 2`); Standard `plan.lineEnds`. */
lineEnds?: number;
}
/** Modell-Meter → Papier-Millimeter im Massstab 1:N. */
@@ -150,6 +153,9 @@ export function planToPrintSvg(plan: Plan, opts: PrintSvgOptions): PrintSvg {
svg.setAttribute("width", String(opts.pageWidthMm));
svg.setAttribute("height", String(opts.pageHeightMm));
svg.setAttribute("viewBox", `0 0 ${opts.pageWidthMm} ${opts.pageHeightMm}`);
// Linienenden und -ecken des Projekts ([146]): einmal am Wurzelelement, alle Striche erben sie
// (der Kern setzt nur bei Punkt-Mustern eine eigene runde Kappe).
for (const [k, v] of Object.entries(lineEndsSvgAttrs(opts.lineEnds ?? plan.lineEnds))) svg.setAttribute(k, v);
// Weisses Blatt (deckt die volle Seite).
const bg = document.createElementNS(SVG_NS, "rect");
+3 -1
View File
@@ -16,10 +16,12 @@ export interface SvgStringOptions {
marginM?: number;
/** Schraffurlinien ausbreiten (wie im Druck); Standard aus. */
hatch?: boolean;
/** Linienenden und -ecken ([146], `cap | join << 2`); Standard `plan.lineEnds`. */
lineEnds?: number;
}
export function planToSvgString(plan: Plan, opts: SvgStringOptions = {}): string {
const b = plan.bounds;
const o = Float64Array.from([opts.scaleDenominator ?? 100, opts.marginM ?? 0.5, b.minX, b.minY, b.maxX, b.maxY, ...(opts.hatch ? [1] : [])]);
const o = Float64Array.from([opts.scaleDenominator ?? 100, opts.marginM ?? 0.5, b.minX, b.minY, b.maxX, b.maxY, opts.hatch ? 1 : 0, opts.lineEnds ?? plan.lineEnds ?? 0]);
return withPlanParts(planParts(plan, true), (segs) => core().plan_svg_string(segs, o));
}
+6 -3
View File
@@ -22,6 +22,7 @@
//
// Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
import { lineEndsSvgAttrs } from "../model/lineEnds";
import type {
RArc,
RFill,
@@ -134,6 +135,8 @@ export function sceneToPrintSvg(scene: RScene, opts: PrintSceneOptions): PrintSc
svg.setAttribute("width", String(opts.pageWidthMm));
svg.setAttribute("height", String(opts.pageHeightMm));
svg.setAttribute("viewBox", `0 0 ${opts.pageWidthMm} ${opts.pageHeightMm}`);
// Linienenden und -ecken des Projekts ([146]): einmal am Wurzelelement, alle Striche erben sie.
for (const [k, v] of Object.entries(lineEndsSvgAttrs(scene.lineEnds))) svg.setAttribute(k, v);
const bg = document.createElementNS(SVG_NS, "rect");
bg.setAttribute("x", "0");
@@ -269,12 +272,12 @@ function appendStroke(
el.setAttribute("stroke", rgbCss(color));
setOpacityAttr(el, "stroke-opacity", color[3]);
el.setAttribute("stroke-width", String(strokeMm));
el.setAttribute("stroke-linejoin", "round");
el.setAttribute("stroke-linecap", "round");
if (dash && dash.length) {
// Strichmuster ist bereits in Papier-mm definiert (siehe `toRenderScene.ts`:
// „unveraendert durchgereicht"), also direkt uebernehmen.
el.setAttribute("stroke-dasharray", dash.map((d) => round(d)).join(" "));
// Punkte (Strich 0) brauchen runde Enden, sonst unsichtbar ([96]).
if (dash.some((d) => d === 0)) el.setAttribute("stroke-linecap", "round");
}
svg.appendChild(el);
}
@@ -292,9 +295,9 @@ function appendLine(svg: SVGSVGElement, l: RLine, map: Mapper, _mmPerM: number):
el.setAttribute("stroke", rgbCss(l.color));
setOpacityAttr(el, "stroke-opacity", l.color[3]);
el.setAttribute("stroke-width", String(quantizePen(l.widthMm)));
el.setAttribute("stroke-linecap", "round");
if (l.dash && l.dash.length) {
el.setAttribute("stroke-dasharray", l.dash.map((d) => round(d)).join(" "));
if (l.dash.some((d) => d === 0)) el.setAttribute("stroke-linecap", "round");
}
svg.appendChild(el);
}
+9
View File
@@ -2648,6 +2648,15 @@ export const de = {
"settings.referenceElevation": "Höhe ±0.00 (m ü. M.)",
"settings.referenceElevation.hint":
"OK fertig Boden des Bezugsgeschosses (±0.00) über Meer; erscheint in Schnitten und Ansichten an der Kote ±0.00.",
"settings.lineCap": "Linienenden",
"settings.lineCap.butt": "Flach",
"settings.lineCap.round": "Rund",
"settings.lineCap.square": "Vorstehend (eckig)",
"settings.lineJoin": "Linienecken",
"settings.lineJoin.miter": "Gehrung (spitz)",
"settings.lineJoin.round": "Rund",
"settings.lineJoin.bevel": "Gefast",
"settings.lineEnds.hint": "Gilt für alle Striche im Grundriss, Schnitt und in der Ansicht – am Bildschirm, in Layouts, im Druck/PDF und im SVG-Export. Sehr spitze Ecken werden gefast (Gehrungsgrenze 4).",
"settings.scaleLineWeights": "Strichstärken nach Massstab",
"settings.scaleLineWeights.hint": "Grundriss-Strichstärken werden mit (100/n)^¼ skaliert: 1:200 ≈ 84 %, 1:50 ≈ 119 %. Gilt am Bildschirm, in Layouts und im Export.",
"settings.section.shortcuts": "Befehlszeilen-Kürzel (Tipp-Alias)",
+9
View File
@@ -2635,6 +2635,15 @@ export const en: Record<TranslationKey, string> = {
"settings.referenceElevation": "Elevation of ±0.00 (m a.s.l.)",
"settings.referenceElevation.hint":
"Finished floor of the datum storey (±0.00) above sea level; shown in sections and elevations at the ±0.00 level mark.",
"settings.lineCap": "Line ends",
"settings.lineCap.butt": "Flat",
"settings.lineCap.round": "Round",
"settings.lineCap.square": "Projecting (square)",
"settings.lineJoin": "Line corners",
"settings.lineJoin.miter": "Miter (sharp)",
"settings.lineJoin.round": "Round",
"settings.lineJoin.bevel": "Bevel",
"settings.lineEnds.hint": "Applies to all strokes in plans, sections and elevations – on screen, in layouts, print/PDF and SVG export. Very sharp corners are bevelled (miter limit 4).",
"settings.scaleLineWeights": "Line weights by scale",
"settings.scaleLineWeights.hint": "Plan line weights are scaled by (100/n)^¼: 1:200 ≈ 84 %, 1:50 ≈ 119 %. Applies on screen, in layouts and exports.",
"settings.section.shortcuts": "Command-line shortcuts (typed alias)",
+47
View File
@@ -0,0 +1,47 @@
// Linienenden und -ecken ([146]): eine Projekt-Einstellung (`Project.lineCap`/`lineJoin`) für alle
// Ausgabewege. Über die WASM-Grenze als Zahl `cap | join << 2` (Kern `plan/line_ends.rs`);
// 0 = flach + Gehrung (Standard, auch wenn die Felder fehlen).
import type { LineCap, LineJoin, Project } from "./types";
const CAPS: readonly LineCap[] = ["butt", "round", "square"];
const JOINS: readonly LineJoin[] = ["miter", "round", "bevel"];
/** Gehrungsgrenze wie SVG `stroke-miterlimit` (darüber gefast). */
export const MITER_LIMIT = 4;
export interface LineEnds {
cap: LineCap;
join: LineJoin;
}
export function lineEndsOf(p: Pick<Project, "lineCap" | "lineJoin">): LineEnds {
return {
cap: p.lineCap && CAPS.includes(p.lineCap) ? p.lineCap : "butt",
join: p.lineJoin && JOINS.includes(p.lineJoin) ? p.lineJoin : "miter",
};
}
/** Kodierung `cap | join << 2` für die Kern-Bindungen. */
export function lineEndsCode(p: Pick<Project, "lineCap" | "lineJoin">): number {
const e = lineEndsOf(p);
return CAPS.indexOf(e.cap) | (JOINS.indexOf(e.join) << 2);
}
/** Umkehrung von {@link lineEndsCode}; Unsinn → Standard. */
export function lineEndsFromCode(code: number | undefined): LineEnds {
const c = Number.isInteger(code) && code! >= 0 && code! < 16 ? code! : 0;
return { cap: CAPS[c & 3] ?? "butt", join: JOINS[(c >> 2) & 3] ?? "miter" };
}
/** SVG-Attribute (Name → Wert) für ein umschliessendes Element; Kinder erben sie. */
export function lineEndsSvgAttrs(code: number | undefined): Record<"stroke-linecap" | "stroke-linejoin" | "stroke-miterlimit", string> {
const e = lineEndsFromCode(code);
return { "stroke-linecap": e.cap, "stroke-linejoin": e.join, "stroke-miterlimit": String(MITER_LIMIT) };
}
/** Wie {@link lineEndsSvgAttrs} als React-SVG-Eigenschaften (PlanView-Gruppe der Plan-Striche). */
export function planLineEndsProps(code: number | undefined): { strokeLinecap: LineCap; strokeLinejoin: LineJoin; strokeMiterlimit: number } {
const e = lineEndsFromCode(code);
return { strokeLinecap: e.cap, strokeLinejoin: e.join, strokeMiterlimit: MITER_LIMIT };
}
+12
View File
@@ -1787,6 +1787,14 @@ export type LayoutViewport = {
scaleDenominator?: number;
};
/** Linienenden aller Striche im Plan/Schnitt/Ansicht und in den Exporten ([146]); fehlt = flach. */
export type LineCap = "butt" | "round" | "square";
/**
* Linienecken (Stoss zweier Segmente eines Zugs) ([146]); fehlt = Gehrung (Grenze 4, sonst gefast).
*/
export type LineJoin = "miter" | "round" | "bevel";
/** Ein wiederverwendbarer Linienstil (Line Manager). */
export type LineStyle = {
id: string;
@@ -2330,6 +2338,10 @@ export type Project = {
* Strichstärken im Grundriss mit dem Massstab skalieren, (100/n)^0.25 (`plan/lineWeightScale.ts`).
*/
scaleLineWeights?: boolean;
/** Linienenden aller Striche ([146]); fehlt = flach (`butt`). */
lineCap?: LineCap;
/** Linienecken aller Striche ([146]); fehlt = Gehrung (`miter`, Grenze 4). */
lineJoin?: LineJoin;
/** Grafik-Kategorie-Baum (geschossübergreifend). */
layers: Array<LayerCategory>;
walls: Array<Wall>;
+2
View File
@@ -95,6 +95,8 @@ export function SettingsWindowApp() {
onReferenceElevationChange={handlers.onReferenceElevationChange}
scaleLineWeights={state.scaleLineWeights}
onScaleLineWeightsChange={handlers.onScaleLineWeightsChange}
lineEnds={state.lineEnds}
onLineEndsChange={handlers.onLineEndsChange}
offline={state.offline}
onOfflineChange={handlers.onOfflineChange}
aiAccess={state.aiAccess}
+4
View File
@@ -12,6 +12,7 @@
//
// Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
import type { LineEnds } from "../core";
import type { AiAccessView } from "../ui/AiAccessSection";
import type { LayoutState } from "../panels/types";
import type { ThemeMode } from "../theme/themeMode";
@@ -27,6 +28,8 @@ export interface SettingsSyncState {
snapColor: string;
referenceElevationMasl: number | undefined;
scaleLineWeights: boolean;
/** Projekt-Option: Linienenden und -ecken ([146]). */
lineEnds: LineEnds;
offline: boolean;
/** [9] KI-Zugriff (Schalter, Sitzungsschlüssel, Stand). */
aiAccess: AiAccessView;
@@ -40,6 +43,7 @@ export interface SettingsCommandHandlers {
onSnapColorChange: (hex: string) => void;
onReferenceElevationChange: (n: number | undefined) => void;
onScaleLineWeightsChange: (on: boolean) => void;
onLineEndsChange: (ends: LineEnds) => void;
onOfflineChange: (offline: boolean) => void;
onAiAccessChange: (on: boolean) => void;
onApplyLayout: (layout: LayoutState) => void;
@@ -1,9 +1,11 @@
viewBox -4.2 0 37.045 17.778
bytes 375391
bytes 265283
circle 4
line 1272
polygon 1541
g 1
line 615
polygon 1555
polyline 68
rect 1
svg 1
text 4
hash ba128fc3cd96941c
hash 18d42b37d5c973f7
@@ -1,10 +1,11 @@
viewBox -4 0 23 18
bytes 408672
bytes 317361
circle 14
line 3444
path 7
g 1
line 3227
polygon 75
polyline 73
rect 1
svg 1
text 36
hash e873dd1daa6ea113
hash b639c8605f1c4c9d
@@ -1,10 +1,11 @@
viewBox -4 0 23 18
bytes 416589
bytes 323049
circle 14
line 3484
path 7
g 1
line 3240
polygon 75
polyline 84
rect 1
svg 1
text 36
hash 10e9a3b43fd5705a
hash 67469479cfe01b3d
@@ -1,10 +1,12 @@
viewBox -41.5 0 95 63.6
bytes 154702
bytes 109717
circle 16
line 742
path 63
polygon 256
g 1
line 338
path 39
polygon 259
polyline 126
rect 1
svg 1
text 121
hash 31eb0ce63a3514ff
hash 6872e879c06f7f46
@@ -1,10 +1,12 @@
viewBox -41.5 0 95 63.6
bytes 165876
bytes 114546
circle 16
line 834
path 69
polygon 256
g 1
line 349
path 45
polygon 259
polyline 151
rect 1
svg 1
text 121
hash a9e2d4dd24b3f54c
hash 49fa5877b4a27a36
@@ -1,10 +1,12 @@
viewBox -4.055 0 25.109 23.11
bytes 494072
bytes 366491
circle 14
line 3915
path 36
polygon 226
g 1
line 3333
path 21
polygon 227
polyline 169
rect 1
svg 1
text 91
hash 3a01d6133c531e3d
hash 48bd54ad5e8b1c20
@@ -1,10 +1,12 @@
viewBox -4.055 0 25.109 23.11
bytes 507906
bytes 374934
circle 14
line 4002
path 42
polygon 226
g 1
line 3350
path 27
polygon 227
polyline 195
rect 1
svg 1
text 91
hash 50c683de7aeef5d0
hash 7bd001e733642672
@@ -1,10 +1,12 @@
viewBox -10.004 0 31.058 26.958
bytes 90451
bytes 61153
circle 14
line 466
path 28
polygon 103
g 1
line 171
path 13
polygon 105
polyline 77
rect 1
svg 1
text 75
hash 3dae77c418383e16
hash d31704c307ac309d
@@ -1,10 +1,12 @@
viewBox -10.004 0 31.058 26.958
bytes 91807
bytes 62007
circle 14
line 475
path 30
polygon 103
g 1
line 173
path 15
polygon 105
polyline 80
rect 1
svg 1
text 75
hash 45fabe68cc29824d
hash eba7b491c822b768
@@ -1,9 +1,11 @@
viewBox 4.457 0 21.343 17.778
bytes 72287
bytes 41694
circle 3
line 376
polygon 168
g 1
line 96
polygon 186
polyline 13
rect 1
svg 1
text 3
hash 20b9f7ab702f9ed7
hash 471491b0c51f190a
@@ -1,7 +1,9 @@
viewBox 0.1 0 6.8 7.586
bytes 9105
line 31
polygon 42
bytes 6297
g 1
line 7
polygon 43
polyline 6
rect 1
svg 1
hash 8989d8c3eda53c4f
hash 965767e4ac42c4f0
@@ -1,9 +1,10 @@
viewBox -0.672 0 6.345 5.345
bytes 15406
line 49
path 8
polygon 61
bytes 11826
g 1
line 33
polygon 62
polyline 8
rect 1
svg 1
text 7
hash 5ab24b7693923d27
hash 6d3b7926ca1a3a6d
@@ -1,9 +1,10 @@
viewBox -0.672 0 6.345 5.345
bytes 17388
line 67
path 8
polygon 61
bytes 12491
g 1
line 34
polygon 62
polyline 13
rect 1
svg 1
text 7
hash 76655e0c29ed72d2
hash 7378e595c698986f
@@ -1,9 +1,10 @@
viewBox -0.9 0 6.8 5.8
bytes 7329
line 27
path 4
polygon 23
bytes 5572
g 1
line 15
polygon 26
polyline 4
rect 1
svg 1
text 4
hash ce46a0be23194084
hash 97d2aa8ea90eafff
@@ -1,9 +1,10 @@
viewBox -0.9 0 6.8 5.8
bytes 8243
line 35
path 4
polygon 23
bytes 5816
g 1
line 15
polygon 28
polyline 4
rect 1
svg 1
text 4
hash 1ed106fb31a8203a
hash 7ca726f020333afb
@@ -1,7 +1,9 @@
viewBox 0.1 0 6.8 7.586
bytes 11068
line 59
polygon 31
bytes 6668
g 1
line 21
polygon 34
polyline 4
rect 1
svg 1
hash 9f3f228ecf8a3650
hash 8ce8b71fc217069c
+8 -1
View File
@@ -25,6 +25,7 @@ import type {
Vec2,
} from "../model/types";
import { documentFor } from "../core/document";
import { lineEndsCode } from "../model/lineEnds";
import { registerCoreRestore } from "../engine/coreWasm";
import { decodePlanBuf, type DecodedPlanBuf } from "./planBuf";
import {
@@ -86,6 +87,11 @@ export interface Plan {
* Verbraucher prüft die Objekt-Identität und fällt sonst auf die Objekte zurück.
*/
bufRuns?: PlanBufRun[];
/**
* Linienenden und -ecken des Projekts ([146], `cap | join << 2`, s. `model/lineEnds.ts`); fehlt = 0
* (flach + Gehrung). Alle Ausgabewege (Szene, GPU-Chunks, Plan-SVG, Druck) lesen es von hier.
*/
lineEnds?: number;
}
/** `primitives[at + k]` ist (solange nicht ersetzt) `buf.prims[from + k]`, `k < to − from`. */
@@ -288,7 +294,7 @@ export function generatePlan(
}));
// Ausmass samt Schatten, Baurecht und Kontext (immer gesetzt, ohne Punkte 0,0–1,1).
const [minX, minY, maxX, maxY] = dom.buf.bounds ?? [0, 0, 1, 1];
return lazyPlan({ bounds: { minX, minY, maxX, maxY }, backgroundImages, ...(underlay.length ? { underlay } : {}) }, pieces);
return lazyPlan({ bounds: { minX, minY, maxX, maxY }, backgroundImages, lineEnds: lineEndsCode(project), ...(underlay.length ? { underlay } : {}) }, pieces);
}
/**
@@ -404,6 +410,7 @@ export function generateVisibleLevelsPlan(
{
bounds,
backgroundImages: activePlan.backgroundImages,
lineEnds: lineEndsCode(project),
...(greyedRanges.length ? { greyedRanges } : {}),
...(underlay.length ? { underlay } : {}),
},
+11
View File
@@ -299,6 +299,17 @@ export class GpuChunkCache {
/** Geometrien in Zeichenreihenfolge (nur bei `update`/`dispose` neu aufgebaut). */
geometries: GpuGeometry[] = [];
/**
* Linienenden und -ecken ([146], `Plan.lineEnds`): bei einem Wechsel sind alle Chunks veraltet
* (andere Tessellierung) — verwerfen, das nächste `update` kompiliert neu.
*/
setLineEnds(code: number | undefined): void {
const c = code ?? 0;
if ((this.gl.lineEnds ?? 0) === c) return;
this.dispose();
(this.gl as { lineEnds?: number }).lineEnds = c;
}
update(
primitives: readonly Primitive[],
pxPerMeter: number,
+5 -3
View File
@@ -18,8 +18,9 @@ const glStub = {
STATIC_DRAW: 3,
} as unknown as WebGL2RenderingContext;
// Runde Enden/Ecken ([146] `lineEnds` 1 | 1 << 2): nur dort kosten Kappen eigene Dreiecke.
const lineIndexCount = (prims: Primitive[]): number =>
compilePrimitivesToGpu(glStub, prims, 90).line.batches.reduce((s, b) => s + b.indexCount, 0);
compilePrimitivesToGpu({ ...glStub, lineEnds: 1 | (1 << 2) }, prims, 90).line.batches.reduce((s, b) => s + b.indexCount, 0);
const seg = (ax: number, ay: number, bx: number, by: number, drawingId: string): Primitive => ({
kind: 'line',
@@ -43,10 +44,11 @@ describe('compilePrimitivesToGpu: zusammenhängende Linien-Segmente', () => {
expect(merged).toBe(single + 2 * 6);
});
it('verkettet NICHT über Elementgrenzen, auch bei gemeinsamem Eckpunkt', () => {
it('[146] näht gleich gestylte volle Linien auch über Elementgrenzen (Ecke statt zweier Enden)', () => {
const single = lineIndexCount([seg(0, 0, 1, 0, 'a')]);
const twoDrawings = lineIndexCount([seg(0, 0, 1, 0, 'a'), seg(1, 0, 2, 0, 'b')]);
expect(twoDrawings).toBe(2 * single);
// Ein Zug: zweites Quad, aber keine Kappen am gemeinsamen Punkt (Wandecken ohne Kerbe).
expect(twoDrawings).toBe(single + 6);
});
it('verkettet NICHT bei unterschiedlichem Stil', () => {
+4 -3
View File
@@ -42,7 +42,7 @@ export function compilePrimitivesToGpu(
pxPerMeter = 0,
): GpuGeometry {
const packed = gl.packedLineVertices === true;
const out = core().gpu_compile_flat(encodePlanBuf(primitives, { lean: true }), 0, primitives.length, pxPerMeter, packed);
const out = core().gpu_compile_flat(encodePlanBuf(primitives, { lean: true }), 0, primitives.length, pxPerMeter, packed, gl.lineEnds ?? 0);
return uploadCompiled(gl, out);
}
@@ -53,13 +53,14 @@ export function compilePrimitivesToGpu(
*/
export function compilePlanBufRange(gl: BufferGl, src: DecodedPlanBuf, from: number, to: number, pxPerMeter = 0): GpuGeometry {
const packed = gl.packedLineVertices === true;
const ends = gl.lineEnds ?? 0;
const c = core();
if (src.holdEpoch !== coreEpoch()) src.hold = 0; // Nummer aus einer Kern-Instanz vor dem Neustart ([118])
let out = src.hold ? c.gpu_compile_held(src.hold, from, to, pxPerMeter, packed) : new Uint32Array(0);
let out = src.hold ? c.gpu_compile_held(src.hold, from, to, pxPerMeter, packed, ends) : new Uint32Array(0);
if (out.length === 0) {
src.hold = c.plan_buf_hold(src.bytes);
src.holdEpoch = coreEpoch();
out = src.hold ? c.gpu_compile_held(src.hold, from, to, pxPerMeter, packed) : c.gpu_compile_flat(src.bytes, from, to, pxPerMeter, packed);
out = src.hold ? c.gpu_compile_held(src.hold, from, to, pxPerMeter, packed, ends) : c.gpu_compile_flat(src.bytes, from, to, pxPerMeter, packed, ends);
}
return uploadCompiled(gl, out);
}
+5
View File
@@ -121,6 +121,11 @@ export interface BufferGl {
* der WebGL-Pfad bleibt beim 6-Float-Layout.
*/
readonly packedLineVertices?: boolean;
/**
* Linienenden und -ecken ([146], `cap | join << 2`, `Plan.lineEnds`) für die Kompilierung;
* gesetzt über `GpuChunkCache.setLineEnds` (verwirft bei Wechsel alle Chunks). Fehlt = 0.
*/
lineEnds?: number;
readonly ARRAY_BUFFER: number;
readonly ELEMENT_ARRAY_BUFFER: number;
readonly STATIC_DRAW: number;
+74
View File
@@ -0,0 +1,74 @@
/**
* [146] Linienenden und -ecken: eine Projekt-Einstellung (`lineCap`/`lineJoin`), Standard flach +
* Gehrung. Sie reist als `Plan.lineEnds` in alle Ausgabewege: render2d-Szene (Kopfwort), Plan-SVG
* (`<g>`), GPU-Chunks (`BufferGl.lineEnds`).
*/
import { describe, expect, it } from "vitest";
import { generatePlan } from "./generatePlan";
import { planSceneBin } from "./toRenderScene";
import { planToSvgString } from "../export/planToSvgString";
import { sampleProject } from "../model/sampleProject";
import { flattenCategories, type Project } from "../model/types";
import { lineEndsCode, lineEndsFromCode, lineEndsOf, lineEndsSvgAttrs } from "../model/lineEnds";
import { GpuChunkCache } from "./glPlan/glPlanChunks";
import type { BufferGl } from "./glPlan/glPlanTypes";
const ALL = new Set(flattenCategories(sampleProject.layers).map((c) => c.code));
const floor = sampleProject.drawingLevels.find((l) => l.kind === "floor")!.id;
const planOf = (p: Project) => generatePlan(p, floor, ALL);
describe("[146] Linienenden und -ecken", () => {
it("Kodierung: fehlt = flach + Gehrung, Rundreise, Unsinn = Standard", () => {
expect(lineEndsOf({})).toEqual({ cap: "butt", join: "miter" });
expect(lineEndsCode({})).toBe(0);
expect(lineEndsCode({ lineCap: "square", lineJoin: "bevel" })).toBe(2 | (2 << 2));
expect(lineEndsFromCode(1 | (1 << 2))).toEqual({ cap: "round", join: "round" });
expect(lineEndsFromCode(Number.NaN)).toEqual({ cap: "butt", join: "miter" });
expect(lineEndsSvgAttrs(0)).toEqual({ "stroke-linecap": "butt", "stroke-linejoin": "miter", "stroke-miterlimit": "4" });
});
it("Plan trägt die Einstellung; Plan-SVG und render2d-Szene übernehmen sie", () => {
const std = planOf(sampleProject);
expect(std.lineEnds).toBe(0);
const round = planOf({ ...sampleProject, lineCap: "round", lineJoin: "bevel" });
expect(round.lineEnds).toBe(1 | (2 << 2));
const svg0 = planToSvgString(std, { scaleDenominator: 100 });
expect(svg0).toContain('<g stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4">');
// Volle Linien tragen keine eigene Kappe mehr (nur Punkt-Muster runden selbst).
expect(svg0).not.toMatch(/<line [^>]*stroke-linecap="round"(?![^>]*stroke-dasharray)/);
const svg1 = planToSvgString(round, { scaleDenominator: 100 });
expect(svg1).toContain('<g stroke-linecap="round" stroke-linejoin="bevel"');
const head = (b: Uint8Array) => new DataView(b.buffer, b.byteOffset, b.byteLength).getUint32(44, true);
expect(head(planSceneBin(std))).toBe(0);
expect(head(planSceneBin(round))).toBe(1 | (2 << 2));
});
it("GPU-Chunks: Wechsel der Einstellung verwirft die Chunks und kompiliert mit ihr", () => {
const uploads: number[] = [];
const gl: BufferGl = {
packedLineVertices: true,
ARRAY_BUFFER: 1,
ELEMENT_ARRAY_BUFFER: 2,
STATIC_DRAW: 3,
createBuffer: () => ({}) as WebGLBuffer,
bindBuffer: () => {},
bufferData: (_t, data) => void uploads.push(data.byteLength),
deleteBuffer: () => {},
};
const cache = new GpuChunkCache(gl);
const run = (p: Project) => {
const plan = planOf(p);
cache.setLineEnds(plan.lineEnds);
cache.update(plan.primitives, 0, -Infinity, plan.greyedRanges, plan.underlay, plan.bufRuns);
return cache.lastStats.recompiled;
};
expect(run(sampleProject)).toBeGreaterThan(0);
expect(run(sampleProject)).toBe(0);
expect(gl.lineEnds ?? 0).toBe(0);
expect(run({ ...sampleProject, lineCap: "square" })).toBeGreaterThan(0);
expect(gl.lineEnds).toBe(2);
});
});
+8 -8
View File
@@ -142,8 +142,8 @@ describe("Plan-Puffer v2", () => {
expect(lean.byteLength).toBeLessThan(encodePlanBuf(prims).byteLength);
expect(() => decodePlanBuf(lean).prims).toThrow();
// Die GPU-Kompilierung liest beide gleich.
const a = core().gpu_compile_flat(lean, 0, prims.length, 90, true);
const b = core().gpu_compile_flat(encodePlanBuf(prims), 0, prims.length, 90, true);
const a = core().gpu_compile_flat(lean, 0, prims.length, 90, true, 0);
const b = core().gpu_compile_flat(encodePlanBuf(prims), 0, prims.length, 90, true, 0);
expect(a.length).toBeGreaterThan(30);
expect(Array.from(a)).toEqual(Array.from(b));
});
@@ -170,13 +170,13 @@ describe("Plan-Puffer v2", () => {
const wrong = buf.slice();
new Float64Array(wrong.buffer, 0, 2)[1] = PLAN_BUF_VERSION + 1;
expect(core().plan_buf_recode(wrong).length).toBe(0);
expect(core().gpu_compile_flat(wrong, 0, 1, 90, true).length).toBe(0);
expect(core().gpu_compile_flat(wrong, 0, 1, 90, true, 0).length).toBe(0);
expect(() => decodePlanBuf(wrong)).toThrow(/Version/);
expect(core().plan_buf_recode(buf.subarray(0, buf.length - 3)).length).toBe(0);
expect(() => decodePlanBuf(buf.subarray(0, buf.length - 2))).toThrow();
expect(core().gpu_compile_flat(new Uint8Array([1, 2, 3]), 0, 0, 90, false).length).toBe(0);
expect(core().gpu_compile_flat(buf, 0, prims.length + 1, 90, false).length).toBe(0);
expect(core().gpu_compile_held(424242, 0, 1, 90, false).length).toBe(0);
expect(core().gpu_compile_flat(new Uint8Array([1, 2, 3]), 0, 0, 90, false, 0).length).toBe(0);
expect(core().gpu_compile_flat(buf, 0, prims.length + 1, 90, false, 0).length).toBe(0);
expect(core().gpu_compile_held(424242, 0, 1, 90, false, 0).length).toBe(0);
expect(core().plan_buf_hold(wrong)).toBe(0);
// Danach arbeitet der Kern normal weiter.
expect(canon(decodePlanBuf(core().plan_buf_recode(buf)).prims)).toBe(canon(prims));
@@ -187,9 +187,9 @@ describe("Plan-Puffer v2", () => {
const buf = encodePlanBuf(prims);
const id = core().plan_buf_hold(buf);
expect(id).toBeGreaterThan(0);
expect(Array.from(core().gpu_compile_held(id, 1, 5, 90, true))).toEqual(Array.from(core().gpu_compile_flat(buf, 1, 5, 90, true)));
expect(Array.from(core().gpu_compile_held(id, 1, 5, 90, true, 0))).toEqual(Array.from(core().gpu_compile_flat(buf, 1, 5, 90, true, 0)));
core().plan_buf_release(id);
expect(core().gpu_compile_held(id, 1, 5, 90, true).length).toBe(0);
expect(core().gpu_compile_held(id, 1, 5, 90, true, 0).length).toBe(0);
});
it("Puffer einer Runde verdrängen sich nicht gegenseitig (viele Zeichnungs-Stücke)", () => {
+2 -1
View File
@@ -5,6 +5,7 @@
import type { DrawingLevel, Project } from "../model/types";
import { documentFor } from "../core/document";
import { lineEndsCode } from "../model/lineEnds";
import { decodePlanBuf } from "./planBuf";
import { lazyPlan } from "./planLazy";
import { hasLine, levelArg, visibilityArgs } from "./toSection";
@@ -38,7 +39,7 @@ export function generateElevationPlan(project: Project, level: DrawingLevel, opt
if (buf.groups.length === 0) return null;
const b = buf.bounds ?? [0, 0, 1, 1];
return lazyPlan(
{ bounds: { minX: b[0], minY: b[1], maxX: b[2], maxY: b[3] } },
{ bounds: { minX: b[0], minY: b[1], maxX: b[2], maxY: b[3] }, lineEnds: lineEndsCode(project) },
buf.groups.map(([from, to]) => ({ buf, from, to })),
);
}
+3 -2
View File
@@ -21,8 +21,9 @@ const line = (ax: number, ay: number, bx: number, by: number, extra: Partial<Pri
describe("planToRenderScene (Kern)", () => {
it("verkettet 2D-Zeichenlinien zu Polylinie bzw. Umriss", () => {
const open = planToRenderScene(planOf([line(0, 0, 1, 0), line(1, 0, 1, 1), line(5, 5, 6, 6, { drawingId: undefined })]));
expect(open.polylines.map((p) => p.pts.length)).toEqual([3]);
expect(open.lines.length).toBe(1);
// [146] Die volle Einzel-Linie ohne Zeichnung läuft über die Naht-Gruppen (Ecken statt Enden).
expect(open.polylines.map((p) => p.pts.length)).toEqual([3, 2]);
expect(open.lines.length).toBe(0);
const ring = planToRenderScene(planOf([line(0, 0, 1, 0), line(1, 0, 1, 1), line(1, 1, 0, 0)]));
expect(ring.outlines.map((o) => o.pts.length)).toEqual([3]);
expect(ring.outlines[0].dash).toBeNull();
+4 -2
View File
@@ -123,6 +123,8 @@ export interface RScene {
* Felder ohne `deny_unknown_fields`), also rückwirkungsfrei fürs GPU-Backend.
*/
bounds: RBounds;
/** Linienenden und -ecken ([146], `Plan.lineEnds`); fehlt = flach + Gehrung. */
lineEnds?: number;
}
/**
@@ -182,7 +184,7 @@ function emptySceneBin(): Uint8Array {
*/
export function planSceneBin(plan: Plan, paperScaleN: number = STAMP_DEFAULT_N): Uint8Array {
const greyed = greyedFlat(plan);
const out = withPlanParts(planParts(plan), (segs) => core().plan_scene_bin(segs, greyed, paperScaleN));
const out = withPlanParts(planParts(plan), (segs) => core().plan_scene_bin(segs, greyed, paperScaleN, plan.lineEnds ?? 0));
return out.length ? out : emptySceneBin();
}
@@ -260,5 +262,5 @@ function decodeSceneF64(f: Float64Array): SceneGeometry {
export function planToRenderScene(plan: Plan, paperScaleN: number = STAMP_DEFAULT_N): RScene {
const greyed = greyedFlat(plan);
const geo = decodeSceneF64(withPlanParts(planParts(plan), (segs) => core().plan_scene_f64(segs, greyed)));
return { ...geo, texts: sceneTexts(plan, paperScaleN), images: sceneImages(plan), bounds: { ...plan.bounds } };
return { ...geo, texts: sceneTexts(plan, paperScaleN), images: sceneImages(plan), bounds: { ...plan.bounds }, lineEnds: plan.lineEnds ?? 0 };
}
+2 -1
View File
@@ -12,6 +12,7 @@ import { buildSolidMesh } from "../engine/truckSolid";
import { extrudedSolidSpec } from "./extrudedSolidSpec";
import { decodePlanBuf } from "./planBuf";
import { lazyPlan } from "./planLazy";
import { lineEndsCode } from "../model/lineEnds";
import type { CategoryDisplayResolver, Plan } from "./generatePlan";
/** Vorbereitete Eingabe eines Schnitts: Projekt, Ebene und die truck-Körper (flach). */
@@ -141,7 +142,7 @@ export function generateSectionPlan(
if (buf.groups.length === 0) return { primitives: [], bounds: { minX: 0, minY: 0, maxX: 1, maxY: 1 } };
const b = buf.bounds ?? [0, 0, 1, 1];
return lazyPlan(
{ bounds: { minX: b[0], minY: b[1], maxX: b[2], maxY: b[3] } },
{ bounds: { minX: b[0], minY: b[1], maxX: b[2], maxY: b[3] }, lineEnds: lineEndsCode(project) },
buf.groups.map(([from, to]) => ({ buf, from, to })),
);
}
+6 -7
View File
@@ -2146,17 +2146,16 @@ body {
vector-effect: non-scaling-stroke;
}
/* CAD-typische Ecken: alle Plan-Striche gehren (miter) statt an dicken Ecken eine
Stufe/Butt-Cap-Lücke zu zeigen. Der Miter-Grenzwert verhindert überlange Spitzen
bei sehr spitzen Winkeln (dann kappen die Enden rund). Gilt für Poché-Umrisse
(polygon), Wand-/Tür-/2D-Linien und Bögen gleichermaßen. */
/* Linienenden und -ecken der Plan-Striche ([146]): Projekt-Einstellung, gesetzt als Attribute am
umschliessenden <g> in PlanView (`planLineEndsProps`); die Elemente erben sie. Ausserhalb dieser
Gruppe gelten die SVG-Standardwerte (flach, Gehrung, Grenze 4) bzw. die eigenen Klassen. */
.plan-svg polygon,
.plan-svg polyline,
.plan-svg line,
.plan-svg path {
stroke-linejoin: miter;
stroke-linecap: round;
stroke-miterlimit: 8;
stroke-linejoin: inherit;
stroke-linecap: inherit;
stroke-miterlimit: inherit;
}
/* Tür-/Fenster- + Referenz-Linien: NUR Farbe + fill hier. Strichstärke und
+39
View File
@@ -17,6 +17,7 @@ import { LayoutMenu } from "./LayoutMenu";
import { AiAccessSection, type AiAccessView } from "./AiAccessSection";
import { APP_VERSION } from "./TopBar";
import type { LayoutState } from "../panels/types";
import type { LineCap, LineEnds, LineJoin } from "../core";
import type { ThemeMode } from "../theme/themeMode";
import { checkForUpdate, getUpdateSnoozeUntil, setUpdateSnooze } from "../update/checkForUpdate";
import { getRunningVersion } from "../update/version";
@@ -77,6 +78,9 @@ export interface SettingsDialogProps {
/** Projekt-Option: Strichstärken nach Massstab ([32]). */
scaleLineWeights: boolean;
onScaleLineWeightsChange: (on: boolean) => void;
/** Projekt-Option: Linienenden und -ecken aller Striche ([146]). */
lineEnds: LineEnds;
onLineEndsChange: (ends: LineEnds) => void;
/** Offline-Modus: sperrt alle entfernten Abrufe (Materialbibliothek, swisstopo, OSM). */
offline: boolean;
onOfflineChange: (offline: boolean) => void;
@@ -126,6 +130,8 @@ export function SettingsDialog({
onReferenceElevationChange,
scaleLineWeights,
onScaleLineWeightsChange,
lineEnds,
onLineEndsChange,
offline,
onOfflineChange,
aiAccess,
@@ -292,6 +298,7 @@ export function SettingsDialog({
/>
<div className="imp-note">{t("settings.referenceElevation.hint")}</div>
<LineWeightScaleField enabled={scaleLineWeights} onChange={onScaleLineWeightsChange} />
<LineEndsField value={lineEnds} onChange={onLineEndsChange} />
</section>
</>
)}
@@ -731,6 +738,38 @@ function ShortcutRemapSection({
);
}
const LINE_CAPS: readonly LineCap[] = ["butt", "round", "square"];
const LINE_JOINS: readonly LineJoin[] = ["miter", "round", "bevel"];
/** Projekt-Option „Linienenden und -ecken" ([146], `model/lineEnds.ts`): gilt in allen Ausgaben. */
function LineEndsField({ value, onChange }: { value: LineEnds; onChange: (e: LineEnds) => void }) {
return (
<>
<label className="settings-check">
<span>{t("settings.lineCap")}</span>
<select className="settings-select" value={value.cap} onChange={(e) => onChange({ ...value, cap: e.target.value as LineCap })}>
{LINE_CAPS.map((c) => (
<option key={c} value={c}>
{t(`settings.lineCap.${c}` as TranslationKey)}
</option>
))}
</select>
</label>
<label className="settings-check">
<span>{t("settings.lineJoin")}</span>
<select className="settings-select" value={value.join} onChange={(e) => onChange({ ...value, join: e.target.value as LineJoin })}>
{LINE_JOINS.map((j) => (
<option key={j} value={j}>
{t(`settings.lineJoin.${j}` as TranslationKey)}
</option>
))}
</select>
</label>
<div className="imp-note">{t("settings.lineEnds.hint")}</div>
</>
);
}
/** Projekt-Option „Strichstärken nach Massstab" ([32], `plan/lineWeightScale.ts`). */
function LineWeightScaleField({ enabled, onChange }: { enabled: boolean; onChange: (on: boolean) => void }) {
return (
+4
View File
@@ -18,6 +18,7 @@ import {
import type { ComponentProps, CSSProperties, ReactNode } from "react";
import type { HatchRender, Plan, PlanImage, Primitive } from "../../core";
import { materializeGreyed, materializeUnderlay, type UnderlayGroup } from "../../core";
import { planLineEndsProps } from "../../core";
import type { Drawing2D, EdgeGrip, Vec2 } from "../../model/types";
import { t } from "../../i18n";
import type { ToolHandlers, ToolId, ToolMods } from "../../tools/types";
@@ -3249,11 +3250,14 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
})}
{/* 2D-Zeichen-Linien mit drawingId werden gemergt (drawingRuns) als EIN Zug
gezeichnet → gehrte Ecken statt Butt-Cap-Stufe; im Memo übersprungen. */}
{/* Linienenden und -ecken des Projekts ([146], `Plan.lineEnds`) für alle Plan-Striche. */}
<g {...planLineEndsProps(plan.lineEnds)}>
{primitiveEls}
{/* Zusammenhängende 2D-Zeichen-Linienzüge als EIN <polyline>/<polygon>:
CAD-typische Gehrung an den Ecken (stroke-linejoin), keine Stufe bei
dicken Linien. Nach der Haupt-Ebene gezeichnet (2D liegt ohnehin oben). */}
{drawingRunEls}
</g>
{/* Ist eine GRUPPE gewählt, ersetzt die Bounding-Box unten die einzelnen
Mitglieds-Hervorhebungen (s. `groupBBox`) — dieser ganze Block bleibt
dann aus. */}
+1
View File
@@ -256,6 +256,7 @@ export function useNativePlanRenderer(
const invoke = invokeRef.current;
if (!cache || !gl || !invoke || !plan) return;
try {
cache.setLineEnds(plan.lineEnds);
cache.update(
plan.primitives,
pxPerMeter,