[185] Navigation wie Archicad: Geschosswechsel behält Zoom, Cmd+5/6 Geschoss, Cmd+3/4 Auswahl im 3D

Grundriss: Geschosse teilen den Einpass-Schlüssel (planFitKey, PlanView fitKey), Wechsel behält
Ausschnitt und Massstab exakt. Cmd/Ctrl+5/6 Geschoss tiefer/höher im Grundriss- und 3D-Reiter.
Cmd/Ctrl+3 zeigt nur die Auswahl im 3D (Reiter „3D · Auswahl“, Kamera passt ein; ohne Auswahl alles),
Cmd/Ctrl+4 blendet die Auswahl im 3D aus. Zustand rein UI (state/view3dFilter.ts). Kern:
model3d::ElementSelection im ClassFilter (only/hideIds für Teile, Cache, Pick). Kürzel umbelegbar,
natives Menü Ansicht. PlanViewHandle.pxPerMeter liest die aktuelle viewBox.
This commit is contained in:
Claude committed 2026-11-11 19:39:51 +00:00
1 parent a6c302a91d
commit 5530089eea
29 files changed
+717 -42

No files matched your search

+28 -2
View File
@@ -6,12 +6,15 @@ import type { ViewType } from "../model/viewTypes";
import { sheetLevelOf } from "../model/layoutModel";
import { getState } from "./appStore";
import type { ViewSnapshotState } from "./viewSnapshots";
import { getViewStateBridge, getViewTabs, navigateToLevel, setViewTabs, switchViewKind, type TabNav } from "./viewTabs";
import { getViewStateBridge, getViewTabs, navigateToLevel, setViewTabs, stepFloor, switchViewKind, type TabNav } from "./viewTabs";
import { getView3dFilter, hideSelection3d, selectionIds3d, setView3dFilter, showSelection3d } from "./view3dFilter";
import { clearKinds } from "./selection";
function run(nav: (live: ViewSnapshotState) => TabNav): void {
function run(nav: (live: ViewSnapshotState) => TabNav | null): void {
const bridge = getViewStateBridge();
if (!bridge) return;
const r = nav(bridge.live());
if (!r) return;
setViewTabs(r.next);
if (r.setLevel) {
// Gleicher Reiter: nur das Geschoss wechselt, die Art (Grundriss/3D) bleibt.
@@ -39,3 +42,26 @@ export function openLayoutTab(layoutId: string): void {
const sheet = sheetLevelOf(getState().project, layoutId);
if (sheet) openLevel(sheet.id);
}
/** [185] Cmd/Ctrl+5 (−1) bzw. Cmd/Ctrl+6 (+1): im Grundriss-/3D-Reiter ein Geschoss tiefer/höher (Zoom bleibt). */
export function stepActiveFloor(dir: 1 | -1): void {
run((live) => stepFloor(getViewTabs(), live, getState().project.drawingLevels, dir));
}
/**
* [185] Cmd/Ctrl+3 „Auswahl in 3D zeigen": mit Auswahl zeigt der 3D-Reiter nur diese (Titel „3D · Auswahl"), ohne
* Auswahl wieder alles; wechselt in den 3D-Reiter bzw. öffnet ihn, die Kamera passt sich ein.
*/
export function showSelectionIn3d(): void {
setView3dFilter(showSelection3d(getView3dFilter(), selectionIds3d(getState().selection)));
switchViewType("perspektive");
}
/** [185] Cmd/Ctrl+4: gewählte Elemente im 3D temporär ausblenden (nicht anwählbar, kein Undo-Schritt); Auswahl leeren. */
export function hideSelectionIn3d(): void {
const st = getState();
const ids = selectionIds3d(st.selection);
if (!ids.length) return;
setView3dFilter(hideSelection3d(getView3dFilter(), ids));
st.setSelection(clearKinds("walls", "ceilings", "openings", "stairs", "solids", "columns", "roofs", "contextObjects", "trees", "drawings", "groups"));
}