[140] Tests und Goldens: Tusche-Standard, Türbogen in grob, Fenster zwei Striche, Schnittschichten, Achsblasen, Raumstempel
This commit is contained in:
16 files changed
+88
-68
No files matched your search
@@ -2,24 +2,14 @@
|
||||
<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="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.8275,4.78564 5.8275,7.08564 5.9925,7.08564 5.9925,4.78564" 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="5.9925,4.78564 5.9925,7.08564 6.1725,7.08564 6.1725,1.88564 6.1525,1.88564 6.1525,4.48564 6,4.48564 6,4.54564 5.9925,4.54564 5.9925,4.58564 6,4.58564 6,4.78564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
|
||||
<polygon points="0.8275,1.88564 0.8275,7.08564 1.0075,7.08564 1.0075,4.78564 1,4.78564 1,4.58564 1.0075,4.58564 1.0075,4.54564 1,4.54564 1,4.48564 0.8475,4.48564 0.8475,1.88564" fill="#f0f0f0" stroke="#1f242c" stroke-width="0.013"/>
|
||||
<polygon points="1.0075,4.78564 1.0075,7.08564 1.1725,7.08564 1.1725,4.78564" 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.325,4.78564 3.325,7.08564 3.475,7.08564 3.475,4.78564" 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"/>
|
||||
@@ -34,7 +24,18 @@
|
||||
<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"/>
|
||||
<line x1="1.0075" y1="7.08564" x2="1.0075" y2="7.08564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<polyline points="1.0075,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 5.9925,7.08564" fill="none" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="5.9925" y1="7.08564" x2="5.9925" y2="7.08564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<polyline points="5.9925,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 0.8275,1.88564 0.8275,7.08564 1.0075,7.08564" fill="none" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="1" y1="4.54564" x2="1" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="1" y1="4.54564" x2="1.0075" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="1.0075" y1="4.54564" x2="1.0075" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="1.0075" y1="4.54564" x2="1" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="5.9925" y1="4.54564" x2="5.9925" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="5.9925" y1="4.54564" x2="6" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="6" y1="4.54564" x2="6" y2="4.54564" stroke="#1f242c" stroke-width="0.025"/>
|
||||
<line x1="6" y1="4.54564" x2="5.9925" y2="4.54564" 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"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -1,5 +1,5 @@
|
||||
viewBox -4.2 0 37.045 17.778
|
||||
bytes 265283
|
||||
viewBox -4.2 0 37.045 17.678
|
||||
bytes 265288
|
||||
circle 4
|
||||
g 1
|
||||
line 615
|
||||
@@ -8,4 +8,4 @@ polyline 68
|
||||
rect 1
|
||||
svg 1
|
||||
text 4
|
||||
hash 18d42b37d5c973f7
|
||||
hash bc4a285700382759
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4 0 23 18
|
||||
bytes 317361
|
||||
bytes 317431
|
||||
circle 14
|
||||
g 1
|
||||
line 3227
|
||||
@@ -8,4 +8,4 @@ polyline 73
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
hash b639c8605f1c4c9d
|
||||
hash 008b41292083538c
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4 0 23 18
|
||||
bytes 323049
|
||||
bytes 323091
|
||||
circle 14
|
||||
g 1
|
||||
line 3240
|
||||
@@ -8,4 +8,4 @@ polyline 84
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
hash 67469479cfe01b3d
|
||||
hash 92ee43948feacb35
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 113400
|
||||
bytes 112696
|
||||
circle 16
|
||||
g 1
|
||||
line 338
|
||||
@@ -8,5 +8,5 @@ polygon 266
|
||||
polyline 126
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash 06d354bb6d5e9b73
|
||||
text 115
|
||||
hash 9f8c7f5a07987cc3
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 118229
|
||||
bytes 117868
|
||||
circle 16
|
||||
g 1
|
||||
line 349
|
||||
@@ -8,5 +8,5 @@ polygon 266
|
||||
polyline 151
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash d03241231291e547
|
||||
text 118
|
||||
hash 8dff669ded19d82b
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4.055 0 25.109 23.11
|
||||
bytes 366491
|
||||
bytes 366321
|
||||
circle 14
|
||||
g 1
|
||||
line 3333
|
||||
@@ -8,5 +8,5 @@ polygon 227
|
||||
polyline 169
|
||||
rect 1
|
||||
svg 1
|
||||
text 91
|
||||
hash 48bd54ad5e8b1c20
|
||||
text 89
|
||||
hash 3e20e7dadb42197b
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4.055 0 25.109 23.11
|
||||
bytes 374934
|
||||
bytes 374960
|
||||
circle 14
|
||||
g 1
|
||||
line 3350
|
||||
@@ -9,4 +9,4 @@ polyline 195
|
||||
rect 1
|
||||
svg 1
|
||||
text 91
|
||||
hash 7bd001e733642672
|
||||
hash 6e48062b617631c7
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -10.004 0 31.058 26.958
|
||||
bytes 61153
|
||||
bytes 61113
|
||||
circle 14
|
||||
g 1
|
||||
line 171
|
||||
@@ -8,5 +8,5 @@ polygon 105
|
||||
polyline 77
|
||||
rect 1
|
||||
svg 1
|
||||
text 75
|
||||
hash d31704c307ac309d
|
||||
text 74
|
||||
hash c64f09735f82df1e
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -10.004 0 31.058 26.958
|
||||
bytes 62007
|
||||
bytes 62033
|
||||
circle 14
|
||||
g 1
|
||||
line 173
|
||||
@@ -9,4 +9,4 @@ polyline 80
|
||||
rect 1
|
||||
svg 1
|
||||
text 75
|
||||
hash eba7b491c822b768
|
||||
hash 47cb320915d63e7a
|
||||
@@ -1,11 +1,11 @@
|
||||
viewBox 4.457 0 21.343 17.778
|
||||
bytes 41694
|
||||
viewBox 4.457 0 21.343 17.678
|
||||
bytes 36282
|
||||
circle 3
|
||||
g 1
|
||||
line 96
|
||||
polygon 186
|
||||
polyline 13
|
||||
line 105
|
||||
polygon 136
|
||||
polyline 14
|
||||
rect 1
|
||||
svg 1
|
||||
text 3
|
||||
hash 471491b0c51f190a
|
||||
hash ff9a1be90fae7d83
|
||||
@@ -1,9 +1,9 @@
|
||||
viewBox 0.1 0 6.8 7.586
|
||||
bytes 6668
|
||||
bytes 6662
|
||||
g 1
|
||||
line 21
|
||||
polygon 34
|
||||
polyline 4
|
||||
line 31
|
||||
polygon 23
|
||||
polyline 6
|
||||
rect 1
|
||||
svg 1
|
||||
hash 8ce8b71fc217069c
|
||||
hash 68fbe08143832562
|
||||
@@ -224,7 +224,7 @@ describe("generatePlan — Luftbild (ContextImage)", () => {
|
||||
expect(plan.backgroundImages![0].filters).toBeUndefined();
|
||||
});
|
||||
|
||||
it("im Mono-Modus wird das Luftbild ausgeblendet (reiner S/W-Plan)", () => {
|
||||
it("[140] auch im Schwarz-Weiss-Modus (Tusche-Standard) bleibt das Luftbild", () => {
|
||||
const p = projectWith([
|
||||
{
|
||||
id: "IMG1",
|
||||
@@ -236,7 +236,7 @@ describe("generatePlan — Luftbild (ContextImage)", () => {
|
||||
},
|
||||
]);
|
||||
const plan = generatePlan(p, "eg", visible, undefined, "mittel", false, true);
|
||||
expect(plan.backgroundImages).toHaveLength(0);
|
||||
expect(plan.backgroundImages).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -171,13 +171,23 @@ describe("generatePlan — Opening.detailLevel (Per-Element-Übersteuerung der A
|
||||
(pr) => pr.kind === "arc",
|
||||
).length;
|
||||
|
||||
/** Anschlagstriche der Tür (cls "door-frame", nur Detailgrad fein). */
|
||||
const doorRevealCount = (opening: Opening, viewDetail: "grob" | "mittel" | "fein") =>
|
||||
generatePlan(projectWithOpening(opening), "eg", visible, undefined, viewDetail).primitives.filter(
|
||||
(pr) => pr.kind === "line" && pr.cls === "door-frame",
|
||||
).length;
|
||||
|
||||
it("ohne detailLevel gilt weiterhin die Ansichts-Detailstufe (rückwärtskompatibel)", () => {
|
||||
expect(doorArcCount(baseDoor, "grob")).toBe(0); // grob: kein Schwenkbogen
|
||||
expect(doorArcCount(baseDoor, "mittel")).toBe(1); // mittel+: Schwenkbogen
|
||||
// [140] grob (auch automatisch ab 1:200) mit Schwenkbogen, erst 1:500 ohne.
|
||||
expect(doorArcCount(baseDoor, "grob")).toBe(1);
|
||||
expect(doorArcCount(baseDoor, "mittel")).toBe(1);
|
||||
expect(generatePlan(projectWithOpening(baseDoor), "eg", visible, undefined, "grob", false, false, true, 500).primitives.filter((pr) => pr.kind === "arc").length).toBe(0);
|
||||
expect(doorRevealCount(baseDoor, "fein")).toBe(2);
|
||||
expect(doorRevealCount(baseDoor, "mittel")).toBe(0);
|
||||
});
|
||||
|
||||
it("detailLevel='grob' unterdrückt den Schwenkbogen, AUCH wenn die Ansicht 'fein' zeigt", () => {
|
||||
expect(doorArcCount({ ...baseDoor, detailLevel: "grob" }, "fein")).toBe(0);
|
||||
it("detailLevel='grob' zeichnet grob (ohne Anschlagstriche), AUCH wenn die Ansicht 'fein' zeigt", () => {
|
||||
expect(doorRevealCount({ ...baseDoor, detailLevel: "grob" }, "fein")).toBe(0);
|
||||
});
|
||||
|
||||
it("detailLevel='fein' zeigt den Schwenkbogen, AUCH wenn die Ansicht 'grob' zeigt", () => {
|
||||
@@ -199,6 +209,6 @@ describe("generatePlan — Opening.detailLevel (Per-Element-Übersteuerung der A
|
||||
const doorPlain: Opening = { ...baseDoor, id: "T2", position: 3.0 };
|
||||
const p: Project = { ...projectWithOpening(doorFein), walls: [wall], openings: [doorFein, doorPlain] };
|
||||
const plan = generatePlan(p, "eg", visible, undefined, "grob");
|
||||
expect(plan.primitives.filter((pr) => pr.kind === "arc").length).toBe(1);
|
||||
expect(plan.primitives.filter((pr) => pr.kind === "line" && pr.cls === "door-frame").length).toBe(2);
|
||||
});
|
||||
});
|
||||
@@ -80,9 +80,16 @@ describe("kompakte Linien-Unterlage", () => {
|
||||
expect(compact.primitives.some((q) => q.kind === "polygon" && (q as any).drawingId === "filled")).toBe(true);
|
||||
});
|
||||
|
||||
it("mono und Export (forPrint) bleiben beim normalen Pfad", () => {
|
||||
it("Export (forPrint) bleibt beim normalen Pfad; Schwarz-Weiss ([140] Standard) nutzt die Unterlage in Tinte", () => {
|
||||
const p = project(drawings);
|
||||
expect(generatePlan(p, "L1", visible, undefined, "mittel", false, true, true, 100, false, true).underlay).toBeUndefined();
|
||||
const mono = generatePlan(p, "L1", visible, undefined, "mittel", false, true, true, 100, false, true);
|
||||
expect(mono.underlay).toBeDefined();
|
||||
const lines = mono.underlay!.flatMap((g) => g.build(g.drawings));
|
||||
expect(lines.length).toBeGreaterThan(0);
|
||||
// Kategorie „Rot" (61) wird Tinte.
|
||||
expect(JSON.stringify(lines)).not.toContain("#ff0000");
|
||||
const color = generatePlan(p, "L1", visible, undefined, "mittel", false, false, true, 100, false, true);
|
||||
expect(JSON.stringify(color.underlay!.flatMap((g) => g.build(g.drawings)))).toContain("#ff0000");
|
||||
expect(generatePlan(p, "L1", visible, undefined, "mittel", false, false, true, 100, true, true).underlay).toBeUndefined();
|
||||
});
|
||||
|
||||
|
||||
@@ -201,17 +201,18 @@ describe("generatePlan — Verglasung glazingPanes (Item 2)", () => {
|
||||
expect(glassLineCount(p1, "fein")).toBe(0);
|
||||
});
|
||||
|
||||
it("ohne typeId bleibt die alte Detailgrad-Regel (grob/mittel=1, fein=2) unverändert — Regression", () => {
|
||||
it("ohne typeId: mittel=1, fein=2 Glaslinien; grob keine ([140]: zwei Striche in der Wandflucht)", () => {
|
||||
const p = project({ ...baseWindow });
|
||||
expect(glassLineCount(p, "grob")).toBe(1);
|
||||
expect(glassLineCount(p, "grob")).toBe(0);
|
||||
expect(glassLineCount(p, "mittel")).toBe(1);
|
||||
expect(glassLineCount(p, "fein")).toBe(2);
|
||||
});
|
||||
|
||||
it("glazingPanes wirkt bei 'grob' NICHT (bleibt bei 1 Glaslinie)", () => {
|
||||
it("glazingPanes wirkt bei 'grob' NICHT (keine Glaslinie, nur die zwei Striche)", () => {
|
||||
const wt: WindowType = { ...baseWindowType, glazingPanes: 3 };
|
||||
const p = project({ ...baseWindow, typeId: "wt1" }, [wt]);
|
||||
expect(glassLineCount(p, "grob")).toBe(1);
|
||||
expect(glassLineCount(p, "grob")).toBe(0);
|
||||
expect(linesOfClass(p, "window-frame", "grob").length).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -432,14 +433,15 @@ describe("generatePlan — Linien-Übersteuerung je Kategorie (Opening.frameLine
|
||||
}
|
||||
});
|
||||
|
||||
it("sashLine wirkt auch bei 'grob' (1:100) auf die einzige dort sichtbare Glaslinie", () => {
|
||||
it("frameLine wirkt bei 'grob' (1:100) auf die zwei Striche in der Wandflucht ([140])", () => {
|
||||
const p = project(
|
||||
{ ...baseWindow, typeId: "wt1", sashLine: { color: "#00ff00", weight: 0.3 } },
|
||||
{ ...baseWindow, typeId: "wt1", frameLine: { color: "#00ff00", weight: 0.3 } },
|
||||
[twoSashType],
|
||||
);
|
||||
const g = linesOfClass(p, "window-glass", "grob");
|
||||
expect(g.length).toBe(1);
|
||||
expect(g[0].kind === "line" && g[0].color).toBe("#00ff00");
|
||||
expect(linesOfClass(p, "window-glass", "grob").length).toBe(0);
|
||||
const g = linesOfClass(p, "window-frame", "grob");
|
||||
expect(g.length).toBe(2);
|
||||
expect(g.every((q) => q.kind === "line" && q.color === "#00ff00")).toBe(true);
|
||||
expect(g[0].kind === "line" && g[0].weightMm).toBeCloseTo(0.3, 6);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user