[14][12] Kaputte Projekte: keine Abfrage wirft mehr, validate warnt vor hängenden Verweisen
Kern fällt bei hängenden Wandtypen/Bauteilen/Schraffuren/Linienstilen/Deckentypen auf Vorgaben zurück (Plan, Schnitt, Ansicht, 3D, IFC, Mesh); typisierte Sicht tolerant (model/lenient.rs: nur der Wert, der nicht passt, fällt auf die Vorgabe); Mesh-Export verwirft gebrochene Indizes/NaN-Ecken; projectWarnings (project_refs.rs) für dossier-cli/MCP validate. Fuzz-Test src/core/robustness.test.ts.
This commit is contained in:
29 files changed
+1323
-271
No files matched your search
@@ -568,7 +568,7 @@ export function resolveTitleBlock(
|
||||
today: string = new Date().toISOString().slice(0, 10),
|
||||
): ResolvedTitleBlock {
|
||||
const arg = {
|
||||
layout: { id: layout.id, name: layout.name, planNumber: layout.planNumber, viewports: layout.viewports.slice(0, 1) },
|
||||
layout: { id: layout.id, name: layout.name, planNumber: layout.planNumber, viewports: (layout.viewports ?? []).slice(0, 1) },
|
||||
master: master ? { titleBlock: master.titleBlock } : null,
|
||||
today,
|
||||
};
|
||||
@@ -581,7 +581,8 @@ export function resolveTitleBlock(
|
||||
*/
|
||||
export function visibleCodesFromSnapshot(snap: ViewSnapshot): Set<string> {
|
||||
const out = new Set<string>();
|
||||
for (const [code, visible] of Object.entries(snap.layerVisibility)) {
|
||||
// Fehlt die Map (Datei/Import), ist nichts sichtbar — kein Absturz.
|
||||
for (const [code, visible] of Object.entries(snap.layerVisibility ?? {})) {
|
||||
if (visible) out.add(code);
|
||||
}
|
||||
return out;
|
||||
|
||||
Reference in new issue
Block a user