[279] Geländer als eigenes Bauteil: Modell, Grundriss, Schnitt, Ansicht, 3D, 3D-Dokument, IFC IfcRailing, DXF-Ebene, Umbau und Varianten, Befehl gelaender, Objekt-Info, Griffe, Beispiel Wettbewerb
This commit is contained in:
103 files changed
+2289
-73
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", "extrudedSolids", "rooms", "drawings2d", "railings"] as const;
|
||||
export type DesignOptionCollection = (typeof DESIGN_OPTION_COLLECTIONS)[number];
|
||||
|
||||
/** Kombination: Satz-Id → Varianten-Id. */
|
||||
@@ -490,6 +490,7 @@ const KIND_COLLECTION: Record<string, DesignOptionCollection> = {
|
||||
solids: "extrudedSolids",
|
||||
rooms: "rooms",
|
||||
drawings: "drawings2d",
|
||||
railings: "railings",
|
||||
};
|
||||
|
||||
/** Modell-Arten ohne Variante (immer ausserhalb einer Bearbeitungsvariante). */
|
||||
|
||||
@@ -20,6 +20,8 @@ export interface GroupMembership {
|
||||
treeIds: string[];
|
||||
/** [213] Kameras. */
|
||||
cameraIds: string[];
|
||||
/** [279] Geländer. */
|
||||
railingIds: string[];
|
||||
}
|
||||
|
||||
export type MemberKind = keyof GroupMembership;
|
||||
@@ -35,6 +37,7 @@ export const EMPTY_MEMBERSHIP: GroupMembership = {
|
||||
openingIds: [],
|
||||
treeIds: [],
|
||||
cameraIds: [],
|
||||
railingIds: [],
|
||||
};
|
||||
|
||||
/** Letzte transitive Mitgliedschaft (Projekt + Gruppe): Klick-/Rahmen-Filter fragen je Element. */
|
||||
|
||||
@@ -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", "extrudedSolids", "rooms", "drawings2d", "railings"] as const;
|
||||
export type RenovationCollection = (typeof RENOVATION_COLLECTIONS)[number];
|
||||
|
||||
/**
|
||||
@@ -273,6 +273,7 @@ const SELECTION_KEY: Record<RenovationCollection, string> = {
|
||||
extrudedSolids: "solids",
|
||||
rooms: "rooms",
|
||||
drawings2d: "drawings",
|
||||
railings: "railings",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -409,6 +409,8 @@ export const sampleProject: Project = {
|
||||
{ code: "30", name: "Decken", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "31", name: "Dächer", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "40", name: "Treppen", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
// [279] Geländer (Balkon, Galerie, Treppenauge): eigene Klasse, wie jedes Bauteil abschaltbar.
|
||||
{ code: "41", name: "Geländer", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "35", name: "Träger", color: "#0a0a0a", lw: 0.25, visible: true, locked: false },
|
||||
{ code: "50", name: "Text", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "60", name: "Räume", color: "#4a4a4a", lw: 0.13, visible: true, locked: false },
|
||||
|
||||
@@ -35,7 +35,9 @@ describe("Beispielprojekt Wettbewerb", () => {
|
||||
expect(p.walls.filter((w) => w.floorId === f && w.isExternal).length).toBe(4);
|
||||
expect(p.rooms!.filter((r) => r.floorId === f).length).toBe(10);
|
||||
}
|
||||
expect(p.ceilings!.length).toBe(3);
|
||||
// [279] zwei Balkonplatten mit Geländer (Stäbe 1. OG, Glas 2. OG)
|
||||
expect(p.ceilings!.length).toBe(5);
|
||||
expect(p.railings!.map((r) => r.kind)).toEqual(["bars", "glass"]);
|
||||
expect(p.roofs![0].shape).toBe("flach");
|
||||
expect(p.stairs!.length).toBe(2);
|
||||
expect(p.rooms!.length).toBe(30);
|
||||
|
||||
@@ -149,6 +149,18 @@ const ceilings: NonNullable<Project["ceilings"]> = [
|
||||
{ id: "c-eg", type: "ceiling", floorId: "eg", categoryCode: "30", outline: slab, openings: [HOLE], wallTypeId: "", ceilingTypeId: "wb-ct-decke", loadBearing: true },
|
||||
{ id: "c-og1", type: "ceiling", floorId: "og1", categoryCode: "30", outline: slab, openings: [HOLE], wallTypeId: "", ceilingTypeId: "wb-ct-decke", loadBearing: true },
|
||||
];
|
||||
// [279] Balkone an der Südfassade (Wohnung West): Betonplatte 1.4 m tief über dem EG bzw. 1. OG, Geländer an den drei freien
|
||||
// Seiten — Stäbe im 1. OG, Glas im 2. OG. Fusshöhe auf der Plattenoberkante (Geschoss-UK), Höhe 1.00 m nach SIA 358.
|
||||
const BALCONY = [P(0.6, -HA), P(7.4, -HA), P(7.4, -1.6), P(0.6, -1.6)];
|
||||
ceilings.push(
|
||||
{ id: "c-balkon-og1", type: "ceiling", floorId: "eg", categoryCode: "30", outline: BALCONY, wallTypeId: "", ceilingTypeId: "wb-ct-decke", loadBearing: true },
|
||||
{ id: "c-balkon-og2", type: "ceiling", floorId: "og1", categoryCode: "30", outline: BALCONY, wallTypeId: "", ceilingTypeId: "wb-ct-decke", loadBearing: true },
|
||||
);
|
||||
const BALCONY_RAIL = [P(0.7, -HA), P(0.7, -1.5), P(7.3, -1.5), P(7.3, -HA)];
|
||||
const railings: NonNullable<Project["railings"]> = [
|
||||
{ id: "gl-balkon-og1", type: "railing", floorId: "og1", categoryCode: "41", points: BALCONY_RAIL, height: 1.0, kind: "bars", handrail: true },
|
||||
{ id: "gl-balkon-og2", type: "railing", floorId: "og2", categoryCode: "41", points: BALCONY_RAIL, height: 1.0, kind: "glass", handrail: true },
|
||||
];
|
||||
const stairs: NonNullable<Project["stairs"]> = ["eg", "og1"].map((f) => ({
|
||||
id: `tr-${f}`, type: "stair" as const, floorId: f, categoryCode: "40", shape: "straight" as const, typeId: "wb-tr-beton", start: P(10, 1.4), dir: P(0, 1), runLength: 4.3, width: 1.1, totalRise: FH, stepCount: 17,
|
||||
}));
|
||||
@@ -293,6 +305,7 @@ export function buildWettbewerbSampleProject(): Project {
|
||||
ceilings,
|
||||
roofs,
|
||||
stairs,
|
||||
railings,
|
||||
rooms: [],
|
||||
units: units(),
|
||||
drawings2d: cadastre(),
|
||||
|
||||
@@ -1763,6 +1763,8 @@ export type Group = {
|
||||
treeIds?: Array<string>;
|
||||
/** [213] Kameras (fehlt in älteren Dateien). */
|
||||
cameraIds?: Array<string>;
|
||||
/** [279] Geländer (fehlt in älteren Dateien). */
|
||||
railingIds?: Array<string>;
|
||||
/** Verschachtelte Gruppen (diese Gruppe enthält andere Gruppen als Ganzes). */
|
||||
groupIds: Array<string>;
|
||||
};
|
||||
@@ -3252,6 +3254,10 @@ export type Project = {
|
||||
* bestehende Projekte ohne `trees` gültig bleiben (Default: leer behandeln).
|
||||
*/
|
||||
trees?: Array<Tree>;
|
||||
/**
|
||||
* Geländer ([279]) — eigenes Bauteil (Balkon, Galerie, Treppenauge), siehe {@link Railing}. Optional.
|
||||
*/
|
||||
railings?: Array<Railing>;
|
||||
/**
|
||||
* Kameras ([213]) — gespeicherte Standpunkte für 3D-Ansicht und Rendering, siehe {@link Camera}. Optional
|
||||
* (Default: leer behandeln).
|
||||
@@ -3427,6 +3433,61 @@ export type PublishSet = {
|
||||
pdfLayers?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Ein Geländer ([279]) — eigenes Bauteil für Balkon, Galerie, Treppenauge und Terrasse (Absturzsicherung,
|
||||
* Vorgabe 1.00 m nach SIA 358): Polylinie `points` auf einem Geschoss, Höhe, Art der Füllung, Handlauf. Grundriss
|
||||
* (Linie bzw. Doppellinie je Art), Schnitt/Ansicht (Stäbe, Glasfläche, Brüstung), 3D, IFC (`IfcRailing`).
|
||||
* Fusshöhe = Geschoss-UK + `baseOffset` (z. B. auf einer Balkonplatte).
|
||||
*/
|
||||
export type Railing = {
|
||||
id: string;
|
||||
type: "railing";
|
||||
/** Zugehörige Zeichnungsebene (Geschoss). */
|
||||
floorId: string;
|
||||
/** Grafik-Kategorie (Ebene), Vorgabe "55" (Geländer). */
|
||||
categoryCode: string;
|
||||
/** IFC-GlobalId des Quell-Bauteils (IFC-Import/Rundreise). */
|
||||
ifcGlobalId?: string;
|
||||
/** Objekt-Sperre, analog `Wall.locked`. */
|
||||
locked?: boolean;
|
||||
/** Achse des Geländers (Polylinie im Grundriss, Meter, mindestens 2 Punkte). */
|
||||
points: Array<Vec2>;
|
||||
/** Geschlossener Zug (Treppenauge, Galerie ringsum); fehlt = offen. */
|
||||
closed?: boolean;
|
||||
/** Höhe über dem Fuss bis Oberkante Handlauf bzw. Füllung (m, Vorgabe 1.00 nach SIA 358). */
|
||||
height: number;
|
||||
/** Fusshöhe relativ zur Geschoss-UK (m, Vorgabe 0), z. B. 0.18 auf einer Balkonplatte. */
|
||||
baseOffset?: number;
|
||||
/** Art der Füllung. */
|
||||
kind: RailingKind;
|
||||
/** Stäbe: Achsabstand der Stäbe (m, Vorgabe 0.12; lichtes Mass bleibt unter 12 cm). */
|
||||
barSpacing?: number;
|
||||
/** Stäbe: Querschnitt (Kantenlänge bzw. Durchmesser, m, Vorgabe 0.014). */
|
||||
barSize?: number;
|
||||
/**
|
||||
* Dicke der Füllung (m): Glas (Vorgabe 0.02), Brüstung (Vorgabe 0.15), Lochblech (Vorgabe 0.004); bei Stäben ohne Wirkung.
|
||||
*/
|
||||
thickness?: number;
|
||||
/** Handlauf auf der Oberkante; fehlt = bei Stäben und Glas ja, sonst nein. */
|
||||
handrail?: boolean;
|
||||
/** Handlauf: Durchmesser (m, Vorgabe 0.04). */
|
||||
handrailSize?: number;
|
||||
/** Optionales Bauteil (Component) für Füllung/Farbe, v. a. der massiven Brüstung. */
|
||||
componentId?: string;
|
||||
/** Optionale Übersteuerung der Strichfarbe; sonst gilt die Kategorie-Farbe. */
|
||||
color?: string;
|
||||
/** [271] Umbau: Status (Bestand, Abbruch, Neu) und Etappe. Fehlt ⇒ Bestand. */
|
||||
renovation?: Renovation;
|
||||
/** [272] Variante, zu der das Element gehört. Fehlt ⇒ Hauptmodell (immer sichtbar). */
|
||||
designOption?: DesignOptionRef;
|
||||
};
|
||||
|
||||
/**
|
||||
* Art der Füllung eines Geländers ([279]): Stäbe (Rundstahl/Flachstahl, lotrecht), Glas (Ganzglas-Brüstung),
|
||||
* massive Brüstung (Mauer/Beton) oder Lochblech.
|
||||
*/
|
||||
export type RailingKind = "bars" | "glass" | "solid" | "perforated";
|
||||
|
||||
/**
|
||||
* Referenzlinien-Regel: setzt die `referenceLine`-Eigenschaft bei passenden
|
||||
* Wänden einheitlich (Vectorworks-Stil).
|
||||
|
||||
Reference in new issue
Block a user