[G4] Ansicht: Füllungen aus exakter Sichtbarkeit, Durchdringungslinien

- hlr_fill.rs (neu): sichtbare Teilpolygone je Fläche (Umriss minus näher liegende Teile der
  anderen Flächen, Halbebene der Tiefendifferenz, i_overlay), Raster-Vorauswahl, ganz gedeckte
  Flächen ohne Boolean; Strecken auf Polygone beschneiden.
- hlr.rs: Durchdringungslinien zugewandter Flächen verschiedener Körper (Face.solid), nur im
  Innern beider Flächen; danach gleiche Verdeckung wie Kanten.
- Ansicht: Füllungen = sichtbare Teile (keine Füllung mehr über verdeckten Kanten, Gauben/Kamin
  hinter der Dachmitte), Ansichtsschraffur auf die sichtbaren Teile ihrer Fläche (Dachraster lief
  über die Gauben), Schatten nur auf sichtbaren Wandteilen; Körper je Bauteil für die
  Durchdringungslinien.
- Tests: kamin_hinter_dachmitte_fuellung_wie_kanten, koerper_durch_wand_zeigt_durchdringungslinie,
  hlr/hlr_fill-Einheitstests; Goldens (weniger Polygone: verdeckte Flächen entfallen).
- TODO, ARCHITEKTUR, core/src/README nachgeführt.
This commit is contained in:
Claude committed 2026-11-11 19:04:15 +00:00
1 parent a15aea16aa
commit 33a294a020
14 files changed
+808 -102

No files matched your search

+10 -36
View File
@@ -2,49 +2,23 @@
<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"/>
<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="5.395,6.46781 6.1725,6.46781 6.1725,6.35947 5.89417,6.08114 6.0675,6.08114 5.68083,5.69447 5.85417,5.69447 5.4675,5.30781 5.64083,5.30781 5.395,5.06197" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="5.405,6.18564 5.405,6.46781 5.28083,6.46781 4.99867,6.18564" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="4.2,4.86697 5.2,4.86697 5.21867,4.88564 4.21867,4.88564" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="4.2,4.86697 5.2,4.86697 5.2,4.48564 4.2,4.48564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.04031 5.2,5.04031 5.2,4.65897 4.2,4.65897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.21364 5.2,5.21364 5.2,4.83231 4.2,4.83231" fill="#9aa0a6" 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="4.2,5.38697 5.2,5.38697 5.2,5.00564 4.2,5.00564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.56031 5.2,5.56031 5.2,5.17897 4.2,5.17897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.73364 5.2,5.73364 5.2,5.35231 4.2,5.35231" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.90697 5.2,5.90697 5.2,5.52564 4.2,5.52564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.08031 5.2,6.08031 5.2,5.69897 4.2,5.69897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.25364 5.2,6.25364 5.2,5.87231 4.2,5.87231" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.42697 5.2,6.42697 5.2,6.04564 4.2,6.04564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.60031 5.2,6.60031 5.2,6.21897 4.2,6.21897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.77364 5.2,6.77364 5.2,6.39231 4.2,6.39231" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.94697 5.2,6.94697 5.2,6.56564 4.2,6.56564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="1.8,4.98564 1.8,7.08564 2.7,7.08564 2.7,4.98564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="4.2,4.98564 4.2,5.00564 5,5.00564 5,4.98564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.00564 4.2,5.17897 5,5.17897 5,5.00564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.17897 4.2,5.35231 5,5.35231 5,5.17897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.35231 4.2,5.52564 5,5.52564 5,5.35231" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.52564 4.2,5.69897 5,5.69897 5,5.52564" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.69897 4.2,5.87231 5,5.87231 5,5.69897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,5.87231 4.2,6.04564 5,6.04564 5,5.87231" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,6.04564 4.2,6.18564 5,6.18564 5,6.04564" fill="#9aa0a6" 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="4.2,7.08564 5.2,7.08564 5.2,6.73897 4.2,6.73897" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="4.2,7.08564 5.2,7.08564 5.2,6.91231 4.2,6.91231" fill="#9aa0a6" stroke="none" stroke-width="0"/>
<polygon points="1.0075,4.54564 5.9925,4.54564 5.9925,4.48564 1.0075,4.48564" fill="#c9c2b3" stroke="none" stroke-width="0"/>
<polygon points="1.0075,4.58564 5.9925,4.58564 5.9925,4.54564 1.0075,4.54564" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="1.0075,4.78564 5.9925,4.78564 5.9925,4.58564 1.0075,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="0.8275,4.48564 6.1725,4.48564 6.1725,2.05885 0.8275,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="0.8275,2.28635 1,2.45885 6.1725,2.45885 6.1725,2.05885 0.8275,2.05885" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="5.8275,2.45885 6.1725,2.45885 6.1725,1.88564 5.8275,1.88564" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="0.8275,2.28635 1,2.45885 1.1725,2.45885 1.1725,1.88564 0.8275,1.88564" 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="0.8275,4.48564 6.1725,4.48564 6.1725,2.05885 0.8275,2.05885" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="0.8275,2.05885 0.8275,4.48564 6.1725,4.48564 6.1725,2.05885" fill="#ffffff" stroke="none" stroke-width="0"/>
<polygon points="0.8275,2.28635 6.1725,2.28635 6.1725,2.05885 0.8275,2.05885" fill="#8f959e" stroke="none" stroke-width="0"/>
<polygon points="1.78,7.08564 2.72,7.08564 2.72,4.96564 1.78,4.96564" fill="#dcdcdc" stroke="#2b3039" stroke-width="0.013"/>
<polygon points="1.8,7.08564 2.7,7.08564 2.7,4.98564 1.8,4.98564" fill="none" stroke="#2b3039" stroke-width="0.013"/>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

@@ -1,12 +1,12 @@
viewBox -4.2 0 37.045 17.378
bytes 234402
bytes 175524
circle 4
g 1
line 553
line 514
path 2
polygon 1341
polyline 50
polygon 765
polyline 155
rect 1
svg 1
text 4
hash c283cb05e9570e10
hash ecd6c1d2799ca660
@@ -1,9 +1,9 @@
viewBox 0.1 0 6.8 7.586
bytes 7991
bytes 5005
g 1
line 7
polygon 58
polygon 32
polyline 4
rect 1
svg 1
hash 4ab158ddf2aaa6ce
hash 14856a9e9c0c8513
+5
View File
@@ -13,6 +13,8 @@ import { generateElevationPlan } from "./toElevation";
describe("toElevation — Painter-Reihenfolge", () => {
it("im Plan: nähere Wand-Fläche hat einen höheren Primitiv-Index", () => {
const project = elevationProject({ overhang: false });
// [G4] Die fernere Wand ragt rechts 2 m heraus; nur dieser Teil ist sichtbar (exakte Sichtbarkeit).
project.walls = project.walls.map((w) => (w.id === "FAR" ? { ...w, end: { x: 6, y: w.end.y } } : w));
const plan = generateElevationPlan(project, project.drawingLevels[1])!;
expect(plan).not.toBeNull();
const idxNear = plan.primitives.findIndex(
@@ -24,6 +26,9 @@ describe("toElevation — Painter-Reihenfolge", () => {
expect(idxNear).toBeGreaterThanOrEqual(0);
expect(idxFar).toBeGreaterThanOrEqual(0);
expect(idxNear).toBeGreaterThan(idxFar); // fern zuerst, nah zuletzt
const far = plan.primitives.filter((p) => p.kind === "polygon" && p.wallId === "FAR");
const xs = far.flatMap((p) => (p.kind === "polygon" ? p.pts.map((q) => q.x) : []));
expect(Math.max(...xs) - Math.min(...xs)).toBeLessThan(2.3); // ohne den verdeckten Teil (6 m)
});
});