[95] Fenster/Türen: Schiebe-, Hebeschiebe-, Pendeltür, Oberlicht-Einteilung, Typen-Bibliothek

Türtyp kind hebeschiebe/pendel neu, schiebe wird gezeichnet (Grundriss nach SIA, Schnitt,
Ansicht, 3D, IFC-OperationType). Tür-Oberlicht in der Ansicht. Fenster transomSashes
(Pfosten/Riegel im Oberlicht) in Ansicht und 3D. Vorlagen in opening_presets.rs, in den
Ressourcen-Tabs über „Aus Bibliothek…“.
This commit is contained in:
Claude committed 2026-10-29 22:51:49 +00:00
1 parent 754ed4d3c2
commit 85e2f63b20
27 files changed
+874 -124

No files matched your search

+10 -2
View File
@@ -6,6 +6,7 @@ import { t } from "../../i18n";
import { FieldRow, NumberField, Segmented, SelectField } from "./fields";
import { INSET_FACE_OPTIONS, TypeLibraryTab } from "./TypeLibraryTab";
import { ElevationPreview } from "../ElevationPreview";
import { openingTypePresets } from "../../model/openingPresets";
/**
* Synthetische Öffnungs-Instanz NUR für die Vorschau — s. WindowStylesTab.
@@ -30,6 +31,8 @@ const DOOR_KIND_OPTIONS: { value: DoorType["kind"]; labelKey: string }[] = [
{ value: "dreh", labelKey: "resources.doorKind.dreh" },
{ value: "schiebe", labelKey: "resources.doorKind.schiebe" },
{ value: "wandoeffnung", labelKey: "resources.doorKind.wandoeffnung" },
{ value: "hebeschiebe", labelKey: "resources.doorKind.hebeschiebe" },
{ value: "pendel", labelKey: "resources.doorKind.pendel" },
];
const DOOR_LEAF_STYLE_OPTIONS: { value: DoorType["leafStyle"]; labelKey: string }[] = [
@@ -50,7 +53,7 @@ export function DoorStylesTab({
onDeleteDoorType,
}: {
project: Project;
onAddDoorType?: () => void;
onAddDoorType?: (preset?: DoorType) => void;
onPatchDoorType?: (id: string, patch: Partial<DoorType>) => void;
onDeleteDoorType?: (id: string) => void;
}) {
@@ -61,7 +64,12 @@ export function DoorStylesTab({
emptyKey="resources.doorTypes.empty"
placeholderKey="resources.doorTypes.placeholder"
deleteKeyPrefix="resources.delete.doorType"
onAdd={onAddDoorType}
onAdd={() => onAddDoorType?.()}
presets={openingTypePresets().doorTypes.map((p) => ({ id: p.id, label: t(`preset.${p.id}`) }))}
onAddPreset={(id) => {
const p = openingTypePresets().doorTypes.find((x) => x.id === id);
if (p) onAddDoorType?.({ ...p, name: t(`preset.${p.id}`) });
}}
onPatch={onPatchDoorType}
onDelete={onDeleteDoorType}
renderFields={(door, patch) => (
+20
View File
@@ -26,6 +26,8 @@ export function TypeLibraryTab<T extends { id: string; name: string }>({
placeholderKey,
deleteKeyPrefix,
onAdd,
presets,
onAddPreset,
onPatch,
onDelete,
renderFields,
@@ -36,6 +38,9 @@ export function TypeLibraryTab<T extends { id: string; name: string }>({
placeholderKey: string;
deleteKeyPrefix: string;
onAdd?: () => void;
/** Vorlagen aus der Typen-Bibliothek ([95]); Auswahl legt eine Kopie an. */
presets?: { id: string; label: string }[];
onAddPreset?: (presetId: string) => void;
onPatch?: (id: string, patch: Partial<T>) => void;
onDelete?: (id: string) => void;
renderFields: (item: T, onPatch: (patch: Partial<T>) => void) => React.ReactNode;
@@ -64,6 +69,21 @@ export function TypeLibraryTab<T extends { id: string; name: string }>({
<button className="res-add" onClick={() => onAdd?.()}>
<span className="res-add-plus">+</span> {t("resources.add")}
</button>
{presets && presets.length > 0 && onAddPreset && (
<select
className="res-input res-add-preset"
value=""
title={t("resources.addPreset.hint")}
onChange={(e) => e.target.value && onAddPreset(e.target.value)}
>
<option value="">{t("resources.addPreset")}</option>
{presets.map((p) => (
<option key={p.id} value={p.id}>
{p.label}
</option>
))}
</select>
)}
</div>
</div>
<div className="res-md-detail">
+8 -2
View File
@@ -6,6 +6,7 @@ import { t } from "../../i18n";
import { FieldRow, NumberField, SelectField } from "./fields";
import { INSET_FACE_OPTIONS, TypeLibraryTab } from "./TypeLibraryTab";
import { ElevationPreview } from "../ElevationPreview";
import { openingTypePresets } from "../../model/openingPresets";
/**
* Synthetische Öffnungs-Instanz NUR für die Vorschau: `ElevationPreview`
@@ -56,7 +57,7 @@ export function WindowStylesTab({
onDeleteWindowType,
}: {
project: Project;
onAddWindowType?: () => void;
onAddWindowType?: (preset?: WindowType) => void;
onPatchWindowType?: (id: string, patch: Partial<WindowType>) => void;
onDeleteWindowType?: (id: string) => void;
}) {
@@ -67,7 +68,12 @@ export function WindowStylesTab({
emptyKey="resources.windowTypes.empty"
placeholderKey="resources.windowTypes.placeholder"
deleteKeyPrefix="resources.delete.windowType"
onAdd={onAddWindowType}
onAdd={() => onAddWindowType?.()}
presets={openingTypePresets().windowTypes.map((p) => ({ id: p.id, label: t(`preset.${p.id}`) }))}
onAddPreset={(id) => {
const p = openingTypePresets().windowTypes.find((x) => x.id === id);
if (p) onAddWindowType?.({ ...p, name: t(`preset.${p.id}`) });
}}
onPatch={onPatchWindowType}
onDelete={onDeleteWindowType}
renderFields={(win, patch) => (