Merge claude/practical-noether-1hb2s1 in [216]

This commit is contained in:
Claude committed 2026-11-12 22:44:33 +00:00
commit b285dccdaf
231 files changed
+11368 -1152

No files matched your search

@@ -1,12 +1,12 @@
viewBox -4.2 0 37.045 18.478
bytes 207135
viewBox -25.5 0 81 18.478
bytes 209902
circle 4
g 1
line 495
line 503
path 3
polygon 998
polyline 179
polygon 1031
polyline 184
rect 1
svg 1
text 4
hash 7dd0774a2af69fe3
hash d3224b3989291365
@@ -1,13 +1,13 @@
viewBox -41.5 0 95 63.6
bytes 66764
bytes 68382
circle 16
g 1
line 137
line 141
path 36
polygon 93
polyline 92
polygon 101
polyline 93
rect 1
svg 1
text 115
tspan 24
hash 0337f7fc77078b7c
text 116
tspan 25
hash daf3fc044edd6954
@@ -1,13 +1,13 @@
viewBox -41.5 0 95 63.6
bytes 107266
bytes 108906
circle 16
g 1
line 361
line 365
path 67
polygon 216
polyline 101
polygon 224
polyline 102
rect 1
svg 1
text 115
tspan 24
hash e0c7011ad7ac9ebe
text 116
tspan 25
hash c0d58c87e618c222
@@ -1,5 +1,5 @@
viewBox -13.448 0 38.615 33.813
bytes 45053
bytes 45051
circle 14
g 1
line 114
@@ -10,4 +10,4 @@ rect 1
svg 1
text 87
tspan 19
hash f30c0333f3f14e8b
hash 1c84c9ae17eb227f
@@ -1,5 +1,5 @@
viewBox -12.974 0 37.808 33.406
bytes 353509
bytes 353505
circle 14
g 1
line 3254
@@ -10,4 +10,4 @@ rect 1
svg 1
text 86
tspan 18
hash 5af2107785b177d7
hash b617e6093f9e52f1
@@ -1,5 +1,5 @@
viewBox -13.693 0 38.86 33.813
bytes 41777
bytes 41775
circle 16
g 1
line 97
@@ -10,4 +10,4 @@ rect 1
svg 1
text 71
tspan 15
hash 235c8589f957f6b0
hash f4ea57ac9b383644
@@ -1,5 +1,5 @@
viewBox -13.693 0 38.527 33.406
bytes 48000
bytes 47998
circle 16
g 1
line 94
@@ -10,4 +10,4 @@ rect 1
svg 1
text 71
tspan 15
hash ddeb757dc7ffc097
hash db285960e8796a2f
+5 -3
View File
@@ -1,5 +1,5 @@
meshes [1211]
meshes[].color [3] x1211
meshes [1212]
meshes[].color [3] x1212
meshes[].indices [108] x6
meshes[].indices [1152] x3
meshes[].indices [1224]
@@ -13,6 +13,7 @@ meshes[].indices [154014]
meshes[].indices [1584]
meshes[].indices [1716]
meshes[].indices [180]
meshes[].indices [204]
meshes[].indices [2118]
meshes[].indices [2124] x2
meshes[].indices [2130]
@@ -42,6 +43,7 @@ meshes[].positions [1089]
meshes[].positions [108] x30
meshes[].positions [1188]
meshes[].positions [120]
meshes[].positions [132]
meshes[].positions [1368] x2
meshes[].positions [162]
meshes[].positions [16428]
@@ -99,4 +101,4 @@ walls[].start [2] x1192
walls[].startCut [4] x832
walls[].topDrop [2] x89
walls[].topPlane [3] x245
hash 11d1505c4650cdb4
hash 534b551bfdb4405a
@@ -0,0 +1,12 @@
viewBox -41.5 0 95 63.6
bytes 5218
g 1
line 7
path 1
polygon 18
polyline 3
rect 1
svg 1
text 9
tspan 1
hash 3d1684b3659e8901
@@ -0,0 +1,12 @@
viewBox -41.5 0 95 63.6
bytes 5218
g 1
line 7
path 1
polygon 18
polyline 3
rect 1
svg 1
text 9
tspan 1
hash 3d1684b3659e8901
+13 -1
View File
@@ -5,7 +5,7 @@
// und den Diff der Dateien im Commit ansehen. Zahlen sind gerundet (Plan 1e-3 m, 3D 1e-4 m).
import { describe, expect, it } from "vitest";
import { createHash } from "node:crypto";
import { computeSection, generateElevationPlan, generatePlan, generateSectionPlan, planToSvgString, projectToModel3d } from "../core";
import { computeSection, generateElevationPlan, generatePlan, generateSectionPlan, planToSvgString, projectToModel3d, projectWithTemplate } from "../core";
import { sampleProject } from "../model/sampleProject";
import { buildComplexSampleProject } from "../model/sampleProjectComplex";
import type { Project } from "../model/types";
@@ -77,6 +77,18 @@ for (const [name, make] of projects) {
}
}
// [207] Situationsplan 1:500 (Ansichtsvorlage „Situation WBW") und Schwarzplan.
for (const [id, file] of [["std-vt-situation-wbw", "situation"], ["std-vt-schwarzplan", "schwarzplan"]]) {
it(`${file} 1:500`, async () => {
const tpl = p.viewTemplates?.find((t) => t.id === id);
if (!tpl) return;
const tp = projectWithTemplate(p, "eg", tpl);
const show = new Set([...codes].filter((c) => tpl.layerVisibility?.[c] !== false));
const svg = planToSvgString(generatePlan(tp, "eg", show, undefined, tpl.detail ?? "grob", false, true, true, 500), { scaleDenominator: 500 });
await expect(svgDigest(svg)).toMatchFileSnapshot(`__golden__/${name}-${file}-500.txt`);
});
}
it("Schnitt", async () => {
const sec = p.drawingLevels.find((l) => l.kind === "section");
if (!sec) return;
+2 -1
View File
@@ -8,7 +8,7 @@ import { flattenCategories } from "../model/types";
/** Art eines auswählbaren Objekts an einer Klickstelle (Reihenfolge = Standard-Priorität). */
export type PickKind =
| "section" | "opening" | "wall" | "column" | "drawing" | "solid"
| "tree" | "ceiling" | "stair" | "room" | "roof" | "site" | "context";
| "tree" | "camera" | "ceiling" | "stair" | "room" | "roof" | "site" | "context";
type WithCategory = { id: string; categoryCode?: string };
@@ -26,6 +26,7 @@ function collection(project: Project, kind: PickKind): readonly WithCategory[] {
case "context": return p.context ?? [];
case "solid": return p.extrudedSolids ?? [];
case "tree": return p.trees ?? [];
case "camera": return p.cameras ?? [];
case "section":
case "site": return [];
}
+4 -2
View File
@@ -29,7 +29,8 @@ import type { HatchRender, Primitive } from "./generatePlan";
import type { Vec2 } from "../model/types";
export const PLAN_BUF_MAGIC = 0x504c4232;
export const PLAN_BUF_VERSION = 2;
/** Gleich wie Kern `plan::buf::VERSION`; bei Formatänderung beide erhöhen (3: Kopf 20 Wörter, [204]). */
export const PLAN_BUF_VERSION = 3;
/** Fehlerpuffer einer Kern-Abfrage ("PLBe"): `[ERR_MAGIC, nUnits]` + Meldung (UTF-16). */
export const PLAN_BUF_ERR_MAGIC = 0x504c4265;
const HEAD = 20;
@@ -520,7 +521,8 @@ export function decodePlanBuf(input: Uint8Array): DecodedPlanBuf {
}
if (bytes.byteLength < HEAD * 8) bad("zu kurz");
const hd = new Float64Array(bytes.buffer, bytes.byteOffset, HEAD);
if (hd[0] !== PLAN_BUF_MAGIC || hd[1] !== PLAN_BUF_VERSION) bad("fremde Version");
if (hd[0] !== PLAN_BUF_MAGIC || hd[1] !== PLAN_BUF_VERSION)
bad(`Kern-Version ${hd[1]} passt nicht zur Oberfläche (${PLAN_BUF_VERSION}) — WASM-Kern veraltet, \`npm run build:core\` ausführen`);
const [, , flags, nStrings, nHatches, nHatchWords, nGroups, nPrims, nRec, nPool, nUnits] = hd;
const hashes = (flags & 1) !== 0;
const strAt = HEAD;
+2 -1
View File
@@ -78,7 +78,8 @@ describe("[66] Präsentationsplan", () => {
st().undo();
expect((st().project.layouts ?? []).length).toBe(layoutsBefore);
expect(st().project.viewSnapshots?.some((s) => s.id.startsWith("vs-pres-"))).toBe(false);
});
// [207] 60 s: mit den Nachbargebäuden des Musterhauses rechnet das Blatt im Container knapp über die 30 s des Standards.
}, 60_000);
it("gewählte Geschosse, ohne Ansichten/Schnitt, Skizze an, A3: kleinerer Massstab", () => {
const floors = project.drawingLevels.filter((l) => l.kind === "floor" && !l.layoutId).slice(0, 2).map((l) => l.id);