Aufgestauter Arbeitsstand: Stiftsätze, Bulge/Bögen, neue 2D-Befehle, Geo/Import-Fixes, Dach-Schnittfugen 3D
Sammel-Commit für mehrere Wochen Arbeit seit dem letzten Commit-Stand (22.8.) — Details je Fund/Feature stehen datiert in PENDENZEN.md. - Stiftsatz-System (ArchiCAD-Stiftsatz-Vorbild): Bauteile/Ebenen/Element- Overrides wahlweise auf freie Farbe oder Stift+Stärke gekoppelt, eigene Palette-UI, 255-Stift-Standardpalette. - Wand-"+"-Kreuzung: vierte Wand an einem Knoten wurde nicht mitverschnitten (model/joins.ts). - 2D-Grundriss: Schnitt-vs-Ansicht-Entscheidung berücksichtigt jetzt wall.bottom/top-Override statt nur der rohen Wandhöhe. - Bulge/Bogensegmente in Polylinien (geometry/bulge.ts) inkl. Trim/Extend/ Offset/Fillet-Unterstützung. - Neue 2D-Befehle: Block/Blockdefinition, Leader, Polygon, Textpfad, Xline. - Kontext-Objekt-Kategorien (Ebenen-Zuordnung für importierte Gebäude/ Terrain-Meshes). - Element-Zwischenablage (Kopieren/Einfügen) für alle 3D-Elementarten. - swissBUILDINGS3D/DXF-Import-Fixes (Polyface-Mesh-Absturz, Georeferenzierung, anwählbare Kontext-Meshes im 3D-Viewport). - Dach-Schnittfugen im 3D-Live-Schnitt (render3d: roof_cut.rs neu). - Diverse kleinere Fixes/Ergänzungen in Grundriss-, Schnitt-, Ansichts- und 3D-Pipeline (siehe PENDENZEN.md für Einzelheiten). Verifiziert: tsc --noEmit sauber, vitest run 117/1206 grün, cargo test --package render3d 96/96 grün.
This commit is contained in:
1 parent
91908b1456
commit
ef40091f6d
136 files changed
+11109
-665
No files matched your search
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* `ensureContextCategories` — ergänzt fehlende Kontext-Kategorien in
|
||||
* `project.layers`, ohne vorhandene (auch vom Nutzer umbenannte) Codes
|
||||
* anzutasten. Grundlage der Ebenen-Zuordnung importierter Kontext-Objekte
|
||||
* (Gebäude/Terrain/Konturen/Luftbild), s. Kopfkommentar in
|
||||
* `contextCategories.ts`. Seit 2026-08-31 landen die meisten dieser
|
||||
* Kategorien als KINDER von "05 Kontext" statt als Top-Level-Geschwister —
|
||||
* ausser "31 Dächer" (bleibt Top-Level, teilt sich den Code mit modellierten
|
||||
* `Roof`-Objekten).
|
||||
*/
|
||||
import { describe, it, expect } from "vitest";
|
||||
import {
|
||||
ensureContextCategories,
|
||||
GEO_CATEGORY_DEFS,
|
||||
IMAGE_CATEGORY,
|
||||
TERRAIN_CATEGORY,
|
||||
IMPORTED_ROOF_CATEGORY,
|
||||
CONTEXT_PARENT_CATEGORY,
|
||||
} from "./contextCategories";
|
||||
import type { LayerCategory } from "./types";
|
||||
|
||||
const layer = (code: string, name = code): LayerCategory => ({
|
||||
code,
|
||||
name,
|
||||
color: "#000000",
|
||||
lw: 0.13,
|
||||
visible: true,
|
||||
locked: false,
|
||||
});
|
||||
|
||||
describe("ensureContextCategories", () => {
|
||||
it("legt '05 Kontext' neu an und hängt eine fehlende (nested) Kategorie als Kind ein", () => {
|
||||
const out = ensureContextCategories([], [TERRAIN_CATEGORY.code]);
|
||||
expect(out.length).toBe(1);
|
||||
expect(out[0]).toMatchObject({
|
||||
code: CONTEXT_PARENT_CATEGORY.code,
|
||||
name: CONTEXT_PARENT_CATEGORY.name,
|
||||
});
|
||||
expect(out[0].children).toMatchObject([
|
||||
{ code: TERRAIN_CATEGORY.code, name: TERRAIN_CATEGORY.name, visible: true, locked: false },
|
||||
]);
|
||||
});
|
||||
|
||||
it("lässt eine bereits vorhandene (auch umbenannte) Kategorie unverändert", () => {
|
||||
const existing = [layer(TERRAIN_CATEGORY.code, "Mein Gelände")];
|
||||
const out = ensureContextCategories(existing, [TERRAIN_CATEGORY.code]);
|
||||
expect(out).toEqual(existing);
|
||||
expect(out[0].name).toBe("Mein Gelände"); // NICHT auf den Default zurückgesetzt
|
||||
});
|
||||
|
||||
it("ist ein No-op (dieselbe Referenz), wenn nichts fehlt", () => {
|
||||
const existing = [layer(GEO_CATEGORY_DEFS.building.code)];
|
||||
const out = ensureContextCategories(existing, [GEO_CATEGORY_DEFS.building.code]);
|
||||
expect(out).toBe(existing);
|
||||
});
|
||||
|
||||
it("findet vorhandene Codes auch in verschachtelten Unterkategorien", () => {
|
||||
const existing: LayerCategory[] = [
|
||||
{ ...layer("20", "Wände"), children: [layer(GEO_CATEGORY_DEFS.road.code, "Strasse")] },
|
||||
];
|
||||
const out = ensureContextCategories(existing, [GEO_CATEGORY_DEFS.road.code]);
|
||||
expect(out).toBe(existing); // "11" existiert bereits als Kind -> kein Duplikat oben
|
||||
});
|
||||
|
||||
it("hängt mehrere fehlende nested Codes gebündelt unter EIN '05 Kontext' (kein Duplikat), in einem Schritt", () => {
|
||||
const out = ensureContextCategories([], [
|
||||
TERRAIN_CATEGORY.code,
|
||||
IMAGE_CATEGORY.code,
|
||||
GEO_CATEGORY_DEFS.building.code,
|
||||
]);
|
||||
expect(out.map((l) => l.code)).toEqual([CONTEXT_PARENT_CATEGORY.code]);
|
||||
const childCodes = (out[0].children ?? []).map((c) => c.code).sort();
|
||||
expect(childCodes).toEqual(
|
||||
[TERRAIN_CATEGORY.code, IMAGE_CATEGORY.code, GEO_CATEGORY_DEFS.building.code].sort(),
|
||||
);
|
||||
});
|
||||
|
||||
it("ergänzt fehlende Kinder in ein bereits vorhandenes '05 Kontext' (kein zweites '05')", () => {
|
||||
const existing: LayerCategory[] = [
|
||||
{ ...layer(CONTEXT_PARENT_CATEGORY.code, "Kontext"), children: [layer(IMAGE_CATEGORY.code, "Luftbild")] },
|
||||
];
|
||||
const out = ensureContextCategories(existing, [IMAGE_CATEGORY.code, TERRAIN_CATEGORY.code]);
|
||||
expect(out.map((l) => l.code)).toEqual([CONTEXT_PARENT_CATEGORY.code]); // kein zweiter Top-Level-Eintrag
|
||||
const childCodes = (out[0].children ?? []).map((c) => c.code).sort();
|
||||
expect(childCodes).toEqual([IMAGE_CATEGORY.code, TERRAIN_CATEGORY.code].sort());
|
||||
// vorhandenes Kind (Luftbild, ggf. umbenannt) bleibt unangetastet.
|
||||
expect(out[0].children?.find((c) => c.code === IMAGE_CATEGORY.code)?.name).toBe("Luftbild");
|
||||
});
|
||||
|
||||
it("'31 Dächer' bleibt TOP-LEVEL (nicht unter '05 Kontext' verschachtelt)", () => {
|
||||
const out = ensureContextCategories([], [IMPORTED_ROOF_CATEGORY.code]);
|
||||
expect(out).toMatchObject([
|
||||
{ code: IMPORTED_ROOF_CATEGORY.code, name: IMPORTED_ROOF_CATEGORY.name },
|
||||
]);
|
||||
expect(out[0].children).toBeUndefined();
|
||||
});
|
||||
|
||||
it("mischt nested + Top-Level-Ausnahme korrekt in einem Aufruf", () => {
|
||||
const out = ensureContextCategories([], [TERRAIN_CATEGORY.code, IMPORTED_ROOF_CATEGORY.code]);
|
||||
const topCodes = out.map((l) => l.code).sort();
|
||||
expect(topCodes).toEqual([CONTEXT_PARENT_CATEGORY.code, IMPORTED_ROOF_CATEGORY.code].sort());
|
||||
const kontext = out.find((l) => l.code === CONTEXT_PARENT_CATEGORY.code);
|
||||
expect(kontext?.children).toMatchObject([{ code: TERRAIN_CATEGORY.code }]);
|
||||
});
|
||||
|
||||
it("ignoriert unbekannte Codes (kein Eintrag in den bekannten Definitionen) statt zu crashen", () => {
|
||||
const out = ensureContextCategories([], ["zz-unknown"]);
|
||||
expect(out).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,175 @@
|
||||
// Kategorie-Codes der Kontext-Schicht (`project.context`, s. `ContextObject`
|
||||
// in `types.ts`): importierte Gebäude/Terrain/Konturen/Luftbilder bekommen
|
||||
// hier eine `categoryCode`-Zuordnung, damit sie wie jedes andere Bauteil über
|
||||
// das Ebenen-Panel (Sichtbarkeit/Grau/Sperren) steuerbar sind — bislang
|
||||
// wurden sie beim 2D-Plan IMMER gezeichnet, unabhängig von der Ebenen-
|
||||
// Sichtbarkeit (Nutzer-Report: „sollten wie Gebäude/Dächer ausblendbar sein").
|
||||
//
|
||||
// Wiederverwendet, wo möglich, bereits im Sample-Projekt gesäte Codes ("11"
|
||||
// Strasse, "12" Gebäude) — neue Codes liegen in bislang ungenutzten Lücken
|
||||
// (02-04, 15-18) der DOSSIER-Nummerierung, damit nichts kollidiert.
|
||||
//
|
||||
// GRUPPIERUNG (2026-08-31, Nutzer-Wunsch): alle Kontext-Import-Kategorien
|
||||
// hängen als KINDER unter einer gemeinsamen Elternebene „05 Kontext" (das
|
||||
// Ebenen-Panel unterstützt Verschachtelung bereits, s. „20 Wände" mit
|
||||
// Kindern „21 Türen/Fenster" etc. in `sampleProject.ts`) — statt als lose,
|
||||
// gleichrangige Top-Level-Einträge. AUSNAHME: „31 Dächer"
|
||||
// ({@link IMPORTED_ROOF_CATEGORY}) bleibt bewusst TOP-LEVEL, weil es sich mit
|
||||
// der Dächer-Kategorie modellierter `Roof`-Objekte deckt (ein Ausblenden soll
|
||||
// beide Quellen gemeinsam treffen) — sie unter „Kontext" zu verschachteln
|
||||
// würde diese Kopplung optisch zerreissen.
|
||||
//
|
||||
// Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import type { GeoCategory } from "../io/geoContext";
|
||||
import type { LayerCategory } from "./types";
|
||||
|
||||
/** Eine Kategorie-Definition (Code + Default-Name/Farbe/Strichstärke). */
|
||||
export interface ContextCategoryDef {
|
||||
code: string;
|
||||
name: string;
|
||||
color: string;
|
||||
lw: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gemeinsame Elternebene aller Kontext-Import-Kategorien (Gelände/Luftbild/
|
||||
* Situation/Gebäude/Strasse/Wald/Parkplätze/Bahn/Gewässer/Grünflächen) —
|
||||
* reine Gruppierung im Ebenen-Panel, trägt selbst keine Geometrie
|
||||
* (`categoryCode` einzelner Kontext-Objekte zeigt immer auf ein KIND, nie auf
|
||||
* „05" direkt). Code „05" liegt in der bislang ungenutzten Lücke zwischen
|
||||
* „01 Vermessung" und „10 Situation" (s. `sampleProject.ts`).
|
||||
*/
|
||||
export const CONTEXT_PARENT_CATEGORY: ContextCategoryDef = {
|
||||
code: "05",
|
||||
name: "Kontext",
|
||||
color: "#707078",
|
||||
lw: 0.13,
|
||||
};
|
||||
|
||||
/** Gelände-TIN (swissALTI3D/generiertes Terrain). */
|
||||
export const TERRAIN_CATEGORY: ContextCategoryDef = {
|
||||
code: "02",
|
||||
name: "Gelände",
|
||||
color: "#8a9478",
|
||||
lw: 0.13,
|
||||
};
|
||||
|
||||
/** Georeferenziertes Luftbild (SWISSIMAGE/eingefügtes Bild). */
|
||||
export const IMAGE_CATEGORY: ContextCategoryDef = {
|
||||
code: "03",
|
||||
name: "Luftbild",
|
||||
color: "#707078",
|
||||
lw: 0.13,
|
||||
};
|
||||
|
||||
/** Generischer DXF/DWG-Mesh-/Konturen-Import ohne spezifischere Zuordnung. */
|
||||
export const GENERIC_IMPORT_CATEGORY: ContextCategoryDef = {
|
||||
code: "10",
|
||||
name: "Situation",
|
||||
color: "#909090",
|
||||
lw: 0.18,
|
||||
};
|
||||
|
||||
/**
|
||||
* Dach-Flächen importierter swissBUILDINGS3D-v3-„separated"-Gebäude (eigener
|
||||
* DXF-Layer „Roof" je Fläche, s. `swissBuildings3d.ts::splitPfaceMeshByLayer`).
|
||||
* Teilt sich Code „31" bewusst mit der Dächer-Kategorie modellierter `Roof`-
|
||||
* Objekte (s. `sampleProject.ts`) — ein Ein-/Ausblenden über „Dächer" soll
|
||||
* BEIDE Quellen gemeinsam betreffen, nicht zwei separate, verwirrende Einträge
|
||||
* im Ebenen-Panel erzeugen.
|
||||
*/
|
||||
export const IMPORTED_ROOF_CATEGORY: ContextCategoryDef = {
|
||||
code: "31",
|
||||
name: "Dächer",
|
||||
color: "#7a4a3a",
|
||||
lw: 0.35,
|
||||
};
|
||||
|
||||
/**
|
||||
* Kategorie je {@link GeoCategory} (Standort-Import, swisstopo & OSM) — deckt
|
||||
* sowohl `featuresToContextObjects` (OSM/flache swissBUILDINGS-Footprints)
|
||||
* als auch die echten swissBUILDINGS3D-Meshes ab (`building`).
|
||||
*/
|
||||
export const GEO_CATEGORY_DEFS: Record<GeoCategory, ContextCategoryDef> = {
|
||||
building: { code: "12", name: "Gebäude", color: "#888888", lw: 0.25 },
|
||||
road: { code: "11", name: "Strasse", color: "#a89070", lw: 0.18 },
|
||||
forest: { code: "04", name: "Wald", color: "#3a7a3a", lw: 0.13 },
|
||||
parking: { code: "15", name: "Parkplätze", color: "#a0a0a0", lw: 0.13 },
|
||||
railway: { code: "16", name: "Bahn", color: "#606060", lw: 0.18 },
|
||||
water: { code: "17", name: "Gewässer", color: "#5a90b0", lw: 0.13 },
|
||||
green: { code: "18", name: "Grünflächen", color: "#70b070", lw: 0.13 },
|
||||
};
|
||||
|
||||
/** Kategorien, die als KINDER von {@link CONTEXT_PARENT_CATEGORY} gruppiert
|
||||
* werden (alles ausser der Top-Level-Ausnahme „31 Dächer"). */
|
||||
const NESTED_CONTEXT_CATEGORIES: ContextCategoryDef[] = [
|
||||
TERRAIN_CATEGORY,
|
||||
IMAGE_CATEGORY,
|
||||
GENERIC_IMPORT_CATEGORY,
|
||||
...Object.values(GEO_CATEGORY_DEFS),
|
||||
];
|
||||
|
||||
const toLayerCategory = (c: ContextCategoryDef): LayerCategory => ({
|
||||
code: c.code,
|
||||
name: c.name,
|
||||
color: c.color,
|
||||
lw: c.lw,
|
||||
visible: true,
|
||||
locked: false,
|
||||
});
|
||||
|
||||
/**
|
||||
* Ergänzt `layers` um jede fehlende Kontext-Kategorie aus `codes` — bereits
|
||||
* vorhandene Codes (auch vom Nutzer umbenannte, egal auf welcher Baumtiefe)
|
||||
* bleiben unverändert, nur wirklich fehlende werden mit ihrem Default-Namen/
|
||||
* -Farbe ergänzt. Fehlende {@link NESTED_CONTEXT_CATEGORIES} landen als
|
||||
* KINDER von {@link CONTEXT_PARENT_CATEGORY} (legt „05 Kontext" bei Bedarf
|
||||
* selbst an); die Top-Level-Ausnahme „31 Dächer" bleibt Top-Level (s.
|
||||
* {@link IMPORTED_ROOF_CATEGORY}-Moduldoc). Reiner No-op, wenn nichts fehlt
|
||||
* (liefert dieselbe Referenz zurück, spart eine unnötige `project`-Neuanlage).
|
||||
*/
|
||||
export function ensureContextCategories(
|
||||
layers: LayerCategory[],
|
||||
codes: Iterable<string>,
|
||||
): LayerCategory[] {
|
||||
const existing = new Set(collectCodes(layers));
|
||||
const missing = new Set<string>();
|
||||
for (const code of codes) {
|
||||
if (!existing.has(code)) missing.add(code);
|
||||
}
|
||||
if (missing.size === 0) return layers;
|
||||
|
||||
const missingNested = NESTED_CONTEXT_CATEGORIES.filter((c) => missing.has(c.code)).map(
|
||||
toLayerCategory,
|
||||
);
|
||||
const missingTopLevel = missing.has(IMPORTED_ROOF_CATEGORY.code)
|
||||
? [toLayerCategory(IMPORTED_ROOF_CATEGORY)]
|
||||
: [];
|
||||
|
||||
let out = layers;
|
||||
if (missingNested.length > 0) {
|
||||
const parentIdx = out.findIndex((l) => l.code === CONTEXT_PARENT_CATEGORY.code);
|
||||
if (parentIdx >= 0) {
|
||||
out = out.map((l, i) =>
|
||||
i === parentIdx ? { ...l, children: [...(l.children ?? []), ...missingNested] } : l,
|
||||
);
|
||||
} else {
|
||||
out = [...out, { ...toLayerCategory(CONTEXT_PARENT_CATEGORY), children: missingNested }];
|
||||
}
|
||||
}
|
||||
if (missingTopLevel.length > 0) {
|
||||
out = [...out, ...missingTopLevel];
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/** Alle Codes eines Kategorie-Baums (rekursiv über `children`). */
|
||||
function collectCodes(layers: LayerCategory[]): string[] {
|
||||
const out: string[] = [];
|
||||
for (const l of layers) {
|
||||
out.push(l.code);
|
||||
if (l.children) out.push(...collectCodes(l.children));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
@@ -97,6 +97,7 @@ export function translateProject(project: Project, dx: number, dy: number): Proj
|
||||
const g = d.geom;
|
||||
switch (g.shape) {
|
||||
case "line":
|
||||
case "xline":
|
||||
return { ...d, geom: { ...g, a: shift(g.a, dx, dy), b: shift(g.b, dx, dy) } };
|
||||
case "polyline":
|
||||
return { ...d, geom: { ...g, pts: shiftAll(g.pts, dx, dy) } };
|
||||
@@ -117,6 +118,16 @@ export function translateProject(project: Project, dx: number, dy: number): Proj
|
||||
case "kote":
|
||||
return { ...d, geom: { ...g, at: shift(g.at, dx, dy) } };
|
||||
case "text":
|
||||
return {
|
||||
...d,
|
||||
geom: {
|
||||
...g,
|
||||
at: shift(g.at, dx, dy),
|
||||
...(g.leaderTarget ? { leaderTarget: shift(g.leaderTarget, dx, dy) } : {}),
|
||||
...(g.pathPts ? { pathPts: shiftAll(g.pathPts, dx, dy) } : {}),
|
||||
},
|
||||
};
|
||||
case "block":
|
||||
return { ...d, geom: { ...g, at: shift(g.at, dx, dy) } };
|
||||
case "image":
|
||||
return { ...d, geom: { ...g, min: shift(g.min, dx, dy), max: shift(g.max, dx, dy) } };
|
||||
|
||||
@@ -186,6 +186,66 @@ describe("computeJoins — Mittelspannen-T-Stoß (Ende trifft Wandseite)", () =>
|
||||
});
|
||||
});
|
||||
|
||||
describe("computeJoins — „+\"-Kreuzung (zwei kollineare Enden kreuzen eine durchlaufende Wand)", () => {
|
||||
it("schneidet BEIDE kollinearen Hälften gegen die jeweils zugewandte (gegenüberliegende) Fläche der durchlaufenden Wand", () => {
|
||||
// Vertikale Durchgangswand V (6,2)→(6,11), T=0.3 → halbe Dicke 0.15. Zwei
|
||||
// kollineare horizontale Hälften HL (0,6)→(6,6) und HR (6,6)→(12,6) treffen
|
||||
// sich exakt AUF DER ACHSE von V (x=6) — eine reale „+"-Kreuzung, wie sie
|
||||
// beim Zeichnen einer durchlaufenden Trennwand entsteht, die von einer
|
||||
// weiteren durchlaufenden Wand gekreuzt wird (Regressionstest für den per
|
||||
// Massstabsprobe gefundenen Bug: vorher blieb V für Fall 1 unsichtbar, weil
|
||||
// sie an diesem Punkt keinen eigenen Endpunkt hat, und Fall 2 prüfte nur
|
||||
// echte EINZEL-Enden — HL/HR bekamen dadurch gar keinen Schnitt).
|
||||
const proj = threeWallProject(
|
||||
wall("V", { x: 6, y: 2 }, { x: 6, y: 11 }),
|
||||
wall("HL", { x: 0, y: 6 }, { x: 6, y: 6 }),
|
||||
wall("HR", { x: 6, y: 6 }, { x: 12, y: 6 }),
|
||||
0.3,
|
||||
);
|
||||
const joins = computeJoins(proj, proj.walls);
|
||||
|
||||
// Die Durchgangswand V bleibt an ihren (freien) Enden unangetastet.
|
||||
expect(joins.get("V")!.startCut).toBeNull();
|
||||
expect(joins.get("V")!.endCut).toBeNull();
|
||||
|
||||
// HL läuft nach −x aus → Schnitt an der LINKEN Fläche von V (x=5.85).
|
||||
const cutL = joins.get("HL")!.endCut;
|
||||
expect(cutL).not.toBeNull();
|
||||
expect(distToLine(cutL!, { x: 5.85, y: 2 })).toBeCloseTo(0, 6);
|
||||
expect(distToLine(cutL!, { x: 5.85, y: 11 })).toBeCloseTo(0, 6);
|
||||
|
||||
// HR läuft nach +x aus → Schnitt an der RECHTEN Fläche von V (x=6.15) —
|
||||
// die GEGENÜBERLIEGENDE Fläche, nicht dieselbe wie HL (der eigentliche Bug:
|
||||
// beide Enden teilen sich denselben Kreuzungspunkt, `perp` allein kann sie
|
||||
// nicht unterscheiden — erst die eigene Auslaufrichtung tut das).
|
||||
const cutR = joins.get("HR")!.startCut;
|
||||
expect(cutR).not.toBeNull();
|
||||
expect(distToLine(cutR!, { x: 6.15, y: 2 })).toBeCloseTo(0, 6);
|
||||
expect(distToLine(cutR!, { x: 6.15, y: 11 })).toBeCloseTo(0, 6);
|
||||
expect(distToLine(cutL!, { x: 6.15, y: 6 })).not.toBeCloseTo(0, 3);
|
||||
});
|
||||
|
||||
it("lässt einen echten Stern-Knoten (4 Wandenden treffen sich, keine läuft durch) weiterhin rechtwinklig", () => {
|
||||
// Vier Wand-STUMMEL enden alle exakt bei (5,5), keiner läuft darüber
|
||||
// hinaus weiter — kein Durchgang erkennbar, bewusst dokumentierte
|
||||
// Restlücke (s. Kommentar in computeJoins).
|
||||
const proj: Project = twoWallProject(
|
||||
wall("A", { x: 0, y: 5 }, { x: 5, y: 5 }),
|
||||
wall("B", { x: 5, y: 5 }, { x: 10, y: 5 }),
|
||||
0.3,
|
||||
);
|
||||
proj.walls.push(
|
||||
wall("C", { x: 5, y: 5 }, { x: 5, y: 0 }),
|
||||
wall("D", { x: 5, y: 5 }, { x: 5, y: 10 }),
|
||||
);
|
||||
const joins = computeJoins(proj, proj.walls);
|
||||
for (const id of ["A", "B", "C", "D"]) {
|
||||
const c = joins.get(id)!;
|
||||
expect(c.startCut ?? c.endCut).toBeNull();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveJoinPriority — Ordnungslogik zweier Bauteile am Stoss", () => {
|
||||
const brick: Component = { id: "brick", name: "Backstein", color: "#8c5544", hatchId: "none", joinPriority: 50 };
|
||||
const brick2: Component = { id: "brick", name: "Backstein (Kopie)", color: "#000", hatchId: "none", joinPriority: 50 };
|
||||
|
||||
+49
-11
@@ -113,9 +113,15 @@ interface WallEnd {
|
||||
/**
|
||||
* Berechnet für jede Wand die Gehrungs-/Anschluss-Schnittlinien.
|
||||
* Behandelt werden: L-Ecken (genau zwei Wandenden treffen sich), T-Knoten
|
||||
* (drei Wandenden treffen sich, zwei davon kollinear) und Mittelspannen-
|
||||
* T-Stöße (ein freies Wandende trifft auf die Seite einer anderen Wand).
|
||||
* X-Stöße (vier und mehr Enden) bleiben vorerst rechtwinklig.
|
||||
* (drei Wandenden treffen sich, zwei davon kollinear), Mittelspannen-T-Stöße
|
||||
* (ein freies Wandende trifft auf die Seite einer anderen Wand) UND „+"-
|
||||
* Kreuzungen (zwei kollineare Wandenden treffen sich exakt auf der Achse einer
|
||||
* dritten, durchlaufenden Wand — z. B. wenn eine durchgehende Trennwand von
|
||||
* einer weiteren durchgehenden Wand gekreuzt wird). Nur echte Stern-Knoten
|
||||
* (vier oder mehr Wand-STUMMEL enden alle exakt am selben Punkt, OHNE dass
|
||||
* eine von ihnen als Durchgang erkennbar ist) bleiben rechtwinklig — dafür
|
||||
* fehlt eine eindeutige Rangfolge, welches Ende „durch" und welches „Abzweig"
|
||||
* wäre.
|
||||
*
|
||||
* `walls` ist die bereits gefilterte Wandmenge (z. B. ein Geschoss); die
|
||||
* Gehrung wird nur innerhalb dieser Menge gebildet.
|
||||
@@ -163,16 +169,35 @@ export function computeJoins(
|
||||
continue;
|
||||
}
|
||||
|
||||
// X-Stöße u. ä. (>3 Enden): vorerst rechtwinklig lassen (Folge-Arbeit).
|
||||
// Echte Stern-Knoten (≥4 WANDENDEN treffen sich exakt hier, KEINS läuft
|
||||
// als Durchgangswand weiter) bleiben vorerst rechtwinklig (Folge-Arbeit) —
|
||||
// dafür gibt es (noch) keine eindeutige Rangfolge, welches Ende „durch"
|
||||
// und welches „Abzweig" ist. Der weit häufigere Fall — eine durchlaufende
|
||||
// Wand wird von zwei (oder mehr) an ihrem Knoten endenden Wänden gekreuzt,
|
||||
// eine „+"/„X"-Kreuzung — greift unten in Fall 2, weil dort JEDES noch
|
||||
// ungeschnittene Ende zusätzlich gegen die Mittelspanne aller anderen
|
||||
// Wände geprüft wird (nicht nur echte Einzel-Enden wie bisher).
|
||||
}
|
||||
|
||||
// Fall 2: Mittelspannen-T-Stoß. Ein freies Wandende (kein anderes Wandende
|
||||
// teilt sich seinen Knoten) kann trotzdem auf die Seite einer anderen Wand
|
||||
// treffen (nicht an deren Endpunkten). In dem Fall bekommt das freie Ende
|
||||
// einen Schnitt entlang der zugewandten Fläche dieser Wand.
|
||||
// Fall 2: Mittelspannen-T-Stoß, verallgemeinert. Jedes Wandende, das nach
|
||||
// Fall 1 noch UNGESCHNITTEN ist — das schliesst nicht nur echte Einzel-Enden
|
||||
// ein, sondern auch die beiden kollinearen Hälften eines 2er-/3er-Knotens
|
||||
// (die bewusst ungeschnitten bleiben, s. o.) —, wird zusätzlich geprüft, ob
|
||||
// es auf die Mittelspanne (nicht das Ende) einer WEITEREN, an diesem Knoten
|
||||
// gar nicht beteiligten Wand trifft. Das deckt genau die „+"-Kreuzung ab:
|
||||
// zwei kollineare Wandhälften enden an einem Punkt, DURCH den eine dritte,
|
||||
// durchlaufende Wand hindurchläuft (sonst für Fall 1 unsichtbar, weil sie
|
||||
// dort keinen eigenen Endpunkt hat) — beide Hälften bekommen unabhängig
|
||||
// voneinander (mit jeweils eigenem Vorzeichen/zugewandter Fläche) einen
|
||||
// Schnitt gegen die durchlaufende Wand, die selbst unangetastet bleibt.
|
||||
// Bereits geschnittene Enden (L-Ecke, T-Abzweig) werden NICHT erneut
|
||||
// angefasst — additiv, bit-identisch zum bisherigen Verhalten überall sonst.
|
||||
for (const [, ends] of junctions) {
|
||||
if (ends.length !== 1) continue;
|
||||
applyMidSpanTee(project, byId, walls, ends[0], result);
|
||||
for (const end of ends) {
|
||||
const cuts = result.get(end.wallId)!;
|
||||
if (end.end === "start" ? cuts.startCut : cuts.endCut) continue;
|
||||
applyMidSpanTee(project, byId, walls, end, result);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -534,7 +559,20 @@ function applyMidSpanTee(
|
||||
const uW = dirOf(w);
|
||||
const nW = leftNormal(uW);
|
||||
const offW = wallReferenceOffset(w, tw);
|
||||
const sign = best.perp >= 0 ? 1 : -1;
|
||||
// Zugewandte Seite: primär aus der AUSLAUFRICHTUNG des freien Endes in
|
||||
// seinen eigenen Körper (wie `dBranch`/`sign` in applyTJunction) — nicht aus
|
||||
// der lateralen Position `perp`. Bei einer „+"-Kreuzung (zwei kollineare
|
||||
// Enden treffen exakt auf der ACHSE der durchlaufenden Wand, `perp≈0`) ist
|
||||
// `perp` für beide Enden identisch und liefert für BEIDE dieselbe (falsche)
|
||||
// Seite; die Auslaufrichtung unterscheidet sie dagegen korrekt (linke Hälfte
|
||||
// läuft nach −u aus, rechte nach +u — je die gegenüberliegende Fläche der
|
||||
// Durchgangswand). Nur wenn die Auslaufrichtung (nahezu) parallel zur
|
||||
// Durchgangsachse liegt (dot≈0 — geometrisch entartet für einen T-Stoss),
|
||||
// bleibt `perp` als Fallback (bisheriges Verhalten).
|
||||
const dFree =
|
||||
freeEnd.end === "start" ? dirOf(freeWall) : scale(dirOf(freeWall), -1);
|
||||
const facing = dot(nW, dFree);
|
||||
const sign = Math.abs(facing) > 1e-6 ? (facing >= 0 ? 1 : -1) : best.perp >= 0 ? 1 : -1;
|
||||
const facePoint = add(w.start, scale(nW, offW + sign * (tw / 2)));
|
||||
const faceCut: Line = { point: facePoint, dir: uW };
|
||||
|
||||
|
||||
@@ -0,0 +1,352 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import {
|
||||
activePenSet,
|
||||
resolvePenColor,
|
||||
resolvePenWeight,
|
||||
rebakePenColors,
|
||||
generateStandardPenPalette,
|
||||
seedStandardPenSet,
|
||||
PEN_FALLBACK_COLOR,
|
||||
PEN_FALLBACK_WEIGHT,
|
||||
} from "./penSets";
|
||||
import type { Ceiling, Component, Drawing2D, LayerCategory, PenStyle, Project, Room, Wall } from "./types";
|
||||
|
||||
function baseProject(overrides: Partial<Project> = {}): Project {
|
||||
return {
|
||||
id: "t",
|
||||
name: "T",
|
||||
lineStyles: [],
|
||||
hatches: [],
|
||||
components: [],
|
||||
wallTypes: [],
|
||||
drawingLevels: [],
|
||||
layers: [],
|
||||
walls: [],
|
||||
doors: [],
|
||||
drawings2d: [],
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
/** Kurzform für einen PenStyle-Eintrag in Tests. */
|
||||
const ps = (color: string, weight = 0.5): PenStyle => ({ color, weight });
|
||||
|
||||
describe("activePenSet/resolvePenColor/resolvePenWeight", () => {
|
||||
it("liefert undefined ohne Stiftsätze/aktiven Verweis", () => {
|
||||
const p = baseProject();
|
||||
expect(activePenSet(p)).toBeUndefined();
|
||||
});
|
||||
|
||||
it("löst Farbe UND Strichstärke gegen den aktiven Stiftsatz auf", () => {
|
||||
const p = baseProject({
|
||||
penSets: [
|
||||
{ id: "std", name: "Standard", pens: { "1": ps("#ff0000", 0.35) } },
|
||||
{ id: "bw", name: "S/W", pens: { "1": ps("#000000", 0.13) } },
|
||||
],
|
||||
activePenSetId: "bw",
|
||||
});
|
||||
expect(resolvePenColor(p, "1")).toBe("#000000");
|
||||
expect(resolvePenWeight(p, "1")).toBe(0.13);
|
||||
});
|
||||
|
||||
it("liefert den Fallback, wenn der Stift im aktiven Satz keinen Eintrag hat", () => {
|
||||
const p = baseProject({
|
||||
penSets: [{ id: "std", name: "Standard", pens: {} }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
expect(resolvePenColor(p, "1")).toBe(PEN_FALLBACK_COLOR);
|
||||
expect(resolvePenWeight(p, "1")).toBe(PEN_FALLBACK_WEIGHT);
|
||||
});
|
||||
|
||||
it("liefert den Fallback ohne aktiven Stiftsatz", () => {
|
||||
const p = baseProject({ penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#ff0000") } }] });
|
||||
expect(resolvePenColor(p, "1")).toBe(PEN_FALLBACK_COLOR);
|
||||
});
|
||||
});
|
||||
|
||||
const comp = (overrides: Partial<Component> = {}): Component => ({
|
||||
id: "c1",
|
||||
name: "C1",
|
||||
color: "#111111",
|
||||
hatchId: "none",
|
||||
joinPriority: 10,
|
||||
...overrides,
|
||||
});
|
||||
|
||||
const cat = (overrides: Partial<LayerCategory> = {}): LayerCategory => ({
|
||||
code: "20",
|
||||
name: "Wände",
|
||||
color: "#222222",
|
||||
lw: 0.35,
|
||||
visible: true,
|
||||
locked: false,
|
||||
...overrides,
|
||||
});
|
||||
|
||||
describe("rebakePenColors — Bauteile (nur Farbe, kein Stärke-Feld)", () => {
|
||||
it("lässt ein Bauteil OHNE Stift-Verweis unangetastet (referenzgleich)", () => {
|
||||
const c = comp();
|
||||
const p = baseProject({ components: [c] });
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.components[0]).toBe(c);
|
||||
});
|
||||
|
||||
it("bäckt `color` aus dem aktiven Stiftsatz, wenn `colorPenId` gesetzt ist", () => {
|
||||
const p = baseProject({
|
||||
components: [comp({ colorPenId: "1", color: "#stale" })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#abcdef") } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.components[0].color).toBe("#abcdef");
|
||||
});
|
||||
|
||||
it("bäckt `foreground`/`background` unabhängig voneinander", () => {
|
||||
const p = baseProject({
|
||||
components: [
|
||||
comp({
|
||||
color: "#base",
|
||||
foregroundPenId: "fg",
|
||||
backgroundPenId: "bg",
|
||||
}),
|
||||
],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { fg: ps("#f00"), bg: ps("#0f0") } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.components[0].foreground).toBe("#f00");
|
||||
expect(out.components[0].background).toBe("#0f0");
|
||||
// color selbst hat keinen Stift-Verweis -> bleibt unverändert.
|
||||
expect(out.components[0].color).toBe("#base");
|
||||
});
|
||||
|
||||
it("nutzt den Fallback, wenn der referenzierte Stift im aktiven Satz fehlt", () => {
|
||||
const p = baseProject({
|
||||
components: [comp({ colorPenId: "missing" })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: {} }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.components[0].color).toBe(PEN_FALLBACK_COLOR);
|
||||
});
|
||||
});
|
||||
|
||||
describe("rebakePenColors — Ebenen (Farbe UND Strichstärke, inkl. verschachtelt)", () => {
|
||||
it("bäckt `color` UND `lw` einer Top-Level-Kategorie", () => {
|
||||
const p = baseProject({
|
||||
layers: [cat({ colorPenId: "1" })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#123456", 0.7) } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.layers[0].color).toBe("#123456");
|
||||
expect(out.layers[0].lw).toBe(0.7);
|
||||
});
|
||||
|
||||
it("bäckt eine verschachtelte Kategorie (children) und lässt Geschwister ohne Stift unverändert", () => {
|
||||
const child = cat({ code: "21", colorPenId: "2" });
|
||||
const untouchedChild = cat({ code: "22", color: "#untouched" });
|
||||
const parent = cat({ code: "20", children: [child, untouchedChild] });
|
||||
const p = baseProject({
|
||||
layers: [parent],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "2": ps("#00ff00") } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.layers[0].children?.[0].color).toBe("#00ff00");
|
||||
expect(out.layers[0].children?.[1]).toBe(untouchedChild); // referenzgleich, unangetastet
|
||||
});
|
||||
|
||||
it("lässt eine Kategorie OHNE Stift-Verweis referenzgleich", () => {
|
||||
const c = cat();
|
||||
const p = baseProject({ layers: [c] });
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.layers[0]).toBe(c);
|
||||
});
|
||||
});
|
||||
|
||||
const wall = (overrides: Partial<Wall> = {}): Wall => ({
|
||||
id: "w1",
|
||||
type: "wall",
|
||||
floorId: "eg",
|
||||
categoryCode: "20",
|
||||
start: { x: 0, y: 0 },
|
||||
end: { x: 5, y: 0 },
|
||||
wallTypeId: "aw",
|
||||
height: 2.6,
|
||||
...overrides,
|
||||
});
|
||||
|
||||
const ceiling = (overrides: Partial<Ceiling> = {}): Ceiling => ({
|
||||
id: "c1",
|
||||
type: "ceiling",
|
||||
floorId: "eg",
|
||||
categoryCode: "30",
|
||||
outline: [{ x: 0, y: 0 }, { x: 4, y: 0 }, { x: 4, y: 4 }, { x: 0, y: 4 }],
|
||||
wallTypeId: "aw",
|
||||
...overrides,
|
||||
});
|
||||
|
||||
const drawing2d = (overrides: Partial<Drawing2D> = {}): Drawing2D => ({
|
||||
id: "d1",
|
||||
type: "drawing2d",
|
||||
levelId: "eg",
|
||||
categoryCode: "00",
|
||||
geom: { shape: "line", a: { x: 0, y: 0 }, b: { x: 1, y: 0 } },
|
||||
...overrides,
|
||||
});
|
||||
|
||||
const room = (overrides: Partial<Room> = {}): Room => ({
|
||||
id: "r1",
|
||||
type: "room",
|
||||
floorId: "eg",
|
||||
categoryCode: "60",
|
||||
siaCategory: "HNF",
|
||||
name: "Wohnen",
|
||||
boundary: [{ x: 0, y: 0 }, { x: 4, y: 0 }, { x: 4, y: 4 }, { x: 0, y: 4 }],
|
||||
color: "#stale",
|
||||
...overrides,
|
||||
});
|
||||
|
||||
describe("rebakePenColors — Elemente MIT Strichstärke-Feld (Wand/Decke/Drawing2D)", () => {
|
||||
it("bäckt Farbe UND `strokeWeight` einer Wand", () => {
|
||||
const p = baseProject({
|
||||
walls: [wall({ colorPenId: "1", strokeWeight: 0.05 })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#c0ffee", 0.6) } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.walls[0].color).toBe("#c0ffee");
|
||||
expect(out.walls[0].strokeWeight).toBe(0.6);
|
||||
});
|
||||
|
||||
it("lässt eine Wand OHNE Stift-Verweis referenzgleich", () => {
|
||||
const w = wall();
|
||||
const p = baseProject({ walls: [w] });
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.walls[0]).toBe(w);
|
||||
});
|
||||
|
||||
it("bäckt Farbe UND `strokeWeight` einer Decke", () => {
|
||||
const p = baseProject({
|
||||
ceilings: [ceiling({ colorPenId: "1" })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#aaaaaa", 0.25) } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.ceilings![0].color).toBe("#aaaaaa");
|
||||
expect(out.ceilings![0].strokeWeight).toBe(0.25);
|
||||
});
|
||||
|
||||
it("bäckt Farbe UND `weightMm` eines Drawing2D (eigenes Feld, nicht `strokeWeight`)", () => {
|
||||
const p = baseProject({
|
||||
drawings2d: [drawing2d({ colorPenId: "1" })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#ff00ff", 0.4) } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.drawings2d[0].color).toBe("#ff00ff");
|
||||
expect(out.drawings2d[0].weightMm).toBe(0.4);
|
||||
});
|
||||
|
||||
it("bäckt `foreground`/`background` einer Wand UNABHÄNGIG von `colorPenId` und OHNE Strichstärke anzufassen", () => {
|
||||
const p = baseProject({
|
||||
walls: [wall({ foregroundPenId: "2", backgroundPenId: "3", strokeWeight: 0.05 })],
|
||||
penSets: [
|
||||
{
|
||||
id: "std",
|
||||
name: "Standard",
|
||||
pens: { "2": ps("#00ff00", 0.9), "3": ps("#0000ff", 0.9) },
|
||||
},
|
||||
],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.walls[0].foreground).toBe("#00ff00");
|
||||
expect(out.walls[0].background).toBe("#0000ff");
|
||||
// Kein `colorPenId` gesetzt ⇒ `color`/`strokeWeight` bleiben unangetastet.
|
||||
expect(out.walls[0].color).toBeUndefined();
|
||||
expect(out.walls[0].strokeWeight).toBe(0.05);
|
||||
});
|
||||
|
||||
it("lässt eine Wand MIT `foreground`/`background` OHNE Stift-Verweis referenzgleich", () => {
|
||||
const w = wall({ foreground: "#fixed", background: "#alsoFixed" });
|
||||
const p = baseProject({ walls: [w] });
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.walls[0]).toBe(w);
|
||||
});
|
||||
});
|
||||
|
||||
describe("rebakePenColors — Elemente OHNE Strichstärke-Feld (Raum), Robustheit", () => {
|
||||
it("bäckt einen Raum (nur `color`, PFLICHT-Feld, kein Stärke-Feld vorhanden)", () => {
|
||||
const p = baseProject({
|
||||
rooms: [room({ colorPenId: "1" })],
|
||||
penSets: [{ id: "std", name: "Standard", pens: { "1": ps("#112233") } }],
|
||||
activePenSetId: "std",
|
||||
});
|
||||
const out = rebakePenColors(p);
|
||||
expect(out.rooms![0].color).toBe("#112233");
|
||||
});
|
||||
|
||||
it("übersteht ein Projekt ohne optionale Arrays (ceilings/roofs/... fehlen ganz)", () => {
|
||||
const p = baseProject({ activePenSetId: "std", penSets: [{ id: "std", name: "S", pens: {} }] });
|
||||
expect(() => rebakePenColors(p)).not.toThrow();
|
||||
expect(rebakePenColors(p).ceilings).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("generateStandardPenPalette", () => {
|
||||
const { pens, styles } = generateStandardPenPalette();
|
||||
|
||||
it("liefert genau 255 Stifte mit IDs '1'..'255', je Farbe+Strichstärke", () => {
|
||||
expect(pens.length).toBe(255);
|
||||
expect(new Set(pens.map((p) => p.id)).size).toBe(255);
|
||||
for (let i = 1; i <= 255; i++) {
|
||||
expect(styles[String(i)].color).toMatch(/^#[0-9a-f]{6}$/);
|
||||
expect(styles[String(i)].weight).toBe(PEN_FALLBACK_WEIGHT);
|
||||
}
|
||||
});
|
||||
|
||||
it("nutzt für 1-9 die klassischen Grundfarben (Rot/Gelb/.../Grau)", () => {
|
||||
expect(styles["1"].color).toBe("#ff0000");
|
||||
expect(styles["2"].color).toBe("#ffff00");
|
||||
expect(styles["3"].color).toBe("#00ff00");
|
||||
});
|
||||
|
||||
it("liefert für 250-255 einen monoton aufhellenden Graukeil", () => {
|
||||
const greys = [250, 251, 252, 253, 254, 255].map((i) => parseInt(styles[String(i)].color.slice(1, 3), 16));
|
||||
for (let i = 1; i < greys.length; i++) expect(greys[i]).toBeGreaterThan(greys[i - 1]);
|
||||
});
|
||||
|
||||
it("erzeugt für 10-249 gültige, paarweise unterschiedliche Hex-Farben", () => {
|
||||
const mid = Array.from({ length: 240 }, (_, i) => styles[String(10 + i)].color);
|
||||
expect(new Set(mid).size).toBeGreaterThan(200); // Grossteil eindeutig, ein paar Rundungs-Kollisionen sind ok
|
||||
});
|
||||
});
|
||||
|
||||
describe("seedStandardPenSet", () => {
|
||||
it("legt `pens` (255) + einen neuen aktiven Stiftsatz mit denselben Stilen an", () => {
|
||||
const p = baseProject();
|
||||
const out = seedStandardPenSet(p);
|
||||
expect(out.pens?.length).toBe(255);
|
||||
expect(out.penSets?.length).toBe(1);
|
||||
expect(out.activePenSetId).toBe(out.penSets![0].id);
|
||||
expect(out.penSets![0].pens["1"].color).toBe("#ff0000");
|
||||
});
|
||||
|
||||
it("aktiviert den neuen Satz NICHT, wenn bereits ein anderer Satz aktiv war", () => {
|
||||
const p = baseProject({
|
||||
penSets: [{ id: "existing", name: "Alt", pens: {} }],
|
||||
activePenSetId: "existing",
|
||||
});
|
||||
const out = seedStandardPenSet(p);
|
||||
expect(out.activePenSetId).toBe("existing");
|
||||
expect(out.penSets?.length).toBe(2);
|
||||
});
|
||||
|
||||
it("bäckt sofort gekoppelte Bauteil-Farben, wenn der neue Satz aktiv wird", () => {
|
||||
const p = baseProject({ components: [comp({ colorPenId: "3" })] });
|
||||
const out = seedStandardPenSet(p);
|
||||
expect(out.components[0].color).toBe("#00ff00");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,253 @@
|
||||
// Stiftsatz-Auflösung (ArchiCAD-Stiftsatz-Muster) — reine Funktionen, keine
|
||||
// Modell-Mutation. Der Trick, der jeden bestehenden Farb-/Strichstärke-Leser
|
||||
// (2D-Plan, beide 3D-Renderer, DXF-Export, Vorschau-Swatches) UNVERÄNDERT
|
||||
// lässt: `Component.color`/`.foreground`/`.background`, `LayerCategory.color`/
|
||||
// `.lw` bzw. die Element-Felder (`color`/`strokeWeight`/`weightMm`) bleiben
|
||||
// IMMER die eine gültige, aufgelöste Farbe/Strichstärke. Ein Stift-Verweis
|
||||
// (`xxxPenId`) schreibt diese Felder nur bei Gelegenheit (Stiftsatz-Wechsel,
|
||||
// Stift-Änderung, neue Zuweisung) per `rebakePenColors` aus dem aktiven
|
||||
// Stiftsatz NEU — kein Leser muss je einen Stift auflösen.
|
||||
//
|
||||
// Ein Stift (`PenStyle`) trägt Farbe UND Strichstärke zusammen (wie ein
|
||||
// echter ArchiCAD-/AutoCAD-Stift) — beide wandern gemeinsam, wenn ein
|
||||
// Element/eine Ebene auf „Stift" statt „Frei" gestellt wird.
|
||||
//
|
||||
// Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import type { ColorPen, Component, LayerCategory, PenSet, PenStyle, Project } from "./types";
|
||||
|
||||
/** Farbe eines Stifts, der im aktiven Stiftsatz (noch) keinen Eintrag hat. */
|
||||
export const PEN_FALLBACK_COLOR = "#9aa0a6";
|
||||
/** Strichstärke (mm) eines Stifts, der im aktiven Stiftsatz (noch) keinen Eintrag hat. */
|
||||
export const PEN_FALLBACK_WEIGHT = 0.18;
|
||||
|
||||
/** HSL (h in Grad 0..360, s/l in 0..1) → "#rrggbb". Reine Konvertierung, keine Bibliothek nötig. */
|
||||
export function hslToHex(h: number, s: number, l: number): string {
|
||||
const c = (1 - Math.abs(2 * l - 1)) * s;
|
||||
const hp = (((h % 360) + 360) % 360) / 60;
|
||||
const x = c * (1 - Math.abs((hp % 2) - 1));
|
||||
const [r1, g1, b1] =
|
||||
hp < 1 ? [c, x, 0] : hp < 2 ? [x, c, 0] : hp < 3 ? [0, c, x] : hp < 4 ? [0, x, c] : hp < 5 ? [x, 0, c] : [c, 0, x];
|
||||
const m = l - c / 2;
|
||||
const toHex = (v: number) => Math.round((v + m) * 255).toString(16).padStart(2, "0");
|
||||
return `#${toHex(r1)}${toHex(g1)}${toHex(b1)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Feste Freie-Farbe-Palette für den Palette-Popover (`ui/PenColorField.tsx`):
|
||||
* 8 Graustufen (Schwarz→Weiss) + 8 Farbtöne × 5 Helligkeitsstufen = 48
|
||||
* Swatches. Rein prozedural (HSL), dieselbe Begründung wie
|
||||
* `generateStandardPenPalette` — kein externes Farbschema.
|
||||
*/
|
||||
export const FREE_COLOR_PALETTE: string[] = (() => {
|
||||
const out: string[] = [];
|
||||
for (let i = 0; i < 8; i++) {
|
||||
const v = Math.round((i / 7) * 255);
|
||||
out.push(`#${v.toString(16).padStart(2, "0").repeat(3)}`);
|
||||
}
|
||||
for (let hue = 0; hue < 8; hue++) {
|
||||
for (let level = 0; level < 5; level++) {
|
||||
out.push(hslToHex(hue * 45, 0.75, 0.75 - level * 0.14));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
})();
|
||||
|
||||
/**
|
||||
* Generiert 255 Stifte + einen passenden Stiftsatz nach klassischer CAD-
|
||||
* Nummerierungs-Konvention (AutoCAD Color Index / ArchiCAD-Stiftsätze): Stifte
|
||||
* 1–9 die Grundfarben (Rot/Gelb/Grün/Cyan/Blau/Magenta/Schwarz/zwei Grautöne —
|
||||
* dieselben Werte wie die bestehende `ACI_PALETTE` in `export/exportDxf.ts`,
|
||||
* damit beide Stellen konsistent bleiben), 10–249 24 Farbtöne × 10 Helligkeits-/
|
||||
* Sättigungsstufen (prozedural per HSL erzeugt), 250–255 ein Graustufen-Keil
|
||||
* (identische Werte wie `ACI_PALETTE`s 250–255). **Keine externe Bibliothek
|
||||
* oder ein konkretes lizenziertes Farbschema** — reine Mathematik (HSL-Kreis),
|
||||
* daher lizenzfrei; strukturell an die altbekannte 255-Stift-Konvention aus
|
||||
* AutoCAD/ArchiCAD angelehnt, nicht Pixel-für-Pixel identisch mit deren
|
||||
* (proprietärer) Originaltabelle. Strichstärke einheitlich `PEN_FALLBACK_WEIGHT`
|
||||
* (0.18 mm) — im Stiftsatz-Tab pro Stift frei änderbar.
|
||||
*/
|
||||
export function generateStandardPenPalette(): { pens: ColorPen[]; styles: Record<string, PenStyle> } {
|
||||
const pens: ColorPen[] = [];
|
||||
const styles: Record<string, PenStyle> = {};
|
||||
const add = (id: number, name: string, color: string) => {
|
||||
pens.push({ id: String(id), name });
|
||||
styles[String(id)] = { color, weight: PEN_FALLBACK_WEIGHT };
|
||||
};
|
||||
|
||||
// 1–9: Grundfarben (wie ACI_PALETTE in exportDxf.ts).
|
||||
add(1, "Rot", "#ff0000");
|
||||
add(2, "Gelb", "#ffff00");
|
||||
add(3, "Grün", "#00ff00");
|
||||
add(4, "Cyan", "#00ffff");
|
||||
add(5, "Blau", "#0000ff");
|
||||
add(6, "Magenta", "#ff00ff");
|
||||
add(7, "Schwarz", "#000000");
|
||||
add(8, "Dunkelgrau", "#414141");
|
||||
add(9, "Grau", "#808080");
|
||||
|
||||
// 10–249: 24 Farbtöne (15°-Schritte) × 10 Stufen (5 gesättigt hell→dunkel,
|
||||
// 5 entsättigt hell→dunkel) — 240 Stifte.
|
||||
let id = 10;
|
||||
for (let hue = 0; hue < 24; hue++) {
|
||||
const h = hue * 15;
|
||||
for (let step = 0; step < 10; step++) {
|
||||
const saturated = step < 5;
|
||||
const level = step % 5; // 0..4
|
||||
const l = 0.75 - level * 0.14; // 0.75 → 0.19
|
||||
const s = saturated ? 0.85 : 0.4;
|
||||
add(id, `Stift ${id}`, hslToHex(h, s, l));
|
||||
id++;
|
||||
}
|
||||
}
|
||||
|
||||
// 250–255: Graustufen-Keil (wie ACI_PALETTE).
|
||||
const greys: [number, string][] = [
|
||||
[250, "#333333"],
|
||||
[251, "#5b5b5b"],
|
||||
[252, "#848484"],
|
||||
[253, "#adadad"],
|
||||
[254, "#d6d6d6"],
|
||||
[255, "#ffffff"],
|
||||
];
|
||||
for (const [gid, color] of greys) add(gid, `Grau ${gid}`, color);
|
||||
|
||||
return { pens, styles };
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt `Project.pens`/`penSets` auf die generierte 255er-Standardpalette
|
||||
* (s. {@link generateStandardPenPalette}) — ERSETZT bestehende `pens`/den neu
|
||||
* angelegten Satz vollständig (kein Merge), gedacht für den Erststart, bevor
|
||||
* eigene Stifte/Sätze existieren. Der neue Satz wird aktiv, wenn noch KEIN
|
||||
* Stiftsatz aktiv war (dieselbe Konvention wie `addPenSet`).
|
||||
*/
|
||||
export function seedStandardPenSet(project: Project): Project {
|
||||
const { pens, styles } = generateStandardPenPalette();
|
||||
const penSet: PenSet = { id: `penset-${Date.now()}`, name: "Standard (CAD-Palette)", pens: styles };
|
||||
return rebakePenColors({
|
||||
...project,
|
||||
pens,
|
||||
penSets: [...(project.penSets ?? []), penSet],
|
||||
activePenSetId: project.activePenSetId ?? penSet.id,
|
||||
});
|
||||
}
|
||||
|
||||
/** Der aktuell aktive Stiftsatz, oder `undefined` (kein Stiftsatz angelegt/aktiviert). */
|
||||
export function activePenSet(project: Project) {
|
||||
return project.penSets?.find((s) => s.id === project.activePenSetId);
|
||||
}
|
||||
|
||||
/** Der Stil (Farbe+Strichstärke) EINES Stifts im aktiven Stiftsatz, oder `undefined` ohne Eintrag/Satz. */
|
||||
export function resolvePenStyle(project: Project, penId: string): PenStyle | undefined {
|
||||
return activePenSet(project)?.pens[penId];
|
||||
}
|
||||
|
||||
/** Löst einen Stift gegen den aktiven Stiftsatz auf; Fallback bei fehlendem Eintrag. */
|
||||
export function resolvePenColor(project: Project, penId: string): string {
|
||||
return resolvePenStyle(project, penId)?.color ?? PEN_FALLBACK_COLOR;
|
||||
}
|
||||
|
||||
/** Strichstärke (mm) eines Stifts, analog {@link resolvePenColor}. */
|
||||
export function resolvePenWeight(project: Project, penId: string): number {
|
||||
return resolvePenStyle(project, penId)?.weight ?? PEN_FALLBACK_WEIGHT;
|
||||
}
|
||||
|
||||
/** Bäckt die Stift-Farbe(n) EINES Bauteils neu (reine Funktion, unverändert wenn kein Stift gesetzt). */
|
||||
function bakeComponent(project: Project, c: Component): Component {
|
||||
if (!c.colorPenId && !c.foregroundPenId && !c.backgroundPenId) return c;
|
||||
return {
|
||||
...c,
|
||||
...(c.colorPenId ? { color: resolvePenColor(project, c.colorPenId) } : {}),
|
||||
...(c.foregroundPenId ? { foreground: resolvePenColor(project, c.foregroundPenId) } : {}),
|
||||
...(c.backgroundPenId ? { background: resolvePenColor(project, c.backgroundPenId) } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
/** Bäckt Farbe UND Strichstärke (`.lw`) EINER Ebenen-Kategorie neu (rekursiv über `children`). */
|
||||
function bakeCategory(project: Project, cat: LayerCategory): LayerCategory {
|
||||
const next: LayerCategory = cat.colorPenId
|
||||
? { ...cat, color: resolvePenColor(project, cat.colorPenId), lw: resolvePenWeight(project, cat.colorPenId) }
|
||||
: cat;
|
||||
if (!cat.children) return next;
|
||||
const children = cat.children.map((c) => bakeCategory(project, c));
|
||||
return children === cat.children ? next : { ...next, children };
|
||||
}
|
||||
|
||||
/**
|
||||
* Bäckt die eigene `color`-Stift-Kopplung EINES Modell-Elements neu (nur
|
||||
* Farbe — für Elementarten ohne eigenes Strichstärke-Override-Feld: Dach,
|
||||
* Öffnung, Treppe, Raum). Unverändert (referenzgleich), wenn kein Stift
|
||||
* gesetzt ist.
|
||||
*/
|
||||
function bakeElementColor<T extends { colorPenId?: string; color?: string }>(
|
||||
project: Project,
|
||||
x: T,
|
||||
): T {
|
||||
return x.colorPenId ? { ...x, color: resolvePenColor(project, x.colorPenId) } : x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wie {@link bakeElementColor}, zusätzlich (a) die Strichstärke unter
|
||||
* `weightKey` (Wand/Decke/Stütze: `strokeWeight`; Drawing2D: `weightMm`) —
|
||||
* nur über `colorPenId` gekoppelt (ein Stift trägt Farbe UND Strichstärke
|
||||
* zusammen; Vordergrund/Hintergrund sind reine Musterfarben ohne
|
||||
* Strichstärke-Aspekt) — und (b) die Attribut-Override-Farben `foreground`/
|
||||
* `background` DIESER Element-Instanz, unabhängig über `foregroundPenId`/
|
||||
* `backgroundPenId` (analog `Component.foregroundPenId`/`backgroundPenId`,
|
||||
* nur eben am Element statt am Bauteil). Für Elementarten MIT eigenem
|
||||
* Strichstärke- UND Vordergrund/Hintergrund-Override-Feld (Wand/Decke/
|
||||
* Stütze/Drawing2D — exakt dieselben vier wie bei der Strichstärke).
|
||||
*/
|
||||
function bakeElementColorAndWeight<
|
||||
T extends {
|
||||
colorPenId?: string;
|
||||
color?: string;
|
||||
foregroundPenId?: string;
|
||||
foreground?: string;
|
||||
backgroundPenId?: string;
|
||||
background?: string;
|
||||
},
|
||||
K extends string,
|
||||
>(project: Project, x: T & Partial<Record<K, number>>, weightKey: K): T {
|
||||
if (!x.colorPenId && !x.foregroundPenId && !x.backgroundPenId) return x;
|
||||
return {
|
||||
...x,
|
||||
...(x.colorPenId
|
||||
? { color: resolvePenColor(project, x.colorPenId), [weightKey]: resolvePenWeight(project, x.colorPenId) }
|
||||
: {}),
|
||||
...(x.foregroundPenId ? { foreground: resolvePenColor(project, x.foregroundPenId) } : {}),
|
||||
...(x.backgroundPenId ? { background: resolvePenColor(project, x.backgroundPenId) } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Schreibt für JEDES Bauteil/JEDE Ebenen-Kategorie/JEDES Modell-Element mit
|
||||
* gesetztem Stift die Farbe (+ ggf. Strichstärke) des AKTIVEN Stiftsatzes in
|
||||
* `color`/`foreground`/`background`/`lw`/`strokeWeight`/`weightMm` — reine
|
||||
* Funktion, liefert ein neues `Project` (unveränderte Teile bleiben
|
||||
* referenzgleich). Aufzurufen nach: Stiftsatz-Wechsel, Änderung EINES Stifts
|
||||
* im aktiven Satz, oder Neuzuweisung eines Stifts an ein Bauteil/eine Ebene
|
||||
* (dort reicht meist ein direkter Patch, s. `resolvePenColor`/
|
||||
* `resolvePenWeight` — diese Funktion ist für die FLÄCHIGEN Fälle, die viele
|
||||
* Objekte auf einmal betreffen).
|
||||
*
|
||||
* Bewusst NICHT abgedeckt: Layout-Annotationen (`Layout.annotations[]`,
|
||||
* verschachtelt in `Project.layouts`) und `Tür`/`ExtrudedSolid`/Kontext-
|
||||
* Objekte — kein `colorPenId`-Feld dort (Scope-Entscheid, s. PENDENZEN.md).
|
||||
*/
|
||||
export function rebakePenColors(project: Project): Project {
|
||||
return {
|
||||
...project,
|
||||
components: project.components.map((c) => bakeComponent(project, c)),
|
||||
layers: project.layers.map((cat) => bakeCategory(project, cat)),
|
||||
walls: project.walls.map((w) => bakeElementColorAndWeight(project, w, "strokeWeight")),
|
||||
drawings2d: project.drawings2d.map((d) => bakeElementColorAndWeight(project, d, "weightMm")),
|
||||
ceilings: project.ceilings?.map((c) => bakeElementColorAndWeight(project, c, "strokeWeight")),
|
||||
columns: project.columns?.map((c) => bakeElementColorAndWeight(project, c, "strokeWeight")),
|
||||
roofs: project.roofs?.map((r) => bakeElementColor(project, r)),
|
||||
openings: project.openings?.map((o) => bakeElementColor(project, o)),
|
||||
stairs: project.stairs?.map((s) => bakeElementColor(project, s)),
|
||||
rooms: project.rooms?.map((r) => bakeElementColor(project, r)),
|
||||
};
|
||||
}
|
||||
@@ -372,11 +372,24 @@ export const sampleProject: Project = {
|
||||
layers: [
|
||||
{ code: "00", name: "Raster", color: "#484850", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "01", name: "Vermessung", color: "#707078", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "10", name: "Situation", color: "#909090", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "11", name: "Strasse", color: "#a89070", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "12", name: "Gebäude", color: "#888888", lw: 0.25, visible: true, locked: false },
|
||||
{ code: "13", name: "Bäume", color: "#50a050", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "14", name: "Höhenlinien", color: "#909050", lw: 0.18, visible: true, locked: false },
|
||||
// "05 Kontext" bündelt Bestand/Umgebung (manuell gezeichnet ODER importiert,
|
||||
// s. `contextCategories.ts::CONTEXT_PARENT_CATEGORY`) als Kinder statt als
|
||||
// gleichrangige Top-Level-Einträge (Nutzer-Wunsch 2026-08-31).
|
||||
{
|
||||
code: "05",
|
||||
name: "Kontext",
|
||||
color: "#707078",
|
||||
lw: 0.13,
|
||||
visible: true,
|
||||
locked: false,
|
||||
children: [
|
||||
{ code: "10", name: "Situation", color: "#909090", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "11", name: "Strasse", color: "#a89070", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "12", name: "Gebäude", color: "#888888", lw: 0.25, visible: true, locked: false },
|
||||
{ code: "13", name: "Bäume", color: "#50a050", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "14", name: "Höhenlinien", color: "#909050", lw: 0.18, visible: true, locked: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
code: "20",
|
||||
name: "Wände",
|
||||
|
||||
+22
-5
@@ -10,6 +10,7 @@
|
||||
|
||||
import Delaunator from "delaunator";
|
||||
import type { Contour, TerrainMesh } from "./types";
|
||||
import { TERRAIN_CATEGORY } from "./contextCategories";
|
||||
|
||||
let terrainSeq = 0;
|
||||
|
||||
@@ -55,7 +56,7 @@ export function generateTerrainFromContours(contours: Contour[]): TerrainMesh {
|
||||
|
||||
// Zu wenige Punkte für ein Dreieck → triviales leeres Mesh.
|
||||
if (xs.length < 3) {
|
||||
return { id, type: "terrainMesh", name, positions: [], indices: [] };
|
||||
return { id, type: "terrainMesh", name, categoryCode: TERRAIN_CATEGORY.code, positions: [], indices: [] };
|
||||
}
|
||||
|
||||
// 2. Delaunay über die (x,y)-Projektion. Delaunator erwartet ein flaches
|
||||
@@ -71,7 +72,7 @@ export function generateTerrainFromContours(contours: Contour[]): TerrainMesh {
|
||||
try {
|
||||
triangles = new Delaunator(coords2d).triangles;
|
||||
} catch {
|
||||
return { id, type: "terrainMesh", name, positions: [], indices: [] };
|
||||
return { id, type: "terrainMesh", name, categoryCode: TERRAIN_CATEGORY.code, positions: [], indices: [] };
|
||||
}
|
||||
|
||||
// 3. positions (x,y,z) aufbauen; Z aus zs je Vertex.
|
||||
@@ -99,7 +100,15 @@ export function generateTerrainFromContours(contours: Contour[]): TerrainMesh {
|
||||
indices.push(a, b, c);
|
||||
}
|
||||
|
||||
return { id, type: "terrainMesh", name, layer: TERRAIN_LAYER, positions, indices };
|
||||
return {
|
||||
id,
|
||||
type: "terrainMesh",
|
||||
name,
|
||||
layer: TERRAIN_LAYER,
|
||||
categoryCode: TERRAIN_CATEGORY.code,
|
||||
positions,
|
||||
indices,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +163,15 @@ export function terrainMeshFromGrid(grid: TerrainGrid): TerrainMesh {
|
||||
}
|
||||
|
||||
if (positions.length < 9 || indices.length < 3) {
|
||||
return { id, type: "terrainMesh", name, positions: [], indices: [] };
|
||||
return { id, type: "terrainMesh", name, categoryCode: TERRAIN_CATEGORY.code, positions: [], indices: [] };
|
||||
}
|
||||
return { id, type: "terrainMesh", name, layer: TERRAIN_LAYER, positions, indices };
|
||||
return {
|
||||
id,
|
||||
type: "terrainMesh",
|
||||
name,
|
||||
layer: TERRAIN_LAYER,
|
||||
categoryCode: TERRAIN_CATEGORY.code,
|
||||
positions,
|
||||
indices,
|
||||
};
|
||||
}
|
||||
+237
-2
@@ -30,6 +30,46 @@ import type { DetailLevel, View3d, ViewType } from "../ui/TopBar";
|
||||
// Geometrie eingebacken (siehe docs/design/resources-graphics.md).
|
||||
|
||||
/** Ein wiederverwendbarer Linienstil (Line Manager). */
|
||||
/**
|
||||
* Ein Stift (ArchiCAD-Stiftsatz-Muster): ein reiner NAME/PLATZHALTER, der
|
||||
* projektweit über alle {@link PenSet}s hinweg dieselbe Identität `id` behält.
|
||||
* Ein Stift trägt selbst KEINE Farbe — welche Farbe er zeigt, bestimmt der
|
||||
* jeweils AKTIVE Stiftsatz (`Project.activePenSetId`). Ein Bauteil/eine Ebene,
|
||||
* die statt einer freien Farbe auf einen Stift zeigt (`xxxPenId`), übernimmt
|
||||
* dadurch automatisch jede Farbänderung des Stifts bzw. jeden Stiftsatz-
|
||||
* Wechsel — ohne selbst angefasst zu werden.
|
||||
*/
|
||||
export interface ColorPen {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ein Stiftsatz — ordnet JEDEM Stift (`ColorPen.id`) eine konkrete Farbe zu.
|
||||
* Mehrere Stiftsätze können nebeneinander existieren (z. B. „Standard",
|
||||
* „Plot S/W", „Präsentation"); nur einer ist je Projekt AKTIV
|
||||
* (`Project.activePenSetId`). Fehlt ein Stift im `colors`-Objekt (z. B. neu
|
||||
* angelegt, aber in diesem Satz noch nicht befüllt), gilt `PEN_FALLBACK_COLOR`
|
||||
* (s. `model/penSets.ts`).
|
||||
*/
|
||||
/**
|
||||
* Farbe + Strichstärke EINES Stifts in EINEM Stiftsatz — wie ein echter
|
||||
* ArchiCAD-/AutoCAD-Stift wandern beide zusammen, wenn ein Element/eine Ebene
|
||||
* auf diesen Stift gestellt wird (s. `Component.colorPenId`-Doku).
|
||||
*/
|
||||
export interface PenStyle {
|
||||
color: string;
|
||||
/** Strichstärke in Millimetern. */
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface PenSet {
|
||||
id: string;
|
||||
name: string;
|
||||
/** Stift-ID (`ColorPen.id`) → Farbe+Strichstärke. */
|
||||
pens: Record<string, PenStyle>;
|
||||
}
|
||||
|
||||
export interface LineStyle {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -89,7 +129,14 @@ export type HatchPattern =
|
||||
| "solid"
|
||||
| "insulation"
|
||||
| "diagonal"
|
||||
| "crosshatch";
|
||||
| "crosshatch"
|
||||
/**
|
||||
* Frei gezeichnetes Wiederhol-Motiv (Parameter in {@link HatchStyle.motif},
|
||||
* gleiche Form wie `LineStyle.motif` — der Editor `MotifEditor.tsx` ist
|
||||
* bereits generisch für beide gebaut). Ohne gesetztes `motif` degradiert die
|
||||
* Fläche zu geraden Parallel-Musterlinien (wie „diagonal").
|
||||
*/
|
||||
| "custom";
|
||||
|
||||
/** Eine wiederverwendbare Schraffur (Hatch Manager). */
|
||||
export interface HatchStyle {
|
||||
@@ -160,6 +207,16 @@ export interface HatchStyle {
|
||||
lengthMin?: number;
|
||||
/** Maximale Strichlänge in mm (Papier). Fehlt es, greift die `scale`-abhängige Default-Länge. */
|
||||
lengthMax?: number;
|
||||
/**
|
||||
* Frei gezeichnetes Wiederhol-Motiv (nur `pattern==="custom"`) — gleiche Form
|
||||
* wie `LineStyle.motif`: eine offene Polylinie in Papier-mm, `x` läuft
|
||||
* 0..`length` (Wiederhollänge ENTLANG der Musterlinie), `y` = Versatz quer zur
|
||||
* Musterlinie. Wird alle `length` Papier-mm entlang jeder Musterlinie
|
||||
* gekachelt UND (wie bei diagonal/crosshatch) im Abstand von `scale`-
|
||||
* abhängigen 8 px quer versetzt wiederholt. Fehlt es, zeichnet „custom" wie
|
||||
* „diagonal" (gerade Linien) — kein Absturz bei frisch angelegten Hatches.
|
||||
*/
|
||||
motif?: { points: Vec2[]; length: number };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,6 +271,22 @@ export interface Component {
|
||||
* `color`. Migrationsabsicht: `background` ⇐ `color`.
|
||||
*/
|
||||
background?: string;
|
||||
/**
|
||||
* Stift-Kopplung (ArchiCAD-Stiftsatz-Muster, s. {@link ColorPen}/{@link
|
||||
* PenSet}): ist eines dieser Felder gesetzt, wird `color`/`foreground`/
|
||||
* `background` NICHT frei editiert, sondern bei jedem Stiftsatz-Wechsel
|
||||
* bzw. jeder Stift-Farbänderung automatisch aus dem aktiven Stiftsatz NEU
|
||||
* GESCHRIEBEN (`rebakePenColors`, `model/penSets.ts`) — die drei Felder
|
||||
* bleiben dadurch für ALLE bestehenden Leser (2D-Plan, beide 3D-Renderer,
|
||||
* Export) unverändert die eine gültige, aufgelöste Farbe; nur die Herkunft
|
||||
* ist jetzt ein Stift statt eine freie Wahl. Ein gesetzter `xxxPenId` gilt
|
||||
* genauso als „eigen" (explizit) wie eine frei gewählte Farbe — beides sind
|
||||
* Werte AM Bauteil, kein Verweis auf eine Ebene (anders als `foregroundSource`
|
||||
* an Wand/Decke/etc.).
|
||||
*/
|
||||
colorPenId?: string;
|
||||
foregroundPenId?: string;
|
||||
backgroundPenId?: string;
|
||||
/** Schnitt-Schraffur → Hatch Manager. Gilt, wo das Bauteil echt geschnitten ist. */
|
||||
hatchId: string;
|
||||
/**
|
||||
@@ -291,6 +364,21 @@ export interface RoofType {
|
||||
layers: Layer[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Wiederverwendbares 2D-Symbol (Möbelblock, Sanitär-/Normsymbol, Nordpfeil
|
||||
* u. Ä.) — s. `Project.blockDefs` + `Drawing2DGeom["block"]`. `geom2d` ist
|
||||
* LOKALE Geometrie (Ursprung = Einfügepunkt der Instanz, Winkel 0 = wie
|
||||
* definiert); jede Instanz transformiert sie beim Rendern per `at`/`rotation`.
|
||||
* Bewusst KEIN verschachtelter `"block"`-Shape in `geom2d` (keine Blöcke in
|
||||
* Blöcken, v1) — nicht technisch erzwungen, nur Konvention der Autoren-Seite
|
||||
* (`commands/cmds/defblock.ts`).
|
||||
*/
|
||||
export interface BlockDef {
|
||||
id: string;
|
||||
name: string;
|
||||
geom2d: Drawing2DGeom[];
|
||||
}
|
||||
|
||||
// ── Bauteil-Typen: Tür / Fenster / Treppe ──────────────────────────────────
|
||||
// Wiederverwendbare Stile (Presets) für Türen, Fenster und Treppen — analog
|
||||
// `WallType`/`CeilingType` (Bibliothek im Projekt, referenziert per `typeId`).
|
||||
@@ -817,6 +905,14 @@ export interface LayerCategory {
|
||||
name: string;
|
||||
/** Darstellungsfarbe (hex). */
|
||||
color: string;
|
||||
/**
|
||||
* Stift-Kopplung (s. `Component.colorPenId`): ist sie gesetzt, wird `color`
|
||||
* bei jedem Stiftsatz-Wechsel automatisch aus dem aktiven Stiftsatz neu
|
||||
* geschrieben. Zeichnet ein Objekt „nach Ebene", übernimmt es dadurch den
|
||||
* Stift dieser Ebene — bleibt aber selbst bei einer FREIEN Farbe, keinem
|
||||
* eigenen Stift-Verweis (nur `color` wandert mit).
|
||||
*/
|
||||
colorPenId?: string;
|
||||
/** Linienstärke in Millimetern. */
|
||||
lw: number;
|
||||
visible: boolean;
|
||||
@@ -890,6 +986,8 @@ export interface Wall {
|
||||
* nicht die Schicht-Füllfarben/Schraffuren.
|
||||
*/
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Attribut-Override der Muster-/Schraffurfarbe (Vordergrund) DIESER Wand-
|
||||
* Instanz. `undefined` = „Nach System" (erben → Component.foreground →
|
||||
@@ -901,6 +999,10 @@ export interface Wall {
|
||||
* `undefined` = „Nach System" (erben → Component.background → Component.color).
|
||||
*/
|
||||
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 Wand-Instanz (Umriss/
|
||||
* Schichtfugen). `undefined` = „Nach System" (erben → `strokeWeightSource`).
|
||||
@@ -1028,6 +1130,8 @@ export interface Ceiling {
|
||||
* Kategorie-Farbe.
|
||||
*/
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Attribut-Override der Muster-/Schraffurfarbe (Vordergrund) DIESER Decken-
|
||||
* Instanz. `undefined` = „Nach System" (erben → Component.foreground →
|
||||
@@ -1039,6 +1143,10 @@ export interface Ceiling {
|
||||
* `undefined` = „Nach System" (erben → Component.background → Component.color).
|
||||
*/
|
||||
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 Decken-Instanz.
|
||||
* `undefined` = „Nach System" (erben → `strokeWeightSource`).
|
||||
@@ -1144,6 +1252,8 @@ export interface Roof {
|
||||
roofTypeId?: string;
|
||||
/** Optionale Übersteuerung der Strich-/Umrissfarbe; sonst Kategorie-Farbe. */
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
}
|
||||
|
||||
/** Schwenkrichtung der Tür relativ zur Wandachse. */
|
||||
@@ -1234,6 +1344,8 @@ export interface Opening {
|
||||
* Kategorie-Farbe.
|
||||
*/
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Nur Fenster, Grundriss: Übersteuerung von Farbe/Strichstärke der
|
||||
* GESCHNITTENEN Blendrahmen-Querschnittsblöcke an den Laibungs-Enden
|
||||
@@ -1372,6 +1484,8 @@ export interface Stair {
|
||||
* Kategorie-Farbe.
|
||||
*/
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Darstellung des Auf-/Abpfeils an der Lauflinie: "line" (offener
|
||||
* Winkelpfeil, Default = heutiges Verhalten) oder "filled" (gefülltes
|
||||
@@ -1409,6 +1523,8 @@ export interface Room {
|
||||
boundary: Vec2[];
|
||||
/** Strich-/Füllfarbe des Raums (hex). */
|
||||
color: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Anker des Raum-Stempels (Meter). Wird bei der Erstellung EINMAL auf den
|
||||
* Zentroid gesetzt und danach nie automatisch neu berechnet — der Stempel ist
|
||||
@@ -1498,7 +1614,34 @@ export interface Door {
|
||||
/** Geometrie-Form eines 2D-Zeichenelements. */
|
||||
export type Drawing2DGeom =
|
||||
| { shape: "line"; a: Vec2; b: Vec2 }
|
||||
| { shape: "polyline"; pts: Vec2[]; closed: boolean }
|
||||
/**
|
||||
* Konstruktionslinie (Hilfslinie): unendliche Ausrichtungslinie durch `a`
|
||||
* und `b`, nur zwei gesetzte Punkte gespeichert — beim Rendern/Picken WEIT
|
||||
* über beide hinaus verlängert (s. `XLINE_EXTEND_M`), damit sie optisch/
|
||||
* funktional unendlich wirkt, ohne echte Unendlichkeits-Sonderfälle in der
|
||||
* SVG-/PDF-/DXF-Pipeline zu brauchen. Bewusst NICHT offset-/trim-/
|
||||
* extend-/join-fähig (reine Ausrichtungshilfe, kein reales Bauteil).
|
||||
*/
|
||||
| { shape: "xline"; a: Vec2; b: Vec2 }
|
||||
| {
|
||||
shape: "polyline";
|
||||
pts: Vec2[];
|
||||
closed: boolean;
|
||||
/**
|
||||
* Optionale Bogen-Segmente (DXF-„Bulge"-Konvention): `bulge[i]` krümmt
|
||||
* das Segment `pts[i] → pts[i+1]` (bei `closed` zusätzlich `bulge[pts.
|
||||
* length-1]` für das Schliess-Segment `pts[letzter] → pts[0]`) zu einem
|
||||
* Kreisbogen statt einer Geraden. `bulge[i] = tan(Δ/4)` (Δ = Öffnungs-
|
||||
* winkel des Bogens); Vorzeichen bestimmt die Seite (positiv = links von
|
||||
* a→b, s. `geometry/bulge.ts::bulgeArcPoints`). Fehlt der Eintrag oder
|
||||
* ist er 0/nahe 0 (`< 1e-9`), bleibt das Segment gerade — rein additiv,
|
||||
* jede bestehende Polylinie ohne `bulge` verhält sich exakt wie bisher.
|
||||
* Nur DIESES Feld unterscheidet eine „echte" Bogen-Polylinie von der
|
||||
* bisherigen rein geradlinigen; Rendering/Fläche/Export tessellieren den
|
||||
* Bogen (kein eigenes SVG-Arc-Primitiv, analog Ellipse/Spline/Bezier).
|
||||
*/
|
||||
bulge?: number[];
|
||||
}
|
||||
| { shape: "rect"; min: Vec2; max: Vec2 }
|
||||
| { shape: "circle"; center: Vec2; r: number }
|
||||
| { shape: "arc"; center: Vec2; r: number; a0: number; a1: number }
|
||||
@@ -1586,7 +1729,34 @@ export type Drawing2DGeom =
|
||||
* `text`). `width` bricht wie gehabt wortweise um.
|
||||
*/
|
||||
doc?: RichTextDoc;
|
||||
/**
|
||||
* Legenden-/Vorführungspfeil (Leader): optionale Zielposition, auf die
|
||||
* eine dünne Linie + Pfeilspitze vom Text aus zeigt (z. B. Beschriftung
|
||||
* eines entfernten Details). Kein eigener Shape — erbt dadurch die
|
||||
* komplette Inline-Text-Editor-Infrastruktur (analog `width` bei der
|
||||
* Textspalte). Gesetzt vom `leader`-Befehl, am normalen `text`-Werkzeug
|
||||
* unverändert `undefined`.
|
||||
*/
|
||||
leaderTarget?: Vec2;
|
||||
/**
|
||||
* Text-entlang-Pfad: mind. 2 Stützpunkte, entlang derer der Text (nur
|
||||
* `text`, KEIN `doc`/Rich-Formatting — v1 bewusst einstilig) über ein
|
||||
* echtes SVG `<textPath>` fliesst. Ist gesetzt, bestimmt der Pfad die
|
||||
* Position/Neigung jedes Zeichens; `at`/`angle` werden dann ignoriert
|
||||
* (bleiben nur als Fallback für Alt-Konsumenten, die `pathPts` nicht
|
||||
* kennen — s. `drawing2d.ts`). Griffe sind dann die Pfadpunkte selbst
|
||||
* (wie bei `polyline`), nicht der einzelne Anker.
|
||||
*/
|
||||
pathPts?: Vec2[];
|
||||
}
|
||||
/**
|
||||
* Platzierte Instanz eines wiederverwendbaren 2D-Symbols (`Project.
|
||||
* blockDefs`, s. dort). `rotation` in Radiant. Trägt selbst KEINE Geometrie
|
||||
* — die kommt beim Rendern/Picken/Snapping aus `blockDefId` + dieser
|
||||
* Transformation. Verweist die Instanz auf eine gelöschte/unbekannte
|
||||
* `blockDefId`, rendert sie schlicht nichts (kein Crash, s. `drawing2d.ts`).
|
||||
*/
|
||||
| { shape: "block"; blockDefId: string; at: Vec2; rotation: number }
|
||||
| {
|
||||
shape: "image";
|
||||
/** Obere-linke Ecke der Bild-Box (Modell-Meter). */
|
||||
@@ -1625,8 +1795,14 @@ export interface Drawing2D {
|
||||
* hat es Vorrang vor `fillColor` (der Poché-Hintergrund der geschlossenen Form).
|
||||
*/
|
||||
background?: string;
|
||||
/** Stift-Kopplung von `foreground` (s. `Component.foregroundPenId`-Doku). */
|
||||
foregroundPenId?: string;
|
||||
/** Stift-Kopplung von `background`, analog {@link Wall.foregroundPenId}. */
|
||||
backgroundPenId?: string;
|
||||
/** Optionale explizite Strichfarbe; sonst Kategorie-Farbe. */
|
||||
color?: string;
|
||||
/** Stift-Kopplung von `color` (s. `Component.colorPenId`-Doku). */
|
||||
colorPenId?: string;
|
||||
/**
|
||||
* Optionale Vollton-Füllfarbe für geschlossene Formen (getrennt von der
|
||||
* Strichfarbe `color`). Fehlt sie, ist die Fläche transparent (nur Schraffur
|
||||
@@ -1777,6 +1953,8 @@ export interface Column {
|
||||
* 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.
|
||||
@@ -1789,6 +1967,10 @@ export interface Column {
|
||||
* 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`.
|
||||
@@ -1827,6 +2009,13 @@ export interface ImportedMesh {
|
||||
name: string;
|
||||
/** Ursprünglicher DXF-Layer-Name (für spätere Kategorisierung). */
|
||||
layer?: string;
|
||||
/**
|
||||
* Grafik-Kategorie-Code (s. {@link LayerCategory}, `model/contextCategories.ts`)
|
||||
* — steuert Sichtbarkeit/Grau/Sperren wie bei jedem anderen Bauteil (Ebenen-
|
||||
* Panel). Fehlt er (ältere Importe vor dieser Erweiterung), bleibt das Objekt
|
||||
* IMMER sichtbar (Rückwärtskompatibilität), s. `generatePlan/context.ts`.
|
||||
*/
|
||||
categoryCode?: string;
|
||||
positions: number[];
|
||||
indices: number[];
|
||||
}
|
||||
@@ -1882,6 +2071,8 @@ export interface ContourSet {
|
||||
name: string;
|
||||
/** Ursprünglicher DXF-Layer-Name (für spätere Kategorisierung). */
|
||||
layer?: string;
|
||||
/** Grafik-Kategorie-Code, s. {@link ImportedMesh.categoryCode}. */
|
||||
categoryCode?: string;
|
||||
contours: Contour[];
|
||||
}
|
||||
|
||||
@@ -1896,6 +2087,8 @@ export interface TerrainMesh {
|
||||
name: string;
|
||||
/** Ebenen-/Gruppierungsname (SitePanel), z. B. „Terrain". Optional. */
|
||||
layer?: string;
|
||||
/** Grafik-Kategorie-Code, s. {@link ImportedMesh.categoryCode}. */
|
||||
categoryCode?: string;
|
||||
positions: number[];
|
||||
indices: number[];
|
||||
/**
|
||||
@@ -1920,6 +2113,8 @@ export interface ContextImage {
|
||||
name: string;
|
||||
/** Ebenen-/Gruppierungsname (SitePanel), z. B. „Luftbild". Optional. */
|
||||
layer?: string;
|
||||
/** Grafik-Kategorie-Code, s. {@link ImportedMesh.categoryCode}. */
|
||||
categoryCode?: string;
|
||||
/** Bildquelle als Data-URL (PNG/JPEG). */
|
||||
src: string;
|
||||
/** Modell-Meter Bounding-Box (das Bild füllt [min..max] planar von oben). */
|
||||
@@ -1933,6 +2128,22 @@ export interface ContextImage {
|
||||
* der 2D-Hintergrund-Darstellung. Default false.
|
||||
*/
|
||||
drape?: boolean;
|
||||
/**
|
||||
* Bildkorrektur (2D-Grundriss, CSS-`filter`-Semantik) — alle Werte optional,
|
||||
* fehlend = neutral (kein visueller Unterschied zu keinem Filter). `grayscale`
|
||||
* ist eine STETIGE 0..1-Blendung (nicht der binäre `mono`-Druckmodus von
|
||||
* `generatePlan()`, der Luftbilder ganz ausblendet — unabhängige Konzepte).
|
||||
*/
|
||||
filters?: {
|
||||
/** 0 = Graustufen, 1 = Original, >1 = übersättigt. Default 1. */
|
||||
saturation?: number;
|
||||
/** 0 = schwarz, 1 = Original, >1 = heller. Default 1. */
|
||||
brightness?: number;
|
||||
/** 0 = flaches Grau, 1 = Original, >1 = kontrastreicher. Default 1. */
|
||||
contrast?: number;
|
||||
/** 0 = kein Effekt, 1 = vollständig Graustufen. Default 0. */
|
||||
grayscale?: number;
|
||||
};
|
||||
}
|
||||
|
||||
/** Ein Kontext-Objekt: importiertes Mesh, Konturen-Satz, TIN oder Rasterbild. */
|
||||
@@ -2275,6 +2486,14 @@ export interface Project {
|
||||
* Dächer ohne `roofTypeId` lösen über die einschichtige `Roof.thickness` auf.
|
||||
*/
|
||||
roofTypes?: RoofType[];
|
||||
/**
|
||||
* Wiederverwendbare 2D-Symbol-Bibliothek (Möbelblöcke, Sanitär-/Norm-
|
||||
* symbole u. Ä.) — analog `wallTypes`: einmal definieren, beliebig oft als
|
||||
* `{shape:"block"}`-Instanz platzieren. V1 bewusst NUR 2D (kein 3D-Körper,
|
||||
* keine verschachtelten Blöcke). Optional, damit bestehende Projekte ohne
|
||||
* `blockDefs` gültig bleiben.
|
||||
*/
|
||||
blockDefs?: BlockDef[];
|
||||
/**
|
||||
* Türtypen-Bibliothek (Türstile), analog `wallTypes`. Optional, damit
|
||||
* bestehende Projekte/Tests ohne `doorTypes` gültig bleiben; Türen ohne
|
||||
@@ -2289,6 +2508,22 @@ export interface Project {
|
||||
* Treppentypen-Bibliothek (Treppenstile). Optional (siehe `doorTypes`).
|
||||
*/
|
||||
stairTypes?: StairType[];
|
||||
/**
|
||||
* Stift-Bibliothek (ArchiCAD-Stiftsatz-Muster, s. {@link ColorPen}):
|
||||
* projektweite Liste der Stift-IDs/-Namen. Optional, damit bestehende
|
||||
* Projekte/Tests ohne Stifte gültig bleiben.
|
||||
*/
|
||||
pens?: ColorPen[];
|
||||
/**
|
||||
* Stiftsätze (s. {@link PenSet}) — je einer eine vollständige Stift→Farbe-
|
||||
* Zuordnung. Optional (siehe `pens`).
|
||||
*/
|
||||
penSets?: PenSet[];
|
||||
/**
|
||||
* ID des aktuell AKTIVEN Stiftsatzes (`penSets`). Fehlt sie (kein Stiftsatz
|
||||
* angelegt/aktiviert), lösen Stift-Verweise auf `PEN_FALLBACK_COLOR` auf.
|
||||
*/
|
||||
activePenSetId?: string;
|
||||
/** Oberste Schnitte: Geschosse + Schnitte/Ansichten. */
|
||||
drawingLevels: DrawingLevel[];
|
||||
/** Grafik-Kategorie-Baum (geschossübergreifend). */
|
||||
|
||||
Reference in new issue
Block a user