From 7410bb5f66e9e64dc109c61f2a5210ccc8f5c969 Mon Sep 17 00:00:00 2001 From: karim Date: Wed, 21 Oct 2026 19:03:30 +0200 Subject: [PATCH] Ansicht: Fenster/Tueren anwaehlbar (openingId an den Oeffnungsflaechen), Waende/Decken auch in der Ansicht waagrecht ziehbar --- src/App.tsx | 8 ++++---- src/plan/toElevation.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a8cf8d27..33b3a799 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1689,11 +1689,11 @@ export default function App() { // 2D-Griff-Editieren (Eckpunkt-/Kanten-Griffe + Feld-Controller) der aktuellen // Auswahl — siehe state/useGripEditing.ts. - // Schnitt-Blatt: geschnittene Wände/Decken lassen sich dort waagrecht entlang - // der Schnittlinie ziehen (s. useGripEditing `sheet`). Nur echte Schnitte — - // die Ansicht trägt keine Bauteil-IDs an ihren Flächen. + // Schnitt-/Ansichts-Blatt: geschnittene (bzw. in der Ansicht sichtbare) + // Wände/Decken lassen sich dort waagrecht entlang der Linie ziehen (s. + // useGripEditing `sheet`). const sectionSheet = useMemo(() => { - if (activeLevel.kind !== "section") return null; + if (activeLevel.kind !== "section" && activeLevel.kind !== "elevation") return null; const plane = sectionPlaneFromLevel(activeLevel); if (!plane) return null; const u = sectionUAxisModel(plane); diff --git a/src/plan/toElevation.ts b/src/plan/toElevation.ts index 05df5809..43a38420 100644 --- a/src/plan/toElevation.ts +++ b/src/plan/toElevation.ts @@ -623,6 +623,8 @@ interface ProjectedOpening { symbol: Array<[[number, number], [number, number]]>; /** Tür (Blatt-Fläche statt Glas, ausser Glas-Blatt). */ isDoor: boolean; + /** Quell-Öffnung (`project.openings[].id`) — Klick in der Ansicht wählt sie. */ + openingId?: string; } /** @@ -724,6 +726,7 @@ function collectOpenings(project: Project, frame: ElevationFrame): ProjectedOpen const v = openingVerticalExtent(project, wall, op); const pr = projectOpeningRect(frame, wall, iv.from, iv.to, v.zBottom, v.zTop, thickness); if (!pr) continue; + pr.openingId = op.id; const w = iv.to - iv.from; const h = v.zTop - v.zBottom; if (op.kind === "door") { @@ -1472,6 +1475,7 @@ export function generateElevationPlan( stroke: EDGE_INK, strokeWidthMm: FRAME_MM, hatch: NO_HATCH, + openingId: op.openingId, }, }); // Sims (Bank + Tropfkante) — verdeckt die Fassade, Kontur. @@ -1486,6 +1490,7 @@ export function generateElevationPlan( stroke: EDGE_INK, strokeWidthMm: EDGE_MM, hatch: NO_HATCH, + openingId: op.openingId, }, }); } @@ -1501,6 +1506,7 @@ export function generateElevationPlan( stroke: EDGE_INK, strokeWidthMm: EDGE_MM, hatch: NO_HATCH, + openingId: op.openingId, }, }); } @@ -1515,6 +1521,7 @@ export function generateElevationPlan( stroke: EDGE_INK, strokeWidthMm: EDGE_MM, hatch: NO_HATCH, + openingId: op.openingId, }, }); } @@ -1530,6 +1537,7 @@ export function generateElevationPlan( stroke: EDGE_INK, strokeWidthMm: EDGE_MM, hatch: NO_HATCH, + openingId: op.openingId, }, }); }