Merge branch 'worktree-agent-a9d809f483ec940e8' into claude/practical-noether-1hb2s1
# Conflicts: # src/plan/__golden__/komplex-grundriss-dg-100.txt # src/plan/__golden__/komplex-grundriss-dg-50.txt # src/plan/__golden__/komplex-grundriss-eg-100.txt # src/plan/__golden__/komplex-grundriss-eg-50.txt # src/plan/__golden__/komplex-grundriss-og-100.txt # src/plan/__golden__/komplex-grundriss-og-50.txt # src/plan/__golden__/komplex-grundriss-ug-100.txt # src/plan/__golden__/komplex-grundriss-ug-50.txt # src/plan/__golden__/muster-grundriss-eg-100.txt # src/plan/__golden__/muster-grundriss-eg-50.txt
This commit is contained in:
22 files changed
+230
-128
No files matched your search
@@ -4,9 +4,8 @@
|
||||
<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="none" 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="0.98291" y="2.31972" font-family="Inter, sans-serif" text-anchor="start"><tspan font-size="0.3528" fill="#111111">Wohnen</tspan></text>
|
||||
<text x="2.5" y="2.77833" font-family="Inter, sans-serif" text-anchor="middle"><tspan font-size="0.28222" fill="#111111">17.01 m²</tspan></text>
|
||||
<text x="2.5" y="3.23694" font-family="Inter, sans-serif" text-anchor="middle"><tspan font-size="0.28222" fill="#111111">HNF · Hauptnutzfläche</tspan></text>
|
||||
<text x="1.80481" y="2.54903" font-family="Inter, sans-serif" text-anchor="start"><tspan font-size="0.3528" fill="#111111">Wohnen</tspan></text>
|
||||
<text x="1.80481" y="3.00764" font-family="Inter, sans-serif" text-anchor="start"><tspan font-size="0.28222" fill="#111111">17.01 m²</tspan></text>
|
||||
<polygon points="-0.1725,4.845 0.8,4.845 0.8,4.5 0.1725,4.5" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.012"/>
|
||||
<polygon points="1.7,4.845 3,4.845 3,4.5 1.7,4.5" fill="#0f0f0f" stroke="#1a1a1a" stroke-width="0.025"/>
|
||||
<polygon points="4,4.845 5.1725,4.845 4.8275,4.5 4,4.5" fill="#0f0f0f" stroke="#0f0f0f" stroke-width="0.012"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -186,13 +186,14 @@ describe.skipIf(!hasEzdxf)("Fachplaner-Export gegen ezdxf", { timeout: 60_000 },
|
||||
expect(noFont.r.fonts.DOSSIER).toBe("Arial");
|
||||
});
|
||||
|
||||
it("Raumstempel: Name und Fläche als zentrierte TEXTe im Massstab (Punkt → Meter)", () => {
|
||||
it("Raumstempel: Name und Fläche als linksbündige TEXTe im Massstab (Punkt → Meter)", () => {
|
||||
const r = read();
|
||||
const stamps = r.entities.filter((e) => e.type === "TEXT" && e.halign === 1);
|
||||
// [177] Stempel sind linksbündig (halign 0), der Block liegt um den Stempelpunkt.
|
||||
const stamps = r.entities.filter((e) => e.type === "TEXT" && e.halign === 0 && /m²/.test(e.text as string));
|
||||
expect(stamps.length).toBeGreaterThan(0);
|
||||
const texts = stamps.map((e) => e.text as string);
|
||||
expect(texts.some((t) => /m²/.test(t))).toBe(true);
|
||||
for (const s of stamps) expect(s.height as number).toBeGreaterThan(0.2); // 10 pt bei 1:100 ≈ 0.35 m
|
||||
for (const s of stamps) expect(s.height as number).toBeGreaterThan(0.2); // 0.8 × 10 pt bei 1:100 ≈ 0.28 m
|
||||
});
|
||||
|
||||
it("Papierbereich: Layout mit Ansichtsfenster im Planmassstab", () => {
|
||||
|
||||
+2
-1
@@ -3130,7 +3130,8 @@ export const de = {
|
||||
"roomStamp.nameLine2": "Raumname Zeile 2",
|
||||
"roomStamp.showFloorArea": "Bodenfläche anzeigen",
|
||||
"roomStamp.floorAreaPrefix": "Präfix Bodenfläche",
|
||||
"roomStamp.showUsage": "Nutzung anzeigen",
|
||||
"roomStamp.showUsage": "SIA-Kategorie anzeigen",
|
||||
"roomStamp.showDivider": "Trennlinie unter dem Namen",
|
||||
"roomStamp.showFinish": "Bodenbelag anzeigen",
|
||||
"roomStamp.roundingStep": "Flächen-Rundung",
|
||||
"roomStamp.roundingStepDefault": "Standard (2 Nachkommastellen)",
|
||||
|
||||
+2
-1
@@ -3118,7 +3118,8 @@ export const en: Record<TranslationKey, string> = {
|
||||
"roomStamp.nameLine2": "Room name line 2",
|
||||
"roomStamp.showFloorArea": "Show floor area",
|
||||
"roomStamp.floorAreaPrefix": "Floor area prefix",
|
||||
"roomStamp.showUsage": "Show usage",
|
||||
"roomStamp.showUsage": "Show SIA category",
|
||||
"roomStamp.showDivider": "Divider line below the name",
|
||||
"roomStamp.showFinish": "Show floor finish",
|
||||
"roomStamp.roundingStep": "Area rounding",
|
||||
"roomStamp.roundingStepDefault": "Default (2 decimal places)",
|
||||
|
||||
@@ -26,7 +26,7 @@ describe("defaultRoomStamp", () => {
|
||||
const stamp = defaultRoomStamp(makeRoom());
|
||||
expect(stamp.name).toBe("Wohnen");
|
||||
expect(stamp.showFloorArea).toBe(true);
|
||||
expect(stamp.showUsage).toBe(true);
|
||||
expect(stamp.showUsage).toBe(false);
|
||||
expect(stamp.number).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,14 +6,15 @@ import type { Room, RoomStamp } from "./types";
|
||||
import type { Align } from "../text/richText";
|
||||
|
||||
/**
|
||||
* Standard-Stempel aus einem Raum ableiten: Name = Raum-Name, Bodenfläche und
|
||||
* Nutzung angezeigt. Nummer/Zeile 2 bleiben leer (frei ergänzbar).
|
||||
* Standard-Stempel aus einem Raum ableiten (Archicad-Stil, linksbündig): Name = Raum-Name, Bodenfläche
|
||||
* angezeigt, SIA-Kategorie nicht. Nummer/Zeile 2 bleiben leer (frei ergänzbar).
|
||||
*/
|
||||
export function defaultRoomStamp(room: Room): RoomStamp {
|
||||
return {
|
||||
name: room.name,
|
||||
showFloorArea: true,
|
||||
showUsage: true,
|
||||
// [177] Die SIA-416-Kategorie ist ein Attribut des Raums, nicht Teil des Stempels (nur auf Wunsch).
|
||||
showUsage: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@ function addRooms(p: Project): Project {
|
||||
const ops = withDocument(p, (d) => d.cmdOps({ cmd: "room", at: [at.x, at.y], ctx: { level, floorHeight: lvl?.floorHeight ?? null, cat: "60", wallType: "" }, stamp: `raum${nr}` }));
|
||||
const made = ops.find((o) => o.kind === "add" && o.collection === "rooms");
|
||||
if (!made || made.kind !== "add") throw new Error(`Musterhaus komplex: Raum ${nr} nicht erkannt`);
|
||||
const stamp: RoomStamp = { number: nr, name, showFloorArea: true, showUsage: true, roundingStep: 0.1 };
|
||||
const stamp: RoomStamp = { number: nr, name, showFloorArea: true, showUsage: false, roundingStep: 0.1 };
|
||||
const room = { ...(made.items[0] as unknown as Room), id: `raum-${nr}`, name, siaCategory: sia, stamp, stampDoc: textDoc([{ text: nr }, { text: name, bold: true }], "center") };
|
||||
p = applyOps(p, [{ kind: "add", collection: "rooms", items: [room as unknown as { id: string }] }]);
|
||||
}
|
||||
|
||||
@@ -3120,15 +3120,18 @@ export type RoomStamp = {
|
||||
showFloorArea: boolean;
|
||||
/** Präfix vor der Bodenfläche, z. B. "BF " (Default leer). */
|
||||
floorAreaPrefix?: string;
|
||||
/** Nutzung (HNF/… · Bezeichnung) anzeigen (Live-Zeile). */
|
||||
/**
|
||||
* SIA-416-Kategorie (HNF/… · Bezeichnung) im Stempel anzeigen (Live-Zeile). [177]: Vorgabe aus, die
|
||||
* Kategorie ist ein Attribut des Raums.
|
||||
*/
|
||||
showUsage: boolean;
|
||||
/** Ausrichtung der Namenszeile (Zeile 1). Fehlt sie, gilt „links". */
|
||||
nameAlign?: Align;
|
||||
/** Ausrichtung der zweiten Namenszeile. Fehlt sie, gilt „links". */
|
||||
line2Align?: Align;
|
||||
/** Ausrichtung der Bodenflächen-Zeile. Fehlt sie, gilt „zentriert" (Alt-Verhalten). */
|
||||
/** Ausrichtung der Bodenflächen-Zeile. Fehlt sie, gilt „links" ([177], Archicad-Stil). */
|
||||
floorAreaAlign?: Align;
|
||||
/** Ausrichtung der Nutzungs-Zeile. Fehlt sie, gilt „zentriert" (Alt-Verhalten). */
|
||||
/** Ausrichtung der Nutzungs-Zeile. Fehlt sie, gilt „links" ([177], Archicad-Stil). */
|
||||
usageAlign?: Align;
|
||||
/**
|
||||
* Personenzahl (Live-Zeile), z. B. für Nutzungsauflagen. Fehlt/undefined:
|
||||
@@ -3143,6 +3146,8 @@ export type RoomStamp = {
|
||||
roundingStep?: number;
|
||||
/** [158] Bodenbelag des Raums als Zeile anzeigen (Live-Zeile). Fehlt/false: keine Belagszeile. */
|
||||
showFinish?: boolean;
|
||||
/** [177] Trennlinie unter dem Namen anzeigen. Fehlt/false: keine Linie. */
|
||||
showDivider?: boolean;
|
||||
};
|
||||
|
||||
/** [158] Nutzung eines Raums (Raumbuch). Nassräume: Bad, WC, Dusche, Waschküche. */
|
||||
|
||||
@@ -165,7 +165,7 @@ export function RoomStampEditor({ value, onApply, onCancel }: RoomStampEditorPro
|
||||
</label>
|
||||
<AlignToggle
|
||||
value={draft.floorAreaAlign}
|
||||
fallback="center"
|
||||
fallback="left"
|
||||
disabled={!draft.showFloorArea}
|
||||
label={`${t("roomStamp.showFloorArea")} — ${t("text.group")}`}
|
||||
onChange={(floorAreaAlign) => patch({ floorAreaAlign })}
|
||||
@@ -213,13 +213,20 @@ export function RoomStampEditor({ value, onApply, onCancel }: RoomStampEditorPro
|
||||
</label>
|
||||
<AlignToggle
|
||||
value={draft.usageAlign}
|
||||
fallback="center"
|
||||
fallback="left"
|
||||
disabled={!draft.showUsage}
|
||||
label={`${t("roomStamp.showUsage")} — ${t("text.group")}`}
|
||||
onChange={(usageAlign) => patch({ usageAlign })}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="roomstamp-row">
|
||||
<label className="roomstamp-check">
|
||||
<input type="checkbox" checked={draft.showDivider === true} onChange={(e) => patch({ showDivider: e.target.checked ? true : undefined })} />
|
||||
<span>{t("roomStamp.showDivider")}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="roomstamp-row">
|
||||
<label className="roomstamp-check">
|
||||
<input type="checkbox" checked={draft.showFinish === true} onChange={(e) => patch({ showFinish: e.target.checked ? true : undefined })} />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
viewBox -12.5 0 37 33
|
||||
bytes 21870
|
||||
viewBox -12.8 0 37.6 33.6
|
||||
bytes 22857
|
||||
circle 14
|
||||
g 1
|
||||
line 75
|
||||
polygon 33
|
||||
polyline 14
|
||||
line 91
|
||||
polygon 21
|
||||
polyline 22
|
||||
rect 1
|
||||
svg 1
|
||||
text 34
|
||||
tspan 9
|
||||
hash 72d05a0a32a59797
|
||||
text 35
|
||||
tspan 8
|
||||
hash 0a9a2f9d64e7e04d
|
||||
@@ -1,12 +1,12 @@
|
||||
viewBox -12.5 0 37 33
|
||||
bytes 323595
|
||||
viewBox -12.65 0 37.3 33.3
|
||||
bytes 327626
|
||||
circle 14
|
||||
g 1
|
||||
line 3190
|
||||
polygon 79
|
||||
polyline 72
|
||||
line 3240
|
||||
polygon 67
|
||||
polyline 80
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
tspan 12
|
||||
hash aaa33dc2641ee0d0
|
||||
tspan 9
|
||||
hash a6f9780337dacdea
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 67239
|
||||
bytes 68576
|
||||
circle 16
|
||||
g 1
|
||||
line 155
|
||||
line 171
|
||||
path 35
|
||||
polygon 91
|
||||
polyline 107
|
||||
polygon 79
|
||||
polyline 115
|
||||
rect 1
|
||||
svg 1
|
||||
text 114
|
||||
text 119
|
||||
tspan 24
|
||||
hash 2d9464a0852d557b
|
||||
hash 513bd828c55d7821
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 111708
|
||||
bytes 110320
|
||||
circle 16
|
||||
g 1
|
||||
line 402
|
||||
line 399
|
||||
path 66
|
||||
polygon 212
|
||||
polyline 125
|
||||
polygon 200
|
||||
polyline 133
|
||||
rect 1
|
||||
svg 1
|
||||
text 119
|
||||
tspan 32
|
||||
hash 923fb8991849a185
|
||||
tspan 24
|
||||
hash 8b159d6d6fc45df4
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -12.5 0 37 33
|
||||
bytes 46526
|
||||
viewBox -12.8 0 37.6 33.6
|
||||
bytes 47773
|
||||
circle 14
|
||||
g 1
|
||||
line 125
|
||||
line 141
|
||||
path 9
|
||||
polygon 56
|
||||
polyline 98
|
||||
polygon 44
|
||||
polyline 106
|
||||
rect 1
|
||||
svg 1
|
||||
text 86
|
||||
text 90
|
||||
tspan 19
|
||||
hash e282a0f0dfb1945e
|
||||
hash a15f1fe5af3cb8ca
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -12.5 0 37 33
|
||||
bytes 357959
|
||||
viewBox -12.65 0 37.3 33.3
|
||||
bytes 363133
|
||||
circle 14
|
||||
g 1
|
||||
line 3221
|
||||
line 3284
|
||||
path 37
|
||||
polygon 156
|
||||
polyline 167
|
||||
polygon 144
|
||||
polyline 175
|
||||
rect 1
|
||||
svg 1
|
||||
text 89
|
||||
tspan 24
|
||||
hash af2e36417eb45119
|
||||
tspan 18
|
||||
hash 7abb9592f4ee90d0
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -12.5 0 37 33
|
||||
bytes 40301
|
||||
viewBox -12.8 0 37.6 33.6
|
||||
bytes 41219
|
||||
circle 15
|
||||
g 1
|
||||
line 103
|
||||
line 119
|
||||
path 23
|
||||
polygon 47
|
||||
polyline 64
|
||||
polygon 35
|
||||
polyline 72
|
||||
rect 1
|
||||
svg 1
|
||||
text 72
|
||||
tspan 18
|
||||
hash 299bb5e3547a7dd3
|
||||
text 74
|
||||
tspan 15
|
||||
hash 1d06bb6982a76a59
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -12.5 0 37 33
|
||||
bytes 46796
|
||||
viewBox -12.65 0 37.3 33.3
|
||||
bytes 47530
|
||||
circle 15
|
||||
g 1
|
||||
line 99
|
||||
line 115
|
||||
path 38
|
||||
polygon 82
|
||||
polyline 71
|
||||
polygon 70
|
||||
polyline 79
|
||||
rect 1
|
||||
svg 1
|
||||
text 74
|
||||
tspan 20
|
||||
hash 6a399725abf881d2
|
||||
tspan 15
|
||||
hash 0e6b2b1c5141bc75
|
||||
@@ -1,11 +1,11 @@
|
||||
viewBox -1.823 0 8.646 7.173
|
||||
bytes 6504
|
||||
viewBox -1.961 0 8.922 7.473
|
||||
bytes 6643
|
||||
g 1
|
||||
line 22
|
||||
polygon 20
|
||||
polyline 4
|
||||
line 28
|
||||
polygon 16
|
||||
polyline 6
|
||||
rect 1
|
||||
svg 1
|
||||
text 7
|
||||
tspan 3
|
||||
hash 94a9c1db04762945
|
||||
text 6
|
||||
tspan 2
|
||||
hash 121d60361d8f0a18
|
||||
@@ -1,11 +1,11 @@
|
||||
viewBox -1.661 0 8.323 7.173
|
||||
bytes 9936
|
||||
viewBox -1.731 0 8.461 7.322
|
||||
bytes 10072
|
||||
g 1
|
||||
line 23
|
||||
polygon 47
|
||||
polyline 8
|
||||
line 29
|
||||
polygon 43
|
||||
polyline 10
|
||||
rect 1
|
||||
svg 1
|
||||
text 7
|
||||
tspan 3
|
||||
hash 4f4ff4cba6291045
|
||||
text 6
|
||||
tspan 2
|
||||
hash 7731ecdd9e544749
|
||||
Reference in new issue
Block a user