God-Files aufgeteilt (ResourceManager/generatePlan/toWalls3d/App.tsx-Handler), Totcode entfernt (geometry-Crate, OCCT/HLR-Spike), PDF/Bild-Import ergänzt.

ResourceManager.tsx, generatePlan.ts und toWalls3d.ts sind nach Bauteil-
Domäne in src/ui/resourceManager/, src/plan/generatePlan/ und
src/plan/toWalls3d/ aufgeteilt (reine Verschiebung, keine Verhaltens-
änderung). App.tsx verliert weitere Handler-Gruppen an eigene Hooks
(useExportHandlers, useImportHandling, useKeyboardShortcuts) sowie
Hit-Testing an src/viewport/planHitTest.ts.

Unbenutzte Rust-geometry-Crate (durch WASM-Joins abgelöst) sowie der alte
OCCT/HLR-Schnitt-Spike (hlr.ts/occt.ts, vite occt-Aliases) entfernt.

Neu: PDF-Import als Rasterbild (src/io/pdfImport.ts) + gemeinsamer
Bild-Asset-Helfer (src/io/imageAsset.ts) für Plan- und Layout-Bilder.

tsc -b sauber, vitest 891/891 grün.
This commit is contained in:
2026-08-19 22:45:41 +02:00
parent 06c0143d32
commit 1507c2bf00
85 changed files with 12461 additions and 11280 deletions
+18 -1
View File
@@ -353,8 +353,15 @@ export interface Selection {
| "extrudedSolid"
| "column"
| "roof"
| "contextObject";
| "contextObject"
| "layoutAnnotation";
id: string;
/**
* Konkrete Art der Layout-Annotation (nur `kind === "layoutAnnotation"`) —
* steuert z. B., ob die Strichstärke editierbar ist (Linie/Rechteck ja,
* Text/Bild nein).
*/
annotKind?: "line" | "rect" | "text" | "image";
/** Grafik-Kategorie (Ebene) des Elements. */
categoryCode: string;
/**
@@ -408,6 +415,13 @@ export interface Selection {
hatchSource?: AttributeSource;
/** Ob die Form geschlossen ist (rect/circle/closed polyline) — nur Drawing2D. */
closed?: boolean;
/**
* Ob das Element ein Bild ist (Drawing2D `{shape:"image"}` ODER Layout-
* Annotation `kind:"image"`) — steuert die Deckkraft-Zeile im Attribute-Panel.
*/
isImage?: boolean;
/** Deckkraft (0..1) — nur wenn `isImage`. */
opacity?: number;
/** Achsparallele Bounding-Box in Modell-Metern. */
bbox: SelectionBBox;
/**
@@ -487,6 +501,7 @@ function geomBBox(g: Drawing2DGeom): SelectionBBox {
for (const p of g.pts) acc(p.x, p.y);
break;
case "rect":
case "image":
acc(g.min.x, g.min.y);
acc(g.max.x, g.max.y);
break;
@@ -1009,6 +1024,8 @@ function drawingSelection(project: Project, d: Drawing2D): Selection {
strokeWeightSource: d.strokeWeightSource,
hatchSource: closed ? d.hatchSource : undefined,
closed,
isImage: d.geom.shape === "image",
opacity: d.geom.shape === "image" ? d.geom.opacity ?? 1 : undefined,
bbox: geomBBox(d.geom),
};
}