[293] Wand-Oberkante als eine Auswahl (Geschosshöhe/Frei, Bis Decke, Bis Dach, tiefere von beiden): Objekt-Info und Befehl wand

This commit is contained in:
Claude committed 2026-11-19 10:49:42 +00:00
1 parent c7f7f66b33
commit c1b4dcf67a
14 files changed
+184 -71

No files matched your search

+4 -7
View File
@@ -6,6 +6,7 @@
import { patchItems, removeRoofHole, setRoofEdge } from "../../core";
import type { EntityOf } from "../../core";
import { getState } from "../appStore";
import { wallTopPatch } from "../../model/wallTop";
import type { FlatHostOpts, HostPart } from "./types";
/** Auswahl-Arten mit Mehrfach-Setzen (Schlüssel in `Selection`). */
@@ -88,13 +89,9 @@ export function buildElementAttributesHost(c: FlatHostOpts) {
// "both" ist der Default ⇒ als undefined speichern (Alt-Projekt-Parität).
patchAll("walls", selection.id, { sliceTermination: termination === "both" ? undefined : termination });
},
onSetWallRoofAttach: (attach) => {
if (selection?.kind === "wall")
// "auto" ist der Default ⇒ als undefined speichern.
patchAll("walls", selection.id, { roofAttach: attach === "auto" ? undefined : attach === "on" });
},
onSetWallCeilingAttach: (attach) => {
if (selection?.kind === "wall") patchAll("walls", selection.id, { ceilingAttach: attach ? true : undefined });
onSetWallTopMode: (mode) => {
// [293] roofAttach + ceilingAttach in EINER Op (undefined = Vorgabe).
if (selection?.kind === "wall") patchAll("walls", selection.id, { ...wallTopPatch(mode) });
},
onSetBuildingFlags: (flags) => {
const patch: { isExternal?: boolean; loadBearing?: boolean } = {};
+3
View File
@@ -91,6 +91,8 @@ declare global {
layerView: () => { wallId: string; visible: string[]; prims: number; wallPrims: number };
/** [195] Strichstärke-Override der Wände (id → mm), nur gesetzte. */
wallWeights: () => Record<string, number>;
/** [293] Oberkante der Wände: `roofAttach`/`ceilingAttach`, nur Wände mit gesetztem Feld. */
wallTops: () => Record<string, { roofAttach?: boolean; ceilingAttach?: boolean }>;
/** [190] Auswahl-Aktion wie das native Menü (Bearbeiten > Verbinden usw.), ohne Tastendruck: `runSelectionAction`. */
selectionAction: (id: SelectionActionId) => void;
/** [190] Wände (id, Start, Ende) des Projekts. */
@@ -151,6 +153,7 @@ export function installTestHooks(): void {
excavations: (p.context ?? []).flatMap((c) => (c.type === "excavation" ? [{ id: c.id, bottom: c.bottom }] : [])),
};
},
wallTops: () => Object.fromEntries(getState().project.walls.flatMap((w) => (w.roofAttach === undefined && w.ceilingAttach === undefined ? [] : [[w.id, { roofAttach: w.roofAttach, ceilingAttach: w.ceilingAttach }]]))),
wallWeights: () => Object.fromEntries(getState().project.walls.flatMap((w) => (w.strokeWeight === undefined ? [] : [[w.id, w.strokeWeight]]))),
selectionAction: (id) => runSelectionAction(id),
walls: () => getState().project.walls.map((w) => ({ id: w.id, start: { ...w.start }, end: { ...w.end } })),