[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
@@ -8,7 +8,7 @@ import { patchItem, setField } from "../core/opsBuild";
|
||||
import type { DesignOption, DesignOptionCombination, DesignOptionRef, DesignOptionSet, DrawingLevel, Project } from "./types";
|
||||
|
||||
/** Listen, deren Elemente einer Variante angehören können (gleich wie `design_options::COLLECTIONS`). */
|
||||
export const DESIGN_OPTION_COLLECTIONS = ["walls", "openings", "ceilings", "roofs", "stairs", "columns", "extrudedSolids", "rooms", "drawings2d"] as const;
|
||||
export const DESIGN_OPTION_COLLECTIONS = ["walls", "openings", "ceilings", "roofs", "stairs", "columns", "beams", "extrudedSolids", "rooms", "drawings2d"] as const;
|
||||
export type DesignOptionCollection = (typeof DESIGN_OPTION_COLLECTIONS)[number];
|
||||
|
||||
/** Kombination: Satz-Id → Varianten-Id. */
|
||||
@@ -523,7 +523,10 @@ export function designOptionLocked(project: Project, edit: DesignOptionTarget |
|
||||
if (OUTSIDE_KINDS.has(kind)) return true;
|
||||
const coll = KIND_COLLECTION[kind];
|
||||
if (!coll) return false;
|
||||
const e = ((project[coll] ?? []) as { id: string; designOption?: DesignOptionRef; hostWallId?: string }[]).find((x) => x.id === id);
|
||||
type El = { id: string; designOption?: DesignOptionRef; hostWallId?: string };
|
||||
// [280] Träger liegen im Auswahlkanal der Stützen.
|
||||
const pool = ((project[coll] ?? []) as El[]).concat(coll === "columns" ? ((project.beams ?? []) as El[]) : []);
|
||||
const e = pool.find((x) => x.id === id);
|
||||
if (!e) return false;
|
||||
const r = e.designOption ?? (coll === "openings" ? project.walls.find((w) => w.id === e.hostWallId)?.designOption : undefined);
|
||||
return !(r && r.set === edit.set && r.option === edit.option);
|
||||
|
||||
@@ -16,7 +16,7 @@ export const RENOVATION_STATUSES: readonly RenovationStatus[] = ["existing", "de
|
||||
* Listen mit Umbau-Status (Räume nur Sichtbarkeit/Flächen, keine Farbe). `drawings2d`: Möbel und Symbole der Bibliothek
|
||||
* (ohne Angabe = Bestand) sowie 2D-Elemente mit ausdrücklichem Status (Linienwerk, Masse …; Kern `drawing_takes_part`).
|
||||
*/
|
||||
export const RENOVATION_COLLECTIONS = ["walls", "openings", "ceilings", "roofs", "stairs", "columns", "extrudedSolids", "rooms", "drawings2d"] as const;
|
||||
export const RENOVATION_COLLECTIONS = ["walls", "openings", "ceilings", "roofs", "stairs", "columns", "beams", "extrudedSolids", "rooms", "drawings2d"] as const;
|
||||
export type RenovationCollection = (typeof RENOVATION_COLLECTIONS)[number];
|
||||
|
||||
/**
|
||||
@@ -270,6 +270,7 @@ const SELECTION_KEY: Record<RenovationCollection, string> = {
|
||||
roofs: "roofs",
|
||||
stairs: "stairs",
|
||||
columns: "columns",
|
||||
beams: "columns", // [280] Träger liegen im Auswahlkanal der Stützen
|
||||
extrudedSolids: "solids",
|
||||
rooms: "rooms",
|
||||
drawings2d: "drawings",
|
||||
@@ -299,7 +300,7 @@ export function idsByRenovationStatus(
|
||||
if (opts.phase !== undefined && (r?.phase ?? "") !== opts.phase) continue;
|
||||
ids.push(e.id);
|
||||
}
|
||||
if (ids.length) out[SELECTION_KEY[c]] = ids;
|
||||
if (ids.length) out[SELECTION_KEY[c]] = [...(out[SELECTION_KEY[c]] ?? []), ...ids];
|
||||
}
|
||||
const trees = (project.trees ?? []).filter((t) => treeRenovationStatus(t) === status && (!opts.floorId || t.floorId === opts.floorId) && (opts.phase === undefined || opts.phase === "")).map((t) => t.id);
|
||||
if (trees.length) out.trees = trees;
|
||||
|
||||
@@ -504,6 +504,12 @@ const columns: NonNullable<Project["columns"]> = [
|
||||
{ id: "st-ug-1", type: "column", floorId: "ug", categoryCode: "25", position: P(10.0, 2.6), profile: { kind: "round", radius: 0.15 }, rotation: 0, height: H.ug, componentId: "std-c-stahlbeton" },
|
||||
];
|
||||
|
||||
// [280] Unterzug im EG-Wohnraum (Spannweite 6 m, Wand x = 0 bis Wand x = 6): 30 × 45 cm, Oberkante bündig an der
|
||||
// Deckenunterkante des EG, Stahlbeton; im Schnitt A-A quer geschnitten, im Grundriss über der Schnitthöhe gestrichelt.
|
||||
const beams: NonNullable<Project["beams"]> = [
|
||||
{ id: "tg-eg-1", type: "beam", floorId: "eg", categoryCode: "25", start: P(HA, 2.5), end: P(6 - 0.075, 2.5), width: 0.3, height: 0.45, profileName: "Unterzug 30/45", componentId: "std-c-stahlbeton" },
|
||||
];
|
||||
|
||||
/** [269] Klasse der Umgebungs-Körper (Brunnen, Pflanzgefäss, Sitzrolle): Objektbibliothek-Klasse „Fahrzeuge & Freiflächen". */
|
||||
const GARDEN_CLASS = "24";
|
||||
|
||||
@@ -870,6 +876,7 @@ export function buildComplexSampleProject(): Project {
|
||||
stairs,
|
||||
rooms: [],
|
||||
columns,
|
||||
beams,
|
||||
extrudedSolids,
|
||||
drawings2d: [...cadastre(), ...annotations()],
|
||||
context: [
|
||||
|
||||
@@ -27,6 +27,97 @@ export type Align = "left" | "center" | "right" | "justify";
|
||||
*/
|
||||
export type AttributeSource = "layer" | "object";
|
||||
|
||||
/**
|
||||
* [280] Ein Träger/Unterzug (Beam) — geschossgebundenes Tragwerk-Bauteil (Kategorie „50"): Achse
|
||||
* `start` → `end` im Grundriss, rechteckiger Querschnitt `width` × `height` (Aussenmasse; `profileName`
|
||||
* ist nur ein Text wie „HEB 200", gezeichnet wird das Rechteck). Oberkante = Unterkante der Decke darüber
|
||||
* (höchstens die Geschoss-Oberkante) plus `topOffset`; bündig (0) ⇒ Unterzug. Wird wie eine Stütze
|
||||
* ausgewertet (`Beam::as_column`), liegt aber in `Project.beams`; im Auswahlkanal der Stützen.
|
||||
*/
|
||||
export type Beam = {
|
||||
id: string;
|
||||
type: "beam";
|
||||
/** Zugehörige Zeichnungsebene (Geschoss). */
|
||||
floorId: string;
|
||||
/** Grafik-Kategorie (Ebene), z. B. "50" für Tragwerk. */
|
||||
categoryCode: string;
|
||||
/**
|
||||
* [201] IFC-GlobalId des Quell-Bauteils (IFC-Import); der IFC-Export schreibt sie zurück, damit
|
||||
* die Rundreise dieselben GUIDs behält. Kopien (Einfügen, Kopieren, Reihe, Wand teilen) tragen sie NICHT.
|
||||
*/
|
||||
ifcGlobalId?: string;
|
||||
/** Objekt-Sperre, analog `Wall.locked`. */
|
||||
locked?: boolean;
|
||||
/** Achse: Anfangspunkt im Grundriss (Meter). */
|
||||
start: Vec2;
|
||||
/** Achse: Endpunkt im Grundriss (Meter). */
|
||||
end: Vec2;
|
||||
/** Querschnittsbreite (quer zur Achse, Meter, > 0). */
|
||||
width: number;
|
||||
/** Querschnittshöhe (Meter, > 0), nach unten ab der Oberkante. */
|
||||
height: number;
|
||||
/**
|
||||
* Profilname als Text (z. B. „HEB 200", „BSH 20/40"); ohne Wirkung auf die Geometrie, geht in Liste und IFC.
|
||||
*/
|
||||
profileName?: string;
|
||||
/**
|
||||
* Versatz der Oberkante gegenüber der Unterkante der Decke darüber (Meter, + nach oben in die Decke).
|
||||
* Fehlt ⇒ 0: bündig, Unterzug.
|
||||
*/
|
||||
topOffset?: number;
|
||||
/** Optionales tragendes Bauteil (Component) für Poché/3D-Farbe/Schraffur. */
|
||||
componentId?: string;
|
||||
/**
|
||||
* Optionale Übersteuerung der Strich-/Umrandungsfarbe; sonst gilt die
|
||||
* Kategorie-Farbe.
|
||||
*/
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Attribut-Override der Muster-/Schraffurfarbe (Vordergrund) DIESER Stütze.
|
||||
* `undefined` = „Nach System" (erben → Component.foreground), analog `Wall.
|
||||
* foreground`.
|
||||
*/
|
||||
foreground?: string;
|
||||
/**
|
||||
* Attribut-Override der Füllfarbe (Hintergrund/Poché) DIESER Stütze.
|
||||
* `undefined` = „Nach System" (neutrale SIA-Poché HATCH_INK/HATCH_PAPER je
|
||||
* nach Schraffur-Muster), analog `Wall.background`.
|
||||
*/
|
||||
background?: string;
|
||||
/** Stift-Kopplung von `foreground` (s. `Component.foregroundPenId`-Doku). */
|
||||
foregroundPenId?: string;
|
||||
/** Stift-Kopplung von `background`, analog {@link Wall.foregroundPenId}. */
|
||||
backgroundPenId?: string;
|
||||
/**
|
||||
* Attribut-Override der Strichstärke (mm Papier) DIESER Stütze. `undefined`
|
||||
* = „Nach System" (erben → `strokeWeightSource`), analog `Wall.strokeWeight`.
|
||||
*/
|
||||
strokeWeight?: number;
|
||||
/**
|
||||
* Attribut-Override der Schnitt-Schraffur (Hatch Manager) DIESER Stütze.
|
||||
* `undefined` = „Nach System" (erben → `hatchSource`), analog `Wall.hatchId`.
|
||||
*/
|
||||
hatchId?: string;
|
||||
/**
|
||||
* Quelle des Vordergrunds, wenn kein explizites `foreground` gesetzt ist — analog `Wall.foregroundSource`.
|
||||
*/
|
||||
foregroundSource?: AttributeSource;
|
||||
/** Quelle des Hintergrunds, analog {@link Beam.foregroundSource}. */
|
||||
backgroundSource?: AttributeSource;
|
||||
/** Quelle der Strichstärke, analog {@link Beam.foregroundSource}. */
|
||||
strokeWeightSource?: AttributeSource;
|
||||
/** Quelle der Schraffur, analog {@link Beam.foregroundSource}. */
|
||||
hatchSource?: AttributeSource;
|
||||
/** [271] Umbau: Status (Bestand, Abbruch, Neu) und Etappe. Fehlt ⇒ Bestand. */
|
||||
renovation?: Renovation;
|
||||
/**
|
||||
* [272] Variante, zu der das Element gehört (`Project.designOptionSets`). Fehlt ⇒ Hauptmodell (immer sichtbar).
|
||||
*/
|
||||
designOption?: DesignOptionRef;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wiederverwendbares 2D-Symbol (Möbelblock, Sanitär-/Normsymbol, Nordpfeil
|
||||
* u. Ä.) — s. `Project.blockDefs` + `Drawing2DGeom["block"]`. `geom2d` ist
|
||||
@@ -3247,6 +3338,8 @@ export type Project = {
|
||||
* Projekte/Tests ohne `columns` gültig bleiben (Default: leer behandeln).
|
||||
*/
|
||||
columns?: Array<Column>;
|
||||
/** [280] Träger/Unterzüge, siehe {@link Beam}. Optional wie `columns`. */
|
||||
beams?: Array<Beam>;
|
||||
/**
|
||||
* Bäume ([149]) — eigene Objekte mit Stamm, Krone und Höhe, siehe {@link Tree}. Optional, damit
|
||||
* bestehende Projekte ohne `trees` gültig bleiben (Default: leer behandeln).
|
||||
|
||||
Reference in new issue
Block a user