Merge branch 'worktree-agent-aa15860eb6e15945e' into claude/practical-noether-1hb2s1

This commit is contained in:
Claude committed 2026-11-11 01:55:42 +00:00
commit d6796abe44
7 files changed
+25 -16

No files matched your search

+3 -3
View File
@@ -49,7 +49,8 @@ Wer zu einer ID mehr wissen will (Entscheide, Tests, Bilder), sucht dort nach `*
`state/tabNavigation.ts`): Geschoss im Navigator behält die Art (3D bleibt 3D, nur das Geschoss wechselt); Schnitt/Ansicht/Zeichnung/
Layout/Ausschnitt anderer Art öffnen einen eigenen Reiter bzw. springen zum offenen; Grundriss-/3D-Knöpfe und Menü sind in jedem
Reiter aktiv und wechseln/öffnen den 3D- bzw. Grundriss-Reiter (Titel „3D · Geschoss"). Der 3D-Live-Schnitt „3D im Schnitt-Reiter"
entfällt damit als Einstieg. Offen: nicht in der Tauri-App geprüft; Knopf „Grundriss" ist im Schnitt-Reiter noch hervorgehoben. · S
entfällt damit als Einstieg (toter Auto-Schnitt in `useSectionLineState` entfernt; der Live-Schnitt per Schalter im Objekt-Info der
Schnittlinie bleibt im 3D-Reiter). Knopf „Grundriss" nur im Grundriss-Reiter hervorgehoben (`isPlanKindActive`, 11.11.). Offen: nicht in der Tauri-App geprüft. · S
- ○ **[181]** Importe als eigenständige Elemente (11.11., Wunsch Maintainer): Swisstopo-Gelände/-Gebäude, DXF-/IFC-Kontext usw. werden nach dem Import normale Modell-Elemente auf Ebenen (eigene Klasse), unabhängig von der Quelle; keine Import-Liste mehr, die Sichtbarkeit/Darstellung steuert. Gelände-Mesh als Gelände-/Freiflächen-Element, Gebäude als 3D-Körper (wie Möbel/Körper oder eigener Typ). Keine Migration nötig (nur Beispielprojekte nachführen). Opus. · L
- ○ **[180]** Alles Sichtbare auf Ebene/Klasse (11.11., Vorgabe Maintainer): jedes Primitive in Plan/Schnitt/Ansicht (auch abgeleitete: Schatten, Auto-Masse, Koten, Schnitt-/Ansichtsmarken, Raster, Nordpfeil, Stempel, Gelände) hat eine Klasse/Ebene und verschwindet mit ihr; Audit + Test, der Primitives ohne Zuordnung meldet. Regel in CLAUDE.md. · M
- ◐ **[133]** Musterhaus komplex: Rest. Skalieren-Kopie lässt `position`/Breite unverändert; Vollflächen-/Bildschraffur
@@ -191,8 +192,7 @@ Wer zu einer ID mehr wissen will (Entscheide, Tests, Bilder), sucht dort nach `*
(`sun.rs`, Kern `plan/`). · M
- ◐ **[64]+[59]** Sonnenstand/Schatten. Schatten im 3D (`render3d`, Shadow-Mapping) ist gebaut, aber nicht auf Metal
und nicht in der App angesehen; mehrere Kaskaden erst bei grossen Lageplänen. · S
- ◐ **[149]** Baum als eigenes Objekt. Nicht im Auswahlrechteck; keine Art-Beschriftung im Plan; Beschriftung fest
rechts vom Stamm (kein Ausweichen, kein Griff); Schnitt durch die Krone zeigt die ganze Silhouette; Fuss am
- ◐ **[149]** Baum als eigenes Objekt. Auswahlrechteck, Gruppen, Art-Beschriftung (`species`/`showLabel`) und Beschriftungs-Griff sind gebaut (11.11. geprüft, TODO-Text war veraltet). Offen: Beschriftung weicht nicht aus; Schnitt durch die Krone zeigt die ganze Silhouette; Fuss am
Gelände der Stammmitte (Hang). · M
- ◐ **[148]** Flach-/Pultdach auf beliebigem Umriss (`roof_geometry`). Pult mit Höfen (Höfe ignoriert); Pult auf
schiefem Umriss neigt nur entlang x/y (`ridgeAxis`); Attika/Gefälle fehlen im Modell; Dachfenster-Laibung genau auf
-1
View File
@@ -399,7 +399,6 @@ export default function App() {
// ── Gewählte Schnittlinie, 3D-Live-Schnitt → state/useSectionLineState.ts ──
const { sectionLine, section3dPlane, onToggleSection3dCut } = useSectionLineState({
activeLevel,
viewType,
selectedSectionLineId,
section3dCutId,
setSection3dCutId,
+3 -11
View File
@@ -4,8 +4,8 @@
// Zeichnungsebenen aus dem Store ([121]); die Objekt-Info der Auswahl rechnen Panels selbst
// (`useSelectionInfo`), der Panel-Host beim Aufruf eines Handlers.
import { useCallback, useEffect, useMemo } from "react";
import type { DrawingLevel, ViewType } from "../model/types";
import { useCallback, useMemo } from "react";
import type { DrawingLevel } from "../model/types";
import { sectionPlaneFromLevel } from "../core";
import { useStore } from "./appStore";
import type { useSelectionState } from "./useSelectionState";
@@ -14,12 +14,11 @@ type Sel = ReturnType<typeof useSelectionState>;
export function useSectionLineState(opts: {
activeLevel: DrawingLevel;
viewType: ViewType;
selectedSectionLineId: string | null;
section3dCutId: Sel["section3dCutId"];
setSection3dCutId: Sel["setSection3dCutId"];
}) {
const { activeLevel, viewType, selectedSectionLineId, section3dCutId, setSection3dCutId } = opts;
const { activeLevel, selectedSectionLineId, section3dCutId, setSection3dCutId } = opts;
const drawingLevels = useStore((s) => s.project.drawingLevels);
// Gewählte Schnitt-/Ansichtslinie (DrawingLevel) — separat von `selection`, da
@@ -56,13 +55,6 @@ export function useSectionLineState(opts: {
return lvl ? sectionPlaneFromLevel(lvl) : null;
}, [drawingLevels, section3dCutId]);
// Aus einem Schnitt ins 3D ([115]): der Live-Schnitt folgt der Schnittlinie dieses Schnitts (einmal
// beim Wechsel; im 3D lässt er sich wie sonst aufheben).
const sectionLevelIn3d = activeLevel.kind === "section" && viewType === "perspektive" ? activeLevel.id : null;
useEffect(() => {
if (sectionLevelIn3d) setSection3dCutId(sectionLevelIn3d);
}, [sectionLevelIn3d, setSection3dCutId]);
// Bindet den 3D-Live-Schnitt an eine Schnittlinie (Toggle im Objekt-Info).
const onToggleSection3dCut = useCallback(
(id: string) => setSection3dCutId((cur) => (cur === id ? null : id)),
+8
View File
@@ -14,6 +14,7 @@ import {
navigateToLevel,
switchViewKind,
tabKindOf,
isPlanKindActive,
openTab,
restoreViewTabs,
restoreViewTabsFromProject,
@@ -199,6 +200,13 @@ describe("Reiter-Arten und Navigation [182]", () => {
expect(tabKindOf(undefined, levels)).toBeNull();
});
it("isPlanKindActive: Grundriss-Knopf nur im Grundriss-Reiter hervorgehoben", () => {
expect(isPlanKindActive("grundriss", "floor")).toBe(true);
expect(isPlanKindActive("grundriss", "section")).toBe(false);
expect(isPlanKindActive("grundriss", "elevation")).toBe(false);
expect(isPlanKindActive("perspektive", "floor")).toBe(false);
});
it("Geschoss im 3D-Reiter: nur Geschoss wechselt, kein neuer Reiter", () => {
const s = one();
const r = navigateToLevel(s, live("eg", "perspektive"), levels, "og");
+5
View File
@@ -113,6 +113,11 @@ export function levelTabKind(kind: DrawingLevel["kind"]): Exclude<TabKind, "3d">
return kind === "floor" ? "plan" : kind === "section" ? "section" : kind === "elevation" ? "elevation" : "drawing";
}
/** Ist der Reiter ein Grundriss-Reiter (Hervorhebung des Grundriss-Knopfs)? Schnitt/Ansicht/Zeichnung/3D: nein. */
export function isPlanKindActive(viewType: ViewSnapshotState["viewType"], levelKind: DrawingLevel["kind"]): boolean {
return viewType !== "perspektive" && levelTabKind(levelKind) === "plan";
}
/** Art eines Reiters aus seinem Darstellungszustand (`null`: unbekannt, z. B. ohne gemerkten Zustand). */
export function tabKindOf(st: KindState | undefined, levels: readonly LevelLite[]): TabKind | null {
if (!st) return null;
+4 -1
View File
@@ -1024,6 +1024,8 @@ function AboutDialog({ onClose }: { onClose: () => void }) {
*/
export interface ViewRibbonTabProps {
viewToggleEnabled: boolean;
/** Aktiver Reiter ist ein Grundriss-Reiter ([182]); sonst ist der Grundriss-Knopf nicht hervorgehoben. */
planTabActive?: boolean;
viewType: ViewType;
onViewType: (v: ViewType) => void;
view3d: View3d;
@@ -1106,6 +1108,7 @@ const LiveScaleStat = memo(function LiveScaleStat({
*/
export const ViewRibbonTab = memo(function ViewRibbonTab({
viewToggleEnabled,
planTabActive = true,
viewType,
onViewType,
view3d,
@@ -1170,7 +1173,7 @@ export const ViewRibbonTab = memo(function ViewRibbonTab({
<button
type="button"
className={`tb-vt-btn${
viewToggleEnabled && viewType === "grundriss" ? " active" : ""
viewToggleEnabled && planTabActive && viewType === "grundriss" ? " active" : ""
}`}
onClick={() => onViewType("grundriss")}
disabled={!viewToggleEnabled}
+2
View File
@@ -3,6 +3,7 @@
// samt Ebenen-/Zeichnungs-Kombinationen — als memoisierte Elemente mit denselben Abhängigkeiten wie
// zuvor ([121]), damit ein App-Render sie nicht neu zeichnet. Aufgerufen von `App.tsx` für die `TopBar`.
import { isPlanKindActive } from "../state/viewTabs";
import { useMemo } from "react";
import type { DrawingLevel, ModelViewOption, ViewType } from "../model/types";
import { currentModelViewId, modelViewChoices } from "../state/modelViews";
@@ -181,6 +182,7 @@ export function useTopBarElements(opts: {
() => (
<ViewRibbonTab
viewToggleEnabled={true} /* [182] 3D/Grundriss sind aus jedem Reiter erreichbar */
planTabActive={isPlanKindActive(viewType, activeLevel.kind)}
viewType={viewType}
onViewType={setViewType}
view3d={view3d}