[105][103][G3][106][97] Merge: Fenster/Türen-Restpunkte (Rahmendetail in der Ansicht, Türblatt im Falz, Pfostenbreite, Dachfenster-Griffe/Info/Liste, Formöffnung in der Projektion, Schnitt parallel durch die Leibung)

Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
Claude committed 2026-10-30 05:07:21 +00:00
commit 0cd8a4d58e
34 files changed
+1229 -72

No files matched your search

+2 -1
View File
@@ -716,13 +716,14 @@ export function createProjectSlice(
const removedWallIds = new Set(
p.walls.filter((w) => w.floorId === id).map((w) => w.id),
);
const removedCeilingIds = new Set((p.ceilings ?? []).filter((c) => c.floorId === id).map((c) => c.id));
return [
...fieldOps(p, "drawingLevels", recomputeFloorElevations(p.drawingLevels.filter((z) => z.id !== id))),
...removeItems(p, "walls", removedWallIds),
...removeItems(p, "ceilings", (c) => c.floorId === id),
...removeItems(p, "stairs", (s) => s.floorId === id),
...removeItems(p, "rooms", (r) => r.floorId === id),
...removeItems(p, "openings", (o) => removedWallIds.has(o.hostWallId)),
...removeItems(p, "openings", (o) => removedWallIds.has(o.hostWallId) || (!!o.hostCeilingId && removedCeilingIds.has(o.hostCeilingId))),
];
});
},
+5
View File
@@ -225,6 +225,11 @@ export interface OpeningInfo {
frameViewLine?: { color?: string; weight?: number };
sashLine?: { color?: string; weight?: number };
sillLineStyle?: { color?: string; weight?: number };
/** Dach-/Deckenfenster ([103]): Wirt und Lage (dann ohne Wirts-Wand). */
hostRoofId?: string;
hostCeilingId?: string;
hostPoint?: { x: number; y: number };
hostAngle?: number;
}
/**
+15 -1
View File
@@ -9,7 +9,7 @@ import { useRef, useState, type RefObject } from "react";
import { add, dot, leftNormal, normalize, scale, sub, wallCorners } from "../model/geometry";
import type { Ceiling, Drawing2D, EdgeGrip, Project, Room, Stair, Vec2 } from "../model/types";
import { wallTypeThickness } from "../model/types";
import { bulgeArcPoints, drawingVertices } from "../core";
import { bulgeArcPoints, drawingVertices, surfaceOpeningGripPatch, surfaceOpeningGrips, surfaceOpeningInfo } from "../core";
import { gripDrawingIdsFor } from "./gripLimits";
import { openEdges, polylineEdgeGrips, ringEdges } from "../core";
import { areaMovePreview, drawingMovePreview } from "../tools/transform";
@@ -248,6 +248,14 @@ export function useGripEditing(opts: {
}
if (selectedOpeningId && modelEditable) {
const op = (project.openings ?? []).find((o) => o.id === selectedOpeningId);
// Dach-/Deckenfenster ([103]): Mitte (verschieben), Breite quer, Höhe im Gefälle.
if (op && (op.hostRoofId || op.hostCeilingId)) {
const info = surfaceOpeningInfo(project, op.id);
if (!info) return [];
const pts = surfaceOpeningGrips(info, op.width, op.height);
pts.forEach((_, i) => { gripOwners.push({ localIndex: i }); gripOwnerRange.push([0, pts.length - 1]); });
return pts;
}
const w = op && project.walls.find((x) => x.id === op.hostWallId);
if (op && w) {
const axis = normalize(sub(w.end, w.start));
@@ -872,6 +880,12 @@ export function useGripEditing(opts: {
// width/2 abziehen; auf [0, Wandlänge − Breite] klemmen (Öffnung bleibt drin).
if (selectedOpeningId) {
const op = (project.openings ?? []).find((o) => o.id === selectedOpeningId);
if (op && (op.hostRoofId || op.hostCeilingId)) {
const info = op.locked ? null : surfaceOpeningInfo(project, op.id);
const patch = info && surfaceOpeningGripPatch(info, index, pt);
if (patch) updateOpening(op.id, patch);
return;
}
const w = op && project.walls.find((x) => x.id === op.hostWallId);
if (op && w) {
const d = sub(w.end, w.start);
+3
View File
@@ -888,6 +888,9 @@ export function usePanelHostBase(opts: {
onSetOpeningLintelLines: (lintelLines) => {
if (selection?.kind === "opening") updateOpening(selection.id, { lintelLines });
},
onSetOpeningHost: (patch) => {
if (selection?.kind === "opening") updateOpening(selection.id, patch);
},
onSetOpeningDetailLevel: (detailLevel) => {
if (selection?.kind === "opening") updateOpening(selection.id, { detailLevel });
},