[199] Plan-Review Runde 3: Höhenkote am First, Stempel-Zeilenvorschub, Achsblasen hinter den Massketten, Verbauwand am Gebäude
Beide Musterhäuser, Grundrisse aller Geschosse, Schnitte und Ansichten in 1:200/1:100/1:50 per CLI-SVG (--hatch) in Chromium angesehen (nur Linux). Behoben: - Oberste automatische Höhenkote in Schnitt/Ansicht sass an der Oberkante der Zeichnungsgrenzen, also an den Achsblasen (komplex: „+13.13" statt First ≈ +11.8). Jetzt Oberkante des Gebauten ohne Achsraster („draw2d", Blasen, Texte), Bäume und Gelände: `levelMarkers.ts` (builtMaxY), Blatt-Ausschnitte über `drawings::level_marker_bounds` (dort jetzt auch links neben dem Gebauten wie in der App). - Raumstempel: Name/Nummer mit eigener Schriftgrösse schrumpfen nicht mit der Grundschrift; bei 2-mm-Grundschrift lag der Vorschub (1.3 × Grundschrift) unter der Zeilenhöhe, Name und Nummer überdeckten sich (komplex DG „Schlafen" 1:100). Vorschub ≥ 1.15 × grösste Schrift der Zeile bzw. Unterlänge davor + Oberlänge; der Block misst die erste Zeile nach ihrer Schrift (`text_layout::stamp_block_refs`, `stamp_block_size`). Normale Stempel (10 pt) behalten 13 pt Vorschub; die Blockhöhe wächst um die grössere Namensschrift. - Achsblasen: eine Seite wird gemeinsam gesucht (Lage frei für JEDE Blase, vorher je Blase und das Maximum) und mit einem Durchmesser Luft dahinter — die Blase passte sonst in die Lücke zwischen zwei Massketten (komplex OG oben, UG Ost: Blase B auf „4.37"). - Verbauwand (Rühlwand) der Baugrube im Grundriss endet am Fussabdruck des Geschosses wie Sohle und Böschung (komplex EG: lief durch den Anbau „Eingang" über Wände, Boden und Raumstempel). - Einfaches Musterhaus: Stempelanker „Wohnen" aus der Zwischenwand W9/der Schnittlinie A in den Westteil (Daten). Tests: drawings::koten_grenzen_aus_dem_gebauten, achsblasen_nicht_zwischen_massketten, text_layout::stempel_vorschub_nach_eigener_schrift, context::verbauband_endet_am_gebaeude, levelMarkers.test.ts. Goldens Plan (Grundrisse komplex alle Geschosse, Muster EG) und CLI grundriss-eg.svg nachgeführt (nur Stempel-/Blasenlagen, Verbauband). Offene Befunde in TODO.md [199].
This commit is contained in:
19 files changed
+289
-46
No files matched your search
@@ -4,8 +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="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>
|
||||
<text x="0.55481" y="1.54903" font-family="Inter, sans-serif" text-anchor="start"><tspan font-size="0.3528" fill="#111111">Wohnen</tspan></text>
|
||||
<text x="0.55481" y="2.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="#0f0f0f" stroke-width="0.012"/>
|
||||
<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: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -574,7 +574,9 @@ export const sampleProject: Project = {
|
||||
{ x: 0.1725, y: 3.8275 },
|
||||
],
|
||||
color: "#6b7280",
|
||||
stampAnchor: { x: 2.5, y: 2.0 },
|
||||
// [199] Stempel im westlichen Teil über der Schnittlinie A (y = 2): vorher (2.5, 2.0) mitten auf der
|
||||
// Zwischenwand W9 und auf der Schnittlinie.
|
||||
stampAnchor: { x: 1.25, y: 3.0 },
|
||||
},
|
||||
],
|
||||
// Freie 2D-Zeichengeometrie — anfangs leer; wird mit den Zeichenwerkzeugen
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -13.448 0 38.615 33.813
|
||||
bytes 19740
|
||||
bytes 19717
|
||||
circle 14
|
||||
g 1
|
||||
line 63
|
||||
@@ -9,4 +9,4 @@ rect 1
|
||||
svg 1
|
||||
text 32
|
||||
tspan 9
|
||||
hash bb5849739a1df2f2
|
||||
hash d1d5d7a7e596af53
|
||||
@@ -1,12 +1,12 @@
|
||||
viewBox -12.974 0 37.808 33.406
|
||||
bytes 318216
|
||||
bytes 318030
|
||||
circle 14
|
||||
g 1
|
||||
line 3211
|
||||
line 3209
|
||||
polygon 78
|
||||
polyline 69
|
||||
rect 1
|
||||
svg 1
|
||||
text 32
|
||||
tspan 9
|
||||
hash 85a2f77e502a6b64
|
||||
hash 25002a28d0603e6b
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 66770
|
||||
bytes 66756
|
||||
circle 16
|
||||
g 1
|
||||
line 137
|
||||
@@ -10,4 +10,4 @@ rect 1
|
||||
svg 1
|
||||
text 115
|
||||
tspan 24
|
||||
hash 6677bd5c1951647d
|
||||
hash 754df2040d980729
|
||||
@@ -1,8 +1,8 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 107183
|
||||
bytes 107266
|
||||
circle 16
|
||||
g 1
|
||||
line 360
|
||||
line 361
|
||||
path 67
|
||||
polygon 216
|
||||
polyline 101
|
||||
@@ -10,4 +10,4 @@ rect 1
|
||||
svg 1
|
||||
text 115
|
||||
tspan 24
|
||||
hash b98d829de61fbc60
|
||||
hash e0c7011ad7ac9ebe
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -13.448 0 38.615 33.813
|
||||
bytes 45069
|
||||
bytes 45053
|
||||
circle 14
|
||||
g 1
|
||||
line 114
|
||||
@@ -10,4 +10,4 @@ rect 1
|
||||
svg 1
|
||||
text 87
|
||||
tspan 19
|
||||
hash ded3fd1e734bc9ba
|
||||
hash a93f22441df3ede4
|
||||
@@ -1,8 +1,8 @@
|
||||
viewBox -12.974 0 37.808 33.406
|
||||
bytes 353598
|
||||
bytes 353509
|
||||
circle 14
|
||||
g 1
|
||||
line 3255
|
||||
line 3254
|
||||
path 38
|
||||
polygon 156
|
||||
polyline 156
|
||||
@@ -10,4 +10,4 @@ rect 1
|
||||
svg 1
|
||||
text 86
|
||||
tspan 18
|
||||
hash fcdd5ff67d6b608b
|
||||
hash 5af2107785b177d7
|
||||
@@ -1,8 +1,8 @@
|
||||
viewBox -13.693 0 38.86 33.813
|
||||
bytes 41663
|
||||
bytes 41779
|
||||
circle 16
|
||||
g 1
|
||||
line 96
|
||||
line 97
|
||||
path 23
|
||||
polygon 46
|
||||
polyline 73
|
||||
@@ -10,4 +10,4 @@ rect 1
|
||||
svg 1
|
||||
text 71
|
||||
tspan 15
|
||||
hash 100ef3875042c945
|
||||
hash 898c73858b7a7318
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -13.693 0 38.527 33.406
|
||||
bytes 47996
|
||||
bytes 47998
|
||||
circle 16
|
||||
g 1
|
||||
line 94
|
||||
@@ -10,4 +10,4 @@ rect 1
|
||||
svg 1
|
||||
text 71
|
||||
tspan 15
|
||||
hash b6b4ca860e3563c6
|
||||
hash f42b0346d144360d
|
||||
@@ -8,4 +8,4 @@ rect 1
|
||||
svg 1
|
||||
text 5
|
||||
tspan 2
|
||||
hash 230c5dca73339bd7
|
||||
hash 5c5454d2e7f9a18c
|
||||
@@ -8,4 +8,4 @@ rect 1
|
||||
svg 1
|
||||
text 5
|
||||
tspan 2
|
||||
hash 5f70427ea48d9141
|
||||
hash d019916bb5d813ec
|
||||
@@ -20,6 +20,20 @@ describe("levelMarkerPrimitives", () => {
|
||||
expect(texts(prims)).toEqual(["+2.60", "+6.00"]);
|
||||
});
|
||||
|
||||
it("[199] oberste Kote an der Oberkante des Gebauten, nicht an Achsblasen, Bäumen oder Texten darüber", () => {
|
||||
const line = (ax: number, ay: number, bx: number, by: number, cls: string): Primitive =>
|
||||
({ kind: "line", a: { x: ax, y: ay }, b: { x: bx, y: by }, cls, weightMm: 0.25 }) as unknown as Primitive;
|
||||
const prims: Primitive[] = [
|
||||
{ kind: "polygon", pts: [{ x: 0, y: 0 }, { x: 5, y: 0 }, { x: 5, y: 6.2 }, { x: 0, y: 6.2 }], fill: "#000", stroke: "#000", strokeWidthMm: 0.5 } as unknown as Primitive,
|
||||
// Achsraster (Stummel + Blase + Text) und Baumkrone über dem First
|
||||
line(2, 6.5, 2, 7.2, "draw2d"),
|
||||
{ kind: "drawingCircle", center: { x: 2, y: 7.6 }, r: 0.25, fill: "none", stroke: "#000", weightMm: 0.25 } as unknown as Primitive,
|
||||
line(6, 0, 6, 9, "tree-crown"),
|
||||
];
|
||||
const marks = levelMarkerPrimitives(sampleProject, { minX: 0, minY: -0.3, maxX: 6, maxY: 9 }, prims);
|
||||
expect(texts(marks)).toEqual(["±0.00", "+2.60", "+6.20"]);
|
||||
});
|
||||
|
||||
it("standardmässig an, abschaltbar", () => {
|
||||
const lv = sampleProject.drawingLevels.find((l) => l.kind === "section")!;
|
||||
expect(levelMarksEnabled(lv)).toBe(true);
|
||||
|
||||
@@ -38,15 +38,23 @@ export function levelMarkerPrimitives(
|
||||
): Primitive[] {
|
||||
if (!(bounds.maxX > bounds.minX) || !(bounds.maxY > bounds.minY)) return [];
|
||||
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;
|
||||
// [199] Oberste Kote = Oberkante des Gebauten: die Grenzen reichen sonst bis über die Achsblasen (Musterhaus
|
||||
// komplex: „+13.13" 1.4 m über dem First), über Bäume und Texte.
|
||||
const top = primitives ? Math.min(bounds.maxY, builtMaxY(project, primitives)) : bounds.maxY;
|
||||
const maxY = top > bounds.minY ? top : bounds.maxY;
|
||||
return decodePlanBuf(documentFor(project).queryBin("levelMarkers", [minX < bounds.maxX ? minX : bounds.minX, bounds.minY, bounds.maxX, 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 siteIds(project: Project): Set<string> {
|
||||
return new Set((project.context ?? []).filter((c) => c.type === "terrainMesh" || c.type === "excavation" || c.type === "contourSet").map((c) => c.id));
|
||||
}
|
||||
|
||||
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));
|
||||
const site = siteIds(project);
|
||||
let minX = Infinity;
|
||||
for (const q of primitives) {
|
||||
if (q.kind === "line") {
|
||||
@@ -57,3 +65,21 @@ function builtMinX(project: Project, primitives: readonly Primitive[]): number {
|
||||
}
|
||||
return minX;
|
||||
}
|
||||
|
||||
// [199] Achsraster (Linien „draw2d", Blasen, Beschriftungen) und Bäume zählen nicht zur Oberkante.
|
||||
const NOT_BUILT_TOP = new Set([...TERRAIN_CLS, "draw2d", "tree-crown", "tree-remove"]);
|
||||
const TREE_PICK_PREFIX = "@tree:"; // Kern `tree::TREE_PICK_PREFIX`
|
||||
|
||||
function builtMaxY(project: Project, primitives: readonly Primitive[]): number {
|
||||
const site = siteIds(project);
|
||||
let maxY = -Infinity;
|
||||
for (const q of primitives) {
|
||||
if (q.kind === "line") {
|
||||
if (!NOT_BUILT_TOP.has(q.cls)) maxY = Math.max(maxY, q.a.y, q.b.y);
|
||||
} else if (q.kind === "polygon") {
|
||||
const id = q.contextObjectId;
|
||||
if (!(id && (site.has(id) || id.startsWith(TREE_PICK_PREFIX)))) for (const v of q.pts) maxY = Math.max(maxY, v.y);
|
||||
}
|
||||
}
|
||||
return maxY;
|
||||
}
|
||||
Reference in new issue
Block a user