[260] Fenster/Türen im Grundriss symbolisch oder geschnitten
Modell OpeningPlanMode (symbolisch|geschnitten) an Öffnung, Fenster-/Türtyp und Modelldarstellung (walls.openingPlanMode); Rangfolge Element > Typ > Modelldarstellung, Vorgabe symbolisch. Symbolisch: Öffnungssymbol in der Wandlücke unabhängig von der Schnitthöhe (Formöffnungen mit voller Breite); geschnitten: nach der Schnitthöhe, darüber/darunter Wand geschlossen + Linie über/unter Schnitt, hell auf schwarzer Wand. Objekteinstellungen (T) Feld „Im Grundriss“ für alle gewählten Öffnungen in einem Undo-Schritt (auch macOS-Nebenfenster über die Handler-Weiterleitung), Typen und Modelldarstellung in den Ressourcen. Goldens Musterhaus komplex nachgeführt (Fenster über der Schnitthöhe jetzt als Symbol). Rust-, vitest- und e2e-Tests; Doku, Release-Notes (Frage 12 erledigt), Mac-Prüfzeile 13.29.
This commit is contained in:
32 files changed
+497
-48
No files matched your search
@@ -184,6 +184,8 @@ export interface SelectionOpeningValues {
|
||||
swing: Common<string>;
|
||||
openingDir: Common<string>;
|
||||
wingCount: Common<number>;
|
||||
/** [260] Darstellung im Grundriss ("" = wie Typ). */
|
||||
planMode: Common<string>;
|
||||
}
|
||||
|
||||
export function selectionOpeningValues(project: Project, sel: Selection): SelectionOpeningValues {
|
||||
@@ -195,6 +197,7 @@ export function selectionOpeningValues(project: Project, sel: Selection): Select
|
||||
const swing: string[] = [];
|
||||
const dir: string[] = [];
|
||||
const wings: number[] = [];
|
||||
const mode: string[] = [];
|
||||
for (const id of sel.openings.slice(0, MAX_COMPARED)) {
|
||||
const o = deriveSelection(project, { openings: [id] })?.opening;
|
||||
if (!o) continue;
|
||||
@@ -206,6 +209,7 @@ export function selectionOpeningValues(project: Project, sel: Selection): Select
|
||||
swing.push(o.swing ?? "");
|
||||
dir.push(o.openingDir ?? "");
|
||||
wings.push(o.wingCount ?? 1);
|
||||
mode.push(o.planMode ?? "");
|
||||
}
|
||||
return {
|
||||
width: commonValue(w),
|
||||
@@ -216,6 +220,7 @@ export function selectionOpeningValues(project: Project, sel: Selection): Select
|
||||
swing: commonValue(swing),
|
||||
openingDir: commonValue(dir),
|
||||
wingCount: commonValue(wings),
|
||||
planMode: commonValue(mode),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ export const MODEL_VIEW_FIELDS: readonly ModelViewField[] = [
|
||||
{ section: "walls", key: "reveals", values: "bool" },
|
||||
{ section: "walls", key: "cutHatch", values: "bool" },
|
||||
{ section: "walls", key: "contrastOnSolid", values: "bool" },
|
||||
{ section: "walls", key: "openingPlanMode", values: ["symbolisch", "geschnitten"] },
|
||||
{ section: "slabs", key: "floorFinish", values: ["off", "wet", "all"] },
|
||||
{ section: "slabs", key: "layers", values: ["all", "simplified", "core"] },
|
||||
{ section: "slabs", key: "buildUp", values: ["show", "merged"] },
|
||||
|
||||
@@ -197,3 +197,28 @@ describe("Mehrfachauswahl setzt alle gewählten Elemente in einem Schritt [195b]
|
||||
expect(JSON.stringify(getState().project.roofs!.find((r) => r.id === b.id))).toBe(before);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Darstellung im Grundriss [260]", () => {
|
||||
it("symbolisch/geschnitten gilt für alle gewählten Fenster UND Türen in einem Undo-Schritt", () => {
|
||||
getState().loadProject(buildComplexSampleProject());
|
||||
const os = getState().project.openings!;
|
||||
const win = os.find((o) => o.kind === "window" && !o.hostRoofId && !o.hostCeilingId)!;
|
||||
const door = os.find((o) => o.kind === "door")!;
|
||||
setState({ selection: { ...EMPTY_SELECTION, openings: [win.id, door.id] } });
|
||||
const host = hostFor("opening", win.id);
|
||||
const setMode = host.onSetOpeningPlanMode as (m: string | undefined) => void;
|
||||
const depth = getState().undoDepth;
|
||||
setMode("geschnitten");
|
||||
const after = getState().project.openings!;
|
||||
expect(after.find((o) => o.id === win.id)!.planMode).toBe("geschnitten");
|
||||
expect(after.find((o) => o.id === door.id)!.planMode).toBe("geschnitten");
|
||||
expect(getState().undoDepth).toBe(depth + 1);
|
||||
getState().undo();
|
||||
expect(getState().project.openings!.find((o) => o.id === door.id)!.planMode).toBeUndefined();
|
||||
expect(getState().undoDepth).toBe(depth);
|
||||
// „Wie Typ“ entfernt die Übersteuerung wieder.
|
||||
getState().redo();
|
||||
setMode(undefined);
|
||||
expect(getState().project.openings!.find((o) => o.id === win.id)!.planMode).toBeUndefined();
|
||||
});
|
||||
});
|
||||
@@ -189,6 +189,14 @@ export function buildElementAttributesHost(c: FlatHostOpts) {
|
||||
onSetOpeningDisplay: (patch) => {
|
||||
if (selection?.kind === "opening") patchAll("openings", selection.id, patch);
|
||||
},
|
||||
// [260] Darstellung im Grundriss: anders als die Art-eigenen Felder für ALLE gewählten Öffnungen (Fenster und
|
||||
// Türen), ein Undo-Schritt.
|
||||
onSetOpeningPlanMode: (planMode) => {
|
||||
if (selection?.kind !== "opening") return;
|
||||
const sel = getState().selection.openings;
|
||||
const ids = sel.length > 1 && sel.includes(selection.id) ? [...sel] : [selection.id];
|
||||
applyChange((p) => patchItems(p, PROJECT_LIST.openings, ids, (o) => ({ ...o, planMode })));
|
||||
},
|
||||
// Lage eines Dach-/Deckenfensters ist elementspezifisch (Punkt/Winkel in der Wirtsfläche) ⇒ bewusst nur das erste Element.
|
||||
onSetOpeningHost: (patch) => {
|
||||
if (selection?.kind === "opening") updateOpening(selection.id, patch);
|
||||
|
||||
@@ -239,6 +239,8 @@ export interface OpeningInfo {
|
||||
/** Nur Fenster: Öffnungslinien in der Ansicht / Aufschlagbogen im Grundriss ([95]); fehlt → wie Typ. */
|
||||
sashSymbols?: boolean;
|
||||
planSwingArcs?: boolean;
|
||||
/** [260] Darstellung im Grundriss (symbolisch/geschnitten); fehlt → wie Typ bzw. Modelldarstellung. */
|
||||
planMode?: "symbolisch" | "geschnitten";
|
||||
/** Zugewiesener Tür-/Fenstertyp (Bibliothek, `Opening.typeId`) oder undefined. */
|
||||
typeId?: string;
|
||||
/** Per-Element-Übersteuerung der Detailstufe; fehlt → Ansichts-Detailstufe gilt. */
|
||||
|
||||
Reference in new issue
Block a user