[140] Plandarstellung Teil 6: Raumstempel weichen Treppen, Türschwenk, Bemassung, Koten, Texten und Symbolen aus; Unterbau (Kies, Magerbeton, Erdreich) im Schnitt 1:100 schraffiert; CLI-SVG setzt Stempel wie gemessen (Inter, 12 pt fett, 0.8×), Zeilen im zentrierten Block; Stempel-Griff an der gezeichneten Lage; Goldens neu
This commit is contained in:
29 files changed
+808
-90
No files matched your search
@@ -1,5 +1,5 @@
|
||||
viewBox -4 0 23 18
|
||||
bytes 310337
|
||||
bytes 310751
|
||||
circle 14
|
||||
g 1
|
||||
line 3226
|
||||
@@ -8,4 +8,5 @@ polyline 68
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
hash 45b4d584a3e141d6
|
||||
tspan 12
|
||||
hash e61aae0e3fc4f9ec
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4 0 23 18
|
||||
bytes 320692
|
||||
bytes 321106
|
||||
circle 14
|
||||
g 1
|
||||
line 3227
|
||||
@@ -8,4 +8,5 @@ polyline 73
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
hash e0545755beab6d46
|
||||
tspan 12
|
||||
hash 625ac60580256f1b
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 85358
|
||||
bytes 86178
|
||||
circle 16
|
||||
g 1
|
||||
line 314
|
||||
@@ -9,4 +9,5 @@ polyline 110
|
||||
rect 1
|
||||
svg 1
|
||||
text 118
|
||||
hash cef117cef66ccd65
|
||||
tspan 26
|
||||
hash 2fc5e3bab2df1b38
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 113593
|
||||
bytes 114680
|
||||
circle 16
|
||||
g 1
|
||||
line 338
|
||||
@@ -9,4 +9,5 @@ polyline 126
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash 7e22563a4804f932
|
||||
tspan 32
|
||||
hash c02df9796df56fd8
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4.055 0 25.109 23.11
|
||||
bytes 339103
|
||||
bytes 339847
|
||||
circle 14
|
||||
g 1
|
||||
line 3310
|
||||
@@ -8,4 +8,5 @@ polyline 154
|
||||
rect 1
|
||||
svg 1
|
||||
text 91
|
||||
hash 46723498044c422b
|
||||
tspan 23
|
||||
hash f4e69298c1be11bd
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4.055 0 25.109 23.11
|
||||
bytes 369846
|
||||
bytes 370654
|
||||
circle 14
|
||||
g 1
|
||||
line 3333
|
||||
@@ -9,4 +9,5 @@ polyline 169
|
||||
rect 1
|
||||
svg 1
|
||||
text 91
|
||||
hash be529b7ce07ecad8
|
||||
tspan 24
|
||||
hash 532589653aac9cdb
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -10.004 0 31.058 26.958
|
||||
bytes 52665
|
||||
bytes 53341
|
||||
circle 14
|
||||
g 1
|
||||
line 166
|
||||
@@ -9,4 +9,5 @@ polyline 73
|
||||
rect 1
|
||||
svg 1
|
||||
text 75
|
||||
hash 5819887a677f289a
|
||||
tspan 20
|
||||
hash a49820b978df2cc8
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -10.004 0 31.058 26.958
|
||||
bytes 61331
|
||||
bytes 62001
|
||||
circle 14
|
||||
g 1
|
||||
line 171
|
||||
@@ -9,4 +9,5 @@ polyline 77
|
||||
rect 1
|
||||
svg 1
|
||||
text 75
|
||||
hash 1f584745aa154d01
|
||||
tspan 20
|
||||
hash 195e8bb714b78f17
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox 4.457 0 21.343 17.678
|
||||
bytes 40531
|
||||
bytes 40538
|
||||
circle 3
|
||||
g 1
|
||||
line 96
|
||||
@@ -8,4 +8,4 @@ polyline 13
|
||||
rect 1
|
||||
svg 1
|
||||
text 3
|
||||
hash 2bfa93e2c1d3a9c8
|
||||
hash 420d8ffd7bb583e9
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -0.672 0 6.345 5.345
|
||||
bytes 7890
|
||||
bytes 7956
|
||||
g 1
|
||||
line 32
|
||||
polygon 30
|
||||
@@ -7,4 +7,5 @@ polyline 4
|
||||
rect 1
|
||||
svg 1
|
||||
text 7
|
||||
hash bdf6e70cae4a0a08
|
||||
tspan 3
|
||||
hash bf3017439b3240f6
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -0.672 0 6.345 5.345
|
||||
bytes 11830
|
||||
bytes 11897
|
||||
g 1
|
||||
line 33
|
||||
polygon 62
|
||||
@@ -7,4 +7,5 @@ polyline 8
|
||||
rect 1
|
||||
svg 1
|
||||
text 7
|
||||
hash 24dc3848bf391596
|
||||
tspan 3
|
||||
hash 2691a9f68cf90842
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { generatePlan, generateVisibleLevelsPlan, materializeUnderlay, type Primitive } from "./generatePlan";
|
||||
import { isLazyUnread, planCount, planPrimAt, planTextEntries, planWithExtra } from "./planLazy";
|
||||
import { isLazyUnread, planCount, planPrimAt, planTextEntries, planWithExtra, roomStampAt } from "./planLazy";
|
||||
import { planSceneBin, planToRenderScene } from "./toRenderScene";
|
||||
import { planToSvgString } from "../export/planToSvgString";
|
||||
import { PlanPickIndex } from "./planView/planPick";
|
||||
@@ -51,6 +51,19 @@ describe("lazy Plan", () => {
|
||||
expect(isLazyUnread(plan)).toBe(true);
|
||||
});
|
||||
|
||||
it("[140] Lage des Raumstempels aus dem Plan (auch weggerückt vom Pol)", () => {
|
||||
const room = (sampleProject.rooms ?? []).find((r) => r.floorId === "eg")!;
|
||||
// L-Raum ohne eigenen Anker mit langem Namen: der Kern rückt den Stempel vom Pol weg.
|
||||
const l = [[0, 0], [8, 0], [8, 1.2], [1.2, 1.2], [1.2, 8], [0, 8]].map(([x, y]) => ({ x: x + 50, y: y + 50 }));
|
||||
const p: Project = { ...sampleProject, rooms: (sampleProject.rooms ?? []).map((r) => (r.id === room.id ? { ...r, boundary: l, stampAnchor: undefined, stamp: undefined, name: "Wohnen Essen Kochen" } : r)) };
|
||||
const plan = generatePlan(p, "eg", codes(p));
|
||||
const at = roomStampAt(plan, room.id)!;
|
||||
expect(at).toBeDefined();
|
||||
const text = planTextEntries(plan).find((e) => e.p.kind === "text" && e.p.roomId === room.id)!;
|
||||
expect(at).toEqual((text.p as { at: { x: number; y: number } }).at);
|
||||
expect(roomStampAt(plan, "gibt-es-nicht")).toBeUndefined();
|
||||
});
|
||||
|
||||
it("Einzelzugriff, Text-Einträge und Anzahl == gelesene Liste (dieselben Objekte)", () => {
|
||||
for (const l of ["eg", "og"]) {
|
||||
const plan = generatePlan(withText, l, codes(withText));
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
import type { Plan, PlanBufRun, Primitive } from "./generatePlan";
|
||||
import type { Vec2 } from "../model/types";
|
||||
import type { DecodedPlanBuf } from "./planBuf";
|
||||
|
||||
/** Abschnitt `[from, to)` eines Kern-Puffers. */
|
||||
@@ -197,6 +198,18 @@ export function planTextEntries(plan: Plan): ReadonlyArray<{ i: number; p: TextE
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* [140] Tatsächliche Lage des Raumstempels von `roomId` im Plan (Anker des Stempel-Texts): ohne eigenen
|
||||
* `stampAnchor` rückt der Kern den Stempel vom Pol weg (L-Raum, Hindernisse) — Griff und Ziehen gehen von
|
||||
* hier aus. `undefined`, wenn der Plan keinen Stempel dieses Raums zeigt.
|
||||
*/
|
||||
export function roomStampAt(plan: Plan, roomId: string): Vec2 | undefined {
|
||||
for (const e of planTextEntries(plan)) {
|
||||
if (e.p.kind === "text" && e.p.roomId === roomId) return e.p.at;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plan um Primitive davor/danach ergänzt, ohne die Primitive des Plans zu lesen (Überlagerungen
|
||||
* der Ansicht). Gedimmte Bereiche wandern mit.
|
||||
|
||||
Reference in new issue
Block a user