[G3][100] Formöffnungen (Rundbogen, Segment-/Spitzbogen, rund, schräg, Giebel) und Dachfenster/Deckenöffnungen

[G3] Opening.shape + shapeRise (Rust-Modell, Typen generiert). Kern opening_shape.rs: konvexer Umriss
im Öffnungsrechteck; Wand behält das Rechteck-Loch, Füllkörper (Streifen-Quader) schliessen den Rest.
Schnitt: Wandband bis an den Umriss, Rahmen/Glas auf lichter Höhe, kein Sturz/Storenkasten bei Formen.
Ansicht: Rahmen als Umriss, Glas eingerückt, Wandrest in Wandfarbe. 3D: Rahmen-Ring, Glas/Türblatt entlang
des Umrisses. IFC: neuer Datensatz OPENING_SOLID (Profil-Extrusion quer durch die Wand, Füllung als Netz).
Dialog „Fenster bearbeiten": Form + Stich.

[100] Öffnungen mit Wirt Dach/Decke: hostRoofId/hostCeilingId, hostPoint, hostAngle. Dachfenster schneiden
alle Dachschichten (3D dicht, Live-Schnitt, Schnitt), Rahmen/Glas/Eindeckrahmen, Grundriss gestrichelt,
Ansicht, IFC (IfcOpeningElement im IfcRoof/IfcSlab + IfcWindow). Deckenöffnungen als Aussparung.
Befehl „Dachfenster" (roofwindow). Beide Teile teilen opening_shape.rs und den IFC-Datensatz, daher ein Commit.
This commit is contained in:
Claude committed 2026-10-29 23:58:52 +00:00
1 parent a385997282
commit 38d5f9505a
21 files changed
+1805 -65

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
// Dachfenster ([100]) als Engine-Befehl: ein Klick setzt ein Fenster (78 × 118 cm, in der Dachebene
// gemessen) mit seiner Mitte an den Punkt — in das Dach, dessen Umriss den Punkt enthält (Dächer des
// aktiven Geschosses zuerst), sonst als Oberlicht in die Decke des Geschosses. Die Öffnung schneidet
// alle Schichten (Kern: `cmd_solid.rs::roof_window_ops`, Geometrie `opening_shape.rs`).
import { createMutation } from "../createCore";
import type { Command, CommandResult, CommandState } from "../types";
const idle = (): [CommandState, CommandResult] => [{ phase: "start", lastPoint: null }, { draft: null, done: true }];
export const roofWindowCommand: Command = {
name: "roofwindow",
labelKey: "cmd.roofWindow.label",
floorOnly: true,
prompt: () => "cmd.roofWindow.start",
accepts: () => ["point"],
options: () => [],
init: (): CommandState => ({ phase: "start", lastPoint: null }),
onInput: (state, input, ctx): [CommandState, CommandResult] => {
if (input.kind !== "point") return [state, { draft: null }];
return [
{ phase: "start", lastPoint: input.point },
{ draft: null, commit: createMutation(ctx, { cmd: "roofWindow", p: input.point }) },
];
},
onMove: (state, point): [CommandState, CommandResult] => [
state,
{ draft: { preview: [{ kind: "poly", pts: [point], closed: false }], vertices: [point] } },
],
onConfirm: (): [CommandState, CommandResult] => idle(),
onCancel: (): [CommandState, CommandResult] => idle(),
};
+4
View File
@@ -18,6 +18,7 @@ import { solidCommand } from "./cmds/solid";
import { solidBoolCommand } from "./cmds/solidbool";
import { voidBoxCommand } from "./cmds/voidbox";
import { ceilingOpeningCommand } from "./cmds/ceilingOpening";
import { roofWindowCommand } from "./cmds/roofWindow";
import { roofHoleCommand } from "./cmds/roofHole";
import { roomCommand } from "./cmds/room";
import { rectCommand } from "./cmds/rect";
@@ -78,6 +79,7 @@ export const COMMANDS: Record<string, Command> = {
solidbool: solidBoolCommand,
voidbox: voidBoxCommand,
ceilingopening: ceilingOpeningCommand,
roofwindow: roofWindowCommand,
roofhole: roofHoleCommand,
room: roomCommand,
line: lineCommand,
@@ -161,6 +163,8 @@ export const ALIASES: Record<string, string> = {
body: "solid",
deckenloch: "ceilingopening",
aussparung: "ceilingopening",
dachfenster: "roofwindow",
oberlicht: "roofwindow",
dachhof: "roofhole",
lichthof: "roofhole",
rf: "roof",
+13
View File
@@ -570,6 +570,16 @@ export const de = {
"oed.f.width": "Breite (m)",
"oed.f.height": "Höhe (m)",
"oed.f.sillHeight": "Brüstungshöhe (m)",
"oed.f.shape": "Form",
"oed.f.shapeRise": "Stich / Höhe der Form (m)",
"oed.shapeNote": "Formöffnung: Schnitt, Ansicht, 3D und IFC folgen dem Umriss. Anschlag, Sturz, Storenkasten und Flügelteilung gelten nur für Rechtecke.",
"oed.shape.rechteck": "Rechteck",
"oed.shape.rundbogen": "Rundbogen",
"oed.shape.segmentbogen": "Segmentbogen",
"oed.shape.spitzbogen": "Spitzbogen",
"oed.shape.rund": "Rund / oval",
"oed.shape.schraeg": "Schräg",
"oed.shape.giebel": "Giebel (spitz)",
"oed.f.position": "Position (m)",
"oed.f.frameThickness": "Rahmenstärke quer (m)",
"oed.f.frameDepth": "Rahmentiefe (m)",
@@ -1346,6 +1356,8 @@ export const de = {
"cmd.roof.label": "Dach",
"cmd.roof.start": "Erste Dachecke:",
"cmd.roof.corner": "Gegenecke:",
"cmd.roofWindow.label": "Dachfenster",
"cmd.roofWindow.start": "Mitte des Dachfensters (in einer Dachfläche, sonst Oberlicht in der Decke):",
"cmd.ceilingOpening.label": "Deckenloch",
"cmd.ceilingOpening.start": "Erste Ecke der Aussparung (in einer Decke):",
"cmd.ceilingOpening.corner": "Gegenecke:",
@@ -2586,6 +2598,7 @@ export const de = {
"history.cmd.block": "Block einfügen",
"history.cmd.break": "Auftrennen",
"history.cmd.ceiling": "Decke zeichnen",
"history.cmd.roofWindow": "Dachfenster",
"history.cmd.ceilingOpening": "Deckenöffnung",
"history.cmd.chamfer": "Fase",
"history.cmd.circle": "Kreis zeichnen",
+13
View File
@@ -569,6 +569,16 @@ export const en: Record<TranslationKey, string> = {
"oed.f.width": "Width (m)",
"oed.f.height": "Height (m)",
"oed.f.sillHeight": "Sill height (m)",
"oed.f.shape": "Shape",
"oed.f.shapeRise": "Rise of the shape (m)",
"oed.shapeNote": "Shaped opening: section, elevation, 3D and IFC follow the outline. Rebate, lintel, blind box and sash division apply to rectangles only.",
"oed.shape.rechteck": "Rectangle",
"oed.shape.rundbogen": "Round arch",
"oed.shape.segmentbogen": "Segmental arch",
"oed.shape.spitzbogen": "Pointed arch",
"oed.shape.rund": "Round / oval",
"oed.shape.schraeg": "Sloped",
"oed.shape.giebel": "Gable (pointed)",
"oed.f.position": "Position (m)",
"oed.f.frameThickness": "Frame depth across (m)",
"oed.f.frameDepth": "Frame depth (m)",
@@ -1335,6 +1345,8 @@ export const en: Record<TranslationKey, string> = {
"cmd.roof.label": "Roof",
"cmd.roof.start": "First roof corner:",
"cmd.roof.corner": "Opposite corner:",
"cmd.roofWindow.label": "Roof window",
"cmd.roofWindow.start": "Centre of the roof window (in a roof face, otherwise skylight in the ceiling):",
"cmd.ceilingOpening.label": "Slab opening",
"cmd.ceilingOpening.start": "First corner of the opening (inside a slab):",
"cmd.ceilingOpening.corner": "Opposite corner:",
@@ -2572,6 +2584,7 @@ export const en: Record<TranslationKey, string> = {
"history.cmd.block": "Insert block",
"history.cmd.break": "Break",
"history.cmd.ceiling": "Draw ceiling",
"history.cmd.roofWindow": "Roof window",
"history.cmd.ceilingOpening": "Ceiling opening",
"history.cmd.chamfer": "Chamfer",
"history.cmd.circle": "Draw circle",
+32
View File
@@ -1647,6 +1647,38 @@ export type Opening = {
* Fenstertyp dort eine Sims-Linie aktiviert hat.
*/
sillLineStyle?: LineStyleOverride;
/**
* Umriss der Öffnung in der Wandebene ([G3]); fehlt ⇒ Rechteck. Bestimmt den Wandausschnitt
* (Schnitt, Ansicht, 3D, IFC-Öffnungskörper); der Grundriss bleibt beim SIA-Symbol. Die
* Öffnung füllt ihr Rechteck `width × height`; Bogen/Schräge liegen oben (Rund: Ellipse darin).
*/
shape?: "rechteck" | "rundbogen" | "segmentbogen" | "spitzbogen" | "rund" | "schraeg" | "giebel";
/**
* Stichhöhe der Form in Metern ([G3]): Segmentbogen = Bogenstich (Default Breite/6), Spitzbogen =
* Höhe über dem Kämpfer (≥ Breite/2, Default gleichseitig), Giebel = Höhe des Dreiecks (Default
* Breite/2), Schräg = Höhenunterschied links→rechts (> 0 rechts höher, Default Breite/2).
* Rundbogen/Rund/Rechteck ignorieren es.
*/
shapeRise?: number;
/**
* Wirt Dach ([100], Dachfenster): Öffnung in einer Dachfläche; `hostWallId` bleibt leer. Lage
* über {@link hostPoint}; `width` quer zum Gefälle, `height` entlang des Gefälles (in der
* Dachebene gemessen); `position`/`sillHeight` gelten nicht.
*/
hostRoofId?: string;
/**
* Wirt Decke ([100], Deckenöffnung mit Oberlicht): Öffnung in einer Decke, Lage über
* {@link hostPoint}, `width` × `height` waagrecht (gedreht um {@link hostAngle}).
*/
hostCeilingId?: string;
/** Nur Dach-/Deckenwirt ([100]): Mittelpunkt der Öffnung im Grundriss (Meter). */
hostPoint?: Vec2;
/**
* Nur Dach-/Deckenwirt ([100]): Drehung der Breitenrichtung im Grundriss in Grad, wo die
* Fläche waagrecht ist (Decke, Flachdach); geneigte Dachflächen richten die Breite längs der
* Traufe aus. Fehlt ⇒ 0 (x-Achse).
*/
hostAngle?: number;
};
/**
+1 -1
View File
@@ -355,7 +355,7 @@ const TOOLS_2D: ToolId[] = [
"image",
];
const TOOLS_3D: ToolId[] = ["wall", "ceiling", "window", "door", "stair", "room"];
const COMMANDS_3D = ["column", "ceilingopening", "roof", "roofhole", "extrude", "solid", "solidbool", "sectionline", "viewline", "autodim"];
const COMMANDS_3D = ["column", "ceilingopening", "roof", "roofhole", "roofwindow", "extrude", "solid", "solidbool", "sectionline", "viewline", "autodim"];
const COMMANDS_EDIT = ["move", "copy", "array", "rotate", "mirror", "offset", "multiline", "trim", "break", "extend", "fillet", "chamfer", "join", "defblock", "measure"];
type ToolsView = "list" | "icons";
+33
View File
@@ -425,10 +425,43 @@ function GroessePanel({
min={0}
onCommit={(n) => onPatchOpening({ position: n })}
/>
{/* [G3] Umrissform (Wandausschnitt in Schnitt, Ansicht, 3D, IFC; Grundriss bleibt SIA-Symbol). */}
<SelField<OpeningShapeValue>
label={t("oed.f.shape")}
value={opening.shape ?? "rechteck"}
options={OPENING_SHAPE_OPTS()}
onChange={(v) => onPatchOpening({ shape: v === "rechteck" ? undefined : v, shapeRise: undefined })}
/>
{(opening.shape === "segmentbogen" ||
opening.shape === "spitzbogen" ||
opening.shape === "schraeg" ||
opening.shape === "giebel") && (
<NumField
label={t("oed.f.shapeRise")}
value={opening.shapeRise ?? defaultShapeRise(opening)}
onCommit={(n) => onPatchOpening({ shapeRise: n })}
/>
)}
{opening.shape && opening.shape !== "rechteck" && <p className="oed-hint">{t("oed.shapeNote")}</p>}
</>
);
}
type OpeningShapeValue = NonNullable<Opening["shape"]>;
/** Stich ohne Angabe wie im Kern (`opening_shape::outline`). */
function defaultShapeRise(o: Opening): number {
const w = o.width;
const r = o.shape === "segmentbogen" ? w / 6 : o.shape === "spitzbogen" ? (w * Math.sqrt(3)) / 2 : w / 2;
return Math.round(r * 1000) / 1000;
}
const OPENING_SHAPE_OPTS = (): { value: OpeningShapeValue; label: string }[] =>
(["rechteck", "rundbogen", "segmentbogen", "spitzbogen", "rund", "schraeg", "giebel"] as const).map((v) => ({
value: v,
label: t(`oed.shape.${v}`),
}));
function RahmenPanel({
isDoor,
wt,
+9
View File
@@ -190,6 +190,15 @@ export function CommandIcon({ name }: { name: string }) {
<rect x="6" y="6.5" width="4" height="3" strokeDasharray="1.4 1.2" />
</svg>
);
case "roofwindow":
// Dachfenster: Dachfläche mit Fensterrahmen und Glas.
return (
<svg {...common}>
<polygon points="2,12 5,4 11,4 14,12" />
<rect x="6.2" y="6" width="3.6" height="4" />
<line x1="6.2" y1="8" x2="9.8" y2="8" />
</svg>
);
case "ceilingopening":
// Deckenloch: Decken-Rechteck mit ausgespartem Innenrechteck.
return (