[171] Plan-Review Runde 2: Schatten nur im Ansichtsbereich, Flächenzeile nach Rundungsschritt, Rundfenster in Schnitt und Ansicht, Wand unter Rohdecke, OG-Ecken in der Ansicht, Höhenkoten neben dem Gebauten

Tests je Fix (sun.rs, domains.rs, section/tests.rs, elevation/tests.rs, viewportPlan.test.ts),
Goldens Plan/CLI neu (OG/DG Schatten, Schnitt A, Ansicht Süd). TODO.md [171] mit offenen Befunden.
This commit is contained in:
Claude committed 2026-11-10 10:57:33 +00:00
1 parent 977cbee260
commit 0fbbcf1f6f
24 files changed
+334 -59

No files matched your search

+4 -6
View File
@@ -32,10 +32,10 @@
<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="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="1,2.45885 6,2.45885 6,2.05885 1,2.05885" fill="#8f959e" 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"/>
@@ -44,8 +44,8 @@
<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="1,2.28635 6,2.28635 6,2.05885 1,2.05885" fill="#8f959e" 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.28635 6.1725,2.28635 6.1725,2.05885 0.8275,2.05885" 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"/>
@@ -64,8 +64,6 @@
<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"/>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

+2 -5
View File
@@ -18,18 +18,15 @@
<polygon points="1.1575,4.78564 1.1725,4.78564 1.1725,7.08564 1.1575,7.08564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="3.325,4.78564 3.34,4.78564 3.34,7.08564 3.325,7.08564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="3.34,4.78564 3.46,4.78564 3.46,7.08564 3.34,7.08564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="3.34,4.48564 3.46,4.48564 3.46,4.58564 3.34,4.58564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="3.46,4.78564 3.475,4.78564 3.475,7.08564 3.46,7.08564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="5.8275,1.88564 5.8425,1.88564 5.8425,4.48564 5.8275,4.48564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="5.9925,1.88564 6.1525,1.88564 6.1525,4.48564 5.9925,4.48564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="0.8475,1.88564 1.0075,1.88564 1.0075,4.48564 0.8475,4.48564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1.1575,1.88564 1.1725,1.88564 1.1725,4.48564 1.1575,4.48564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1,4.48564 1.0075,4.48564 1.0075,4.54564 1,4.54564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1.1575,4.48564 3.34,4.48564 3.34,4.54564 1.1575,4.54564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="3.46,4.48564 5.8425,4.48564 5.8425,4.54564 3.46,4.54564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1.1575,4.48564 5.8425,4.48564 5.8425,4.54564 1.1575,4.54564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="5.9925,4.48564 6,4.48564 6,4.54564 5.9925,4.54564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1.1575,4.54564 3.34,4.54564 3.34,4.58564 1.1575,4.58564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="3.46,4.54564 5.8425,4.54564 5.8425,4.58564 3.46,4.58564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1.1575,4.54564 5.8425,4.54564 5.8425,4.58564 1.1575,4.58564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="1,4.58564 6,4.58564 6,4.78564 1,4.78564" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="0.6,0.5 6.4,0.5 6.4,0.73094 0.6,0.73094" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>
<polygon points="4.2,5.69897 4.2,5.99364 5.2,5.99364 5.2,5.69897" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.005"/>

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

@@ -1,11 +1,11 @@
viewBox -4.2 0 37.045 17.378
bytes 193364
bytes 195265
circle 4
g 1
line 556
polygon 1026
polyline 44
line 447
polygon 1025
polyline 154
rect 1
svg 1
text 4
hash 32b9045a8708e6ad
hash d0400a1b0daa1e56
@@ -1,12 +1,12 @@
viewBox -12.8 0 37.6 33.6
bytes 23004
bytes 22835
circle 14
g 1
line 91
polygon 22
polygon 21
polyline 22
rect 1
svg 1
text 34
tspan 9
hash f0bc37741422757a
hash b98be8a32c279efc
@@ -1,12 +1,12 @@
viewBox -12.65 0 37.3 33.3
bytes 324678
bytes 324510
circle 14
g 1
line 3206
polygon 68
polygon 67
polyline 80
rect 1
svg 1
text 36
tspan 12
hash a1ffcd11fb447e54
hash 9f01cf4af3bc2c65
@@ -1,13 +1,13 @@
viewBox -12.8 0 37.6 33.6
bytes 47861
bytes 47692
circle 14
g 1
line 142
path 8
polygon 45
polygon 44
polyline 106
rect 1
svg 1
text 86
tspan 19
hash b6f8babd12e53947
hash 7557aa5041a40ed1
@@ -1,13 +1,13 @@
viewBox -12.65 0 37.3 33.3
bytes 359467
bytes 359299
circle 14
g 1
line 3238
path 36
polygon 145
polygon 144
polyline 175
rect 1
svg 1
text 89
tspan 24
hash 169dd2e0a69081af
hash 101818006ae26a68
@@ -1,11 +1,11 @@
viewBox 4.457 0 21.343 17.378
bytes 34204
bytes 33634
circle 4
g 1
line 42
polygon 182
line 44
polygon 176
polyline 17
rect 1
svg 1
text 3
hash bd6c402b78964222
hash 0ac408ec72d00b90
@@ -1,9 +1,9 @@
viewBox 0.1 0 6.8 7.586
bytes 7959
bytes 7833
g 1
line 7
polygon 57
polyline 6
polyline 4
rect 1
svg 1
hash 2b77ecb148e762fe
hash 1a97bd708a69f1c8
@@ -1,9 +1,9 @@
viewBox 0.1 0 6.8 7.586
bytes 6668
bytes 6317
g 1
line 21
polygon 34
polygon 31
polyline 4
rect 1
svg 1
hash 405920d4c0d4ea97
hash ab081d72649b8b18
+20 -1
View File
@@ -22,7 +22,26 @@ export function levelMarksEnabled(level: DrawingLevel): boolean {
export function levelMarkerPrimitives(
project: Project,
bounds: { minX: number; minY: number; maxX: number; maxY: number },
primitives?: readonly Primitive[],
): Primitive[] {
if (!(bounds.maxX > bounds.minX) || !(bounds.maxY > bounds.minY)) return [];
return decodePlanBuf(documentFor(project).queryBin("levelMarkers", [bounds.minX, bounds.minY, bounds.maxX, bounds.maxY])).prims;
const minX = primitives ? Math.max(bounds.minX, builtMinX(project, primitives)) : bounds.minX;
return decodePlanBuf(documentFor(project).queryBin("levelMarkers", [minX < bounds.maxX ? minX : bounds.minX, bounds.minY, bounds.maxX, bounds.maxY])).prims;
}
// [171] Gelände (Schnittfläche, Profil- und Grundlinie) zählt nicht zur Lage der Koten: sie stehen neben dem
// Gebauten (Haus, Carport, Körper), nicht links vom ganzen Geländeschnitt (Musterhaus komplex: ~15 m weiter).
const TERRAIN_CLS = new Set(["section-terrain", "elevation-terrain", "section-ground", "elevation-ground"]);
function builtMinX(project: Project, primitives: readonly Primitive[]): number {
const site = new Set((project.context ?? []).filter((c) => c.type === "terrainMesh" || c.type === "excavation" || c.type === "contourSet").map((c) => c.id));
let minX = Infinity;
for (const q of primitives) {
if (q.kind === "line") {
if (!TERRAIN_CLS.has(q.cls)) minX = Math.min(minX, q.a.x, q.b.x);
} else if (q.kind === "polygon") {
if (!(q.contextObjectId && site.has(q.contextObjectId))) for (const v of q.pts) minX = Math.min(minX, v.x);
}
}
return minX;
}
+15
View File
@@ -16,6 +16,21 @@ describe("viewportLevelPlan", () => {
expect(plan.bounds.maxY - plan.bounds.minY).toBeGreaterThan(8);
});
// [171] Höhenkoten neben dem Gebäude, nicht links vom ganzen Geländeschnitt (Musterhaus komplex: ~15 m weiter).
it("Schnitt: Höhenkoten nahe beim Gebäude, nicht links vom Gelände", async () => {
const plan = await viewportLevelPlan(p, "schnitt-a", codes, "mittel", 100);
const xsOf = (q: (typeof plan.primitives)[number]): number[] =>
q.kind === "polygon" ? q.pts.map((v) => v.x) : q.kind === "line" ? [q.a.x, q.b.x] : [];
const terrainX = Math.min(...plan.primitives.filter((q) => q.kind === "line" && q.cls === "section-terrain").flatMap(xsOf));
const wallX = Math.min(...plan.primitives.filter((q) => q.kind === "polygon" && q.wallId).flatMap(xsOf));
const leaders = plan.primitives.filter((q) => q.kind === "line" && q.cls === "section-level-leader");
expect(leaders.length).toBeGreaterThan(2);
const markX = Math.min(...leaders.flatMap(xsOf));
expect(terrainX).toBeLessThan(wallX - 8);
expect(markX).toBeGreaterThan(terrainX + 2);
expect(markX).toBeLessThan(wallX);
});
it("Ansicht: Fassade", async () => {
const plan = await viewportLevelPlan(p, "ansicht-sued", codes, "mittel", 100);
expect(plan.primitives.length).toBeGreaterThan(100);
+1 -1
View File
@@ -66,7 +66,7 @@ export async function viewportLevelPlan(
}
if (!raw || raw.primitives.length === 0) return EMPTY;
const own = generatePlan(project, level.id, visibleCodes, undefined, detail, false, mono, false, scaleDenominator, forPrint, false, overrideRuleIds);
const marks = levelMarksEnabled(level) ? levelMarkerPrimitives(project, raw.bounds) : [];
const marks = levelMarksEnabled(level) ? levelMarkerPrimitives(project, raw.bounds, raw.primitives) : [];
const b = { ...raw.bounds };
const grow = (x: number, y: number) => {
b.minX = Math.min(b.minX, x);
+1 -1
View File
@@ -1138,7 +1138,7 @@ function SectionPlanView({
// Automatische Höhenkoten links neben der Zeichnung (abschaltbar je Ebene).
const marks = useMemo(
() =>
rawPlan && levelMarksEnabled(level) ? levelMarkerPrimitives(project, rawPlan.bounds) : [],
rawPlan && levelMarksEnabled(level) ? levelMarkerPrimitives(project, rawPlan.bounds, rawPlan.primitives) : [],
[rawPlan, level, project],
);
const withOverlay = useMemo(() => {