[280] Träger/Unterzug als eigenes Bauteil: Project.beams, Plan (gestrichelt mit Achse), Schnitt, Ansicht, 3D, IFC IfcBeam, DXF, Befehl traeger, Objekt-Info, Griffe, Beispiel Musterhaus komplex
This commit is contained in:
97 files changed
+1479
-81
No files matched your search
@@ -34,6 +34,7 @@ const CLASS_ORDER: Exclude<ScheduleKind, "Tür">[] = [
|
||||
"Decke",
|
||||
"Dach",
|
||||
"Stütze",
|
||||
"Träger",
|
||||
"Fenster",
|
||||
"Öffnung",
|
||||
"Treppe",
|
||||
@@ -46,6 +47,7 @@ const CLASS_LABEL_KEY: Record<Exclude<ScheduleKind, "Tür">, string> = {
|
||||
Decke: "elements.kind.ceiling",
|
||||
Dach: "elements.kind.roof",
|
||||
Stütze: "elements.kind.column",
|
||||
Träger: "elements.kind.beam",
|
||||
Fenster: "elements.kind.window",
|
||||
Öffnung: "elements.kind.opening",
|
||||
Treppe: "elements.kind.stair",
|
||||
|
||||
@@ -41,7 +41,7 @@ function parseNum(text: string): number | null {
|
||||
|
||||
/** [271] Trägt ein Bauteil oder Raum einen Umbau-Status (sonst bleibt die Wahl „Zustand“ verborgen)? */
|
||||
function hasRenovation(p: Project): boolean {
|
||||
const lists = [p.walls, p.openings, p.ceilings, p.roofs, p.stairs, p.columns, p.extrudedSolids, p.rooms] as Array<readonly { renovation?: unknown }[] | undefined>;
|
||||
const lists = [p.walls, p.openings, p.ceilings, p.roofs, p.stairs, p.columns, p.beams, p.extrudedSolids, p.rooms] as Array<readonly { renovation?: unknown }[] | undefined>;
|
||||
return lists.some((l) => (l ?? []).some((e) => e.renovation !== undefined));
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ const TOOLS_2D: ToolId[] = [
|
||||
"image",
|
||||
];
|
||||
const TOOLS_3D: ToolId[] = ["wall", "ceiling", "window", "door", "stair", "room"];
|
||||
const COMMANDS_3D = ["column", "tree", "circlestotrees", "ceilingopening", "roof", "roofhole", "roofwindow", "dormer", "extrude", "revolve", "loft", "solid", "solidbool", "solidtoparts", "sectionline", "viewline", "ansichten", "autodim", "excavation"];
|
||||
const COMMANDS_3D = ["column", "traeger", "tree", "circlestotrees", "ceilingopening", "roof", "roofhole", "roofwindow", "dormer", "extrude", "revolve", "loft", "solid", "solidbool", "solidtoparts", "sectionline", "viewline", "ansichten", "autodim", "excavation"];
|
||||
const COMMANDS_EDIT = ["move", "copy", "array", "rotate", "mirror", "offset", "multiline", "trim", "break", "split", "extend", "fillet", "chamfer", "join", "defblock", "measure", "erkennen"];
|
||||
|
||||
type ToolsView = "list" | "icons";
|
||||
|
||||
@@ -607,6 +607,11 @@ export interface PanelHostValue {
|
||||
onSetColumnRadius: (radius: number) => void;
|
||||
/** Setzt die Höhe der Stütze (Meter, > 0). */
|
||||
onSetColumnHeight: (height: number) => void;
|
||||
/** [280] Träger: Querschnitt, Profilname und Oberkanten-Versatz (nur bei selektiertem Träger). */
|
||||
onSetBeamWidth: (width: number) => void;
|
||||
onSetBeamHeight: (height: number) => void;
|
||||
onSetBeamTopOffset: (offset: number) => void;
|
||||
onSetBeamProfileName: (name: string) => void;
|
||||
/** Setzt die Drehung der Stütze (Grad; intern in Radiant gespeichert). */
|
||||
onSetColumnRotation: (deg: number) => void;
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
// [280] Träger-Abschnitt der Objekt-Info: Querschnitt (Breite × Höhe), Profilname (nur Text), Versatz der Oberkante
|
||||
// gegenüber der Deckenunterkante (0 = bündig, Unterzug); Länge, Geschoss und aufgelöste UK/OK nur zur Auskunft.
|
||||
|
||||
import { t } from "../../i18n";
|
||||
import type { BeamInfo } from "../../state/selectionInfo";
|
||||
import { usePanelHost } from "../host";
|
||||
import { DimensionField } from "./fields";
|
||||
|
||||
export function BeamSection({ beam, host }: { beam: BeamInfo; host: ReturnType<typeof usePanelHost> }) {
|
||||
return (
|
||||
<>
|
||||
<div className="objinfo-sep" />
|
||||
<div className="objinfo-section-label">{t("objinfo.beam.section")}</div>
|
||||
|
||||
<label className="objinfo-field">
|
||||
<span className="objinfo-flabel">{t("objinfo.beam.profileName")}</span>
|
||||
<input
|
||||
key={beam.profileName ?? ""}
|
||||
type="text"
|
||||
className="objinfo-text"
|
||||
defaultValue={beam.profileName ?? ""}
|
||||
placeholder={t("objinfo.beam.profileName.placeholder")}
|
||||
onBlur={(e) => {
|
||||
if (e.target.value.trim() !== (beam.profileName ?? "")) host.onSetBeamProfileName(e.target.value);
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") (e.target as HTMLInputElement).blur();
|
||||
}}
|
||||
title={t("objinfo.beam.profileName")}
|
||||
/>
|
||||
</label>
|
||||
|
||||
<DimensionField label={t("objinfo.beam.width")} value={beam.width} onCommit={(v) => host.onSetBeamWidth(v)} />
|
||||
<DimensionField label={t("objinfo.beam.height")} value={beam.height} onCommit={(v) => host.onSetBeamHeight(v)} />
|
||||
<DimensionField label={t("objinfo.beam.topOffset")} value={beam.topOffset} onCommit={(v) => host.onSetBeamTopOffset(v)} />
|
||||
|
||||
<div className="objinfo-field">
|
||||
<span className="objinfo-flabel">{t("objinfo.beam.length")}</span>
|
||||
<span className="objinfo-fval">{beam.length.toFixed(2)} m</span>
|
||||
</div>
|
||||
<div className="objinfo-field">
|
||||
<span className="objinfo-flabel">{t("objinfo.beam.level")}</span>
|
||||
<span className="objinfo-fval">
|
||||
{beam.zBottom.toFixed(2)} – {beam.zTop.toFixed(2)} m
|
||||
</span>
|
||||
</div>
|
||||
<div className="objinfo-field">
|
||||
<span className="objinfo-flabel">{t("objinfo.beam.floor")}</span>
|
||||
<span className="objinfo-fval">{beam.floorName}</span>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import { RoomSection } from "./RoomSection";
|
||||
import { RoomStampSection } from "./RoomStampSection";
|
||||
import { SectionLineSection } from "./SectionLineSection";
|
||||
import { ColumnSection, ExtrudedSolidSection } from "./SolidSections";
|
||||
import { BeamSection } from "./BeamSection";
|
||||
import { StairSection } from "./StairSection";
|
||||
import { WallSection } from "./WallSection";
|
||||
import { infoGroups, type InfoGroupId } from "./groups";
|
||||
@@ -54,6 +55,7 @@ export function InfoGroups({ sel, drawing, host }: { sel: SelectionInfo | null;
|
||||
case "roomStamp": return sel?.room ? <RoomStampSection roomId={sel.id} /> : null;
|
||||
case "extrudedSolid": return sel?.extrudedSolid ? <ExtrudedSolidSection solid={sel.extrudedSolid} host={host} /> : null;
|
||||
case "column": return sel?.column ? <ColumnSection column={sel.column} host={host} /> : null;
|
||||
case "beam": return sel?.beam ? <BeamSection beam={sel.beam} host={host} /> : null;
|
||||
case "detailRef": return sel?.detailRef ? <DetailRefSection detailRef={sel.detailRef} drawingId={sel.id} host={host} /> : null;
|
||||
case "dimRefs": return sel?.dimRefs ? <DimRefsSection refs={sel.dimRefs} drawingId={sel.id} host={host} /> : null;
|
||||
case "dimText": return sel ? <DimTextSection drawingId={sel.id} host={host} /> : null;
|
||||
|
||||
@@ -21,6 +21,7 @@ export type InfoGroupId =
|
||||
| "roomStamp"
|
||||
| "extrudedSolid"
|
||||
| "column"
|
||||
| "beam"
|
||||
| "detailRef"
|
||||
| "dimRefs"
|
||||
| "dimText"
|
||||
@@ -45,6 +46,7 @@ export const INFO_GROUP_TITLE: Record<InfoGroupId, TranslationKey> = {
|
||||
roomStamp: "roomStamp.title",
|
||||
extrudedSolid: "objinfo.extrudedSolid.section",
|
||||
column: "objinfo.column.section",
|
||||
beam: "objinfo.beam.section",
|
||||
detailRef: "objinfo.detailRef.section",
|
||||
dimRefs: "objinfo.dimRefs.section",
|
||||
dimText: "objinfo.dimText.section",
|
||||
@@ -89,6 +91,7 @@ export function infoGroups(c: InfoGroupContext): InfoGroupId[] {
|
||||
if (sel.room) out.push("room", "roomStamp");
|
||||
if (sel.extrudedSolid) out.push("extrudedSolid");
|
||||
if (sel.column) out.push("column");
|
||||
if (sel.beam) out.push("beam");
|
||||
if (sel.detailRef) out.push("detailRef");
|
||||
if (sel.dimRefs) out.push("dimRefs");
|
||||
if (sel.dimTextMoved) out.push("dimText");
|
||||
|
||||
Reference in new issue
Block a user