[26][B2] Dach: Innenhöfe (Roof.holes) und Neigung je Kante (Roof.edgePitchDeg), Objekt-Info, Befehl Dachhof
Modell (Rust, ts-rs): Roof.holes (Ringe) und Roof.edgePitchDeg (je Umrisskante, dann Hofkanten; null = Giebel, negativ = Standard, Feld fehlt = wie bisher). roof.rs: custom_roof rechnet über weighted_roof (alle Ringe, Überstand je Kante, Hofringe schrumpfen); ungültige Höfe und Pult fallen auf das bisherige Dach zurück. Dächer ohne die Felder bleiben bitgleich (CLI-SVG/IFC). Plan: Hof als Loch der Dachfläche, Hofkanten als Traufe. 3D: Gehrung an Graten zwischen verschieden geneigten Flächen (Dachschichten bleiben geschlossen). UI: Kantenliste mit Neigung/Giebel im Objekt-Info, Hofliste mit Entfernen, Befehl "Dachhof". Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
24 files changed
+1341
-41
No files matched your search
@@ -8,7 +8,7 @@
|
||||
// Extrahiert aus App.tsx. Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import { applyFillMode } from "./fillMode";
|
||||
import { addItems, fieldOps, opsMutation, patchItem, patchItems, removeItems, setFieldIfChanged } from "../core";
|
||||
import { addItems, fieldOps, opsMutation, patchItem, patchItems, removeItems, removeRoofHole, setFieldIfChanged, setRoofEdge } from "../core";
|
||||
import type { CoreOp } from "../core";
|
||||
import { useMemo, type RefObject } from "react";
|
||||
import type { DrawingLevel, Layout, Project } from "../model/types";
|
||||
@@ -929,8 +929,20 @@ export function usePanelHostBase(opts: {
|
||||
},
|
||||
onOpenOpeningEditor: (id) => setOpeningEditorId(id),
|
||||
// ── Dach-Attribute (nur bei selektiertem Dach) ─────────────────────────
|
||||
onSetRoofPatch: (patch) => {
|
||||
if (selection?.kind === "roof") updateRoof(selection.id, patch);
|
||||
onSetRoofPatch: (patch, coalesceKey) => {
|
||||
if (selection?.kind === "roof") updateRoof(selection.id, patch, coalesceKey);
|
||||
},
|
||||
onSetRoofEdge: (index, spec) => {
|
||||
if (selection?.kind !== "roof") return;
|
||||
const r = (project.roofs ?? []).find((x) => x.id === selection.id);
|
||||
if (!r) return;
|
||||
// Zahl tippen: gleicher Schlüssel je Kante ⇒ ein Undo-Schritt; Giebel-Schalter einzeln.
|
||||
updateRoof(selection.id, setRoofEdge(r, index, spec), spec.kind === "pitch" ? `roof-edge-${selection.id}-${index}` : undefined);
|
||||
},
|
||||
onRemoveRoofHole: (k) => {
|
||||
if (selection?.kind !== "roof") return;
|
||||
const r = (project.roofs ?? []).find((x) => x.id === selection.id);
|
||||
if (r) updateRoof(selection.id, removeRoofHole(r, k));
|
||||
},
|
||||
// ── Schnitt-/Ansichtslinie (nur bei selektierter Linie) ────────────────
|
||||
sectionLine,
|
||||
|
||||
Reference in new issue
Block a user