diff --git a/TODO.md b/TODO.md index f3d5e63b..995f9414 100644 --- a/TODO.md +++ b/TODO.md @@ -1882,7 +1882,10 @@ Reihenfolge = Abhängigkeiten. Neue Geometrie entsteht in Rust ([K]). der Blatt-Leiste, Klick wählt sie, HUD: Titel, X/Y, Arten, „Auswahl festhalten“ / automatisch. Offen: Verschieben per Ziehen (heute X/Y-Felder), DXF-Legende nur im Satz-Export (nicht im allgemeinen DXF-Dialog). - ○ **[65] Explosionsaxonometrie.** · S–M -- ○ **[66] Präsentationspläne mit einem Klick.** · M +- ◐ **[66] Präsentationspläne mit einem Klick.** · M — 4.11.: Standard-Ansichtsvorlagen (neue Projekte, „Standards + laden/aktualisieren"): „Präsentation" (farbig, Schatten, ohne Referenzen/Konstruktion), „Eingabeplan 1:100" und + „Ausführungsplan 1:50" (schwarz-weiss, fein, Strichstärken nach Massstab) — an Geschoss/Schnitt/Ansicht binden ([34]). + Offen: eigener Knopf „Präsentationsplan" (Blatt mit Grundrissen/Ansichten und Vorlage in einem Schritt). - ○ **[67] Skizzenstil.** · M - ◐ **[25] IFC-Import** → [B3] ✅ (Mesh), [B4] ◐ (Bauteile). · L - ◐ **[26] Dächer über beliebige Grundrisse.** `geometry/roofSkeleton.ts` (Walm/Sattel/Mansarde/ diff --git a/src-tauri/core/src/standards.rs b/src-tauri/core/src/standards.rs index e6c132a9..38d206a7 100644 --- a/src-tauri/core/src/standards.rs +++ b/src-tauri/core/src/standards.rs @@ -267,6 +267,20 @@ pub fn roof_types() -> Vec { } /// Alle Standard-Ressourcen je Projekt-Liste, in Abhängigkeitsreihenfolge. +/// [66] Ansichtsvorlagen für Pläne „mit einem Klick" (an Geschoss/Schnitt/Ansicht binden oder anwenden): +/// Präsentation (farbig, Schatten, ohne Referenz- und Konstruktionslinien), Eingabe 1:100 und Ausführung 1:50 +/// (schwarz-weiss nach SIA 400). +pub fn view_templates() -> Vec { + vec![ + json!({"id": "std-vt-praesentation", "name": "Präsentation", "detail": "mittel", "mono": false, "shadows": true, "hiddenLines": false, + "layerVisibility": {"90": false, "99": false}}), + json!({"id": "std-vt-eingabe-100", "name": "Eingabeplan 1:100", "detail": "mittel", "scaleDenominator": 100, "mono": true, "shadows": false, + "layerVisibility": {"99": false}}), + json!({"id": "std-vt-ausfuehrung-50", "name": "Ausführungsplan 1:50", "detail": "fein", "scaleDenominator": 50, "mono": true, "shadows": false, + "scaleLineWeights": true, "layerVisibility": {"99": false}}), + ] +} + pub fn library() -> Vec<(&'static str, Vec)> { vec![ ("lineStyles", line_styles()), @@ -275,6 +289,7 @@ pub fn library() -> Vec<(&'static str, Vec)> { ("wallTypes", wall_types()), ("ceilingTypes", ceiling_types()), ("roofTypes", roof_types()), + ("viewTemplates", view_templates()), ] } diff --git a/src/i18n/de.ts b/src/i18n/de.ts index 7ddfa16e..3cd6fe4c 100644 --- a/src/i18n/de.ts +++ b/src/i18n/de.ts @@ -1370,6 +1370,7 @@ export const de = { "resources.updateStandards.col.wallTypes": "Wandaufbauten", "resources.updateStandards.col.ceilingTypes": "Deckenaufbauten", "resources.updateStandards.col.roofTypes": "Dachaufbauten", + "resources.updateStandards.col.viewTemplates": "Ansichtsvorlagen", "resources.updateStandards.field.pattern": "Muster", "resources.updateStandards.field.scale": "Massstab", "resources.updateStandards.field.angle": "Winkel", @@ -1404,6 +1405,7 @@ export const de = { "resources.loadStandards.n.wallTypes": "{n} Wandaufbauten", "resources.loadStandards.n.ceilingTypes": "{n} Deckenaufbauten", "resources.loadStandards.n.roofTypes": "{n} Dachaufbauten", + "resources.loadStandards.n.viewTemplates": "{n} Ansichtsvorlagen", "resources.loadStandards.n.hatches": "{n} Schraffuren", "resources.loadStandards.n.lineStyles": "{n} Linientypen", "resources.col.lambda": "Wärmeleitfähigkeit λ [W/mK]", diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 1bf18011..ec4dc5c8 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -1363,6 +1363,7 @@ export const en: Record = { "resources.updateStandards.col.wallTypes": "Wall assemblies", "resources.updateStandards.col.ceilingTypes": "Ceiling assemblies", "resources.updateStandards.col.roofTypes": "Roof assemblies", + "resources.updateStandards.col.viewTemplates": "View templates", "resources.updateStandards.field.pattern": "Pattern", "resources.updateStandards.field.scale": "Scale", "resources.updateStandards.field.angle": "Angle", @@ -1397,6 +1398,7 @@ export const en: Record = { "resources.loadStandards.n.wallTypes": "{n} wall build-ups", "resources.loadStandards.n.ceilingTypes": "{n} ceiling build-ups", "resources.loadStandards.n.roofTypes": "{n} roof build-ups", + "resources.loadStandards.n.viewTemplates": "{n} view templates", "resources.loadStandards.n.hatches": "{n} hatches", "resources.loadStandards.n.lineStyles": "{n} line types", "resources.col.lambda": "Thermal conductivity λ [W/mK]", diff --git a/src/model/standards.test.ts b/src/model/standards.test.ts index e04a9510..85b065ca 100644 --- a/src/model/standards.test.ts +++ b/src/model/standards.test.ts @@ -35,7 +35,7 @@ describe("Standard-Bibliothek ([100]–[102])", () => { expect(c.components).toBe(35); expect(c.lineStyles).toBeGreaterThan(5); expect(c.wallTypes + c.ceilingTypes + c.roofTypes).toBe(5); - expect(standardsMergeCounts(standardsMergeOps(withStandards(empty)))).toEqual({ lineStyles: 0, hatches: 0, components: 0, wallTypes: 0, ceilingTypes: 0, roofTypes: 0 }); + expect(standardsMergeCounts(standardsMergeOps(withStandards(empty)))).toEqual({ lineStyles: 0, hatches: 0, components: 0, wallTypes: 0, ceilingTypes: 0, roofTypes: 0, viewTemplates: 0 }); }); it("Sinnbilder nach SIA 400 Fig. 34: Putz leer, Dämmung quer, Beton gekreuzt", () => { diff --git a/src/model/standards.ts b/src/model/standards.ts index 0c5ee550..c27d575d 100644 --- a/src/model/standards.ts +++ b/src/model/standards.ts @@ -26,10 +26,11 @@ export interface StandardsMergeCounts { wallTypes: number; ceilingTypes: number; roofTypes: number; + viewTemplates: number; } export function standardsMergeCounts(ops: readonly CoreOp[]): StandardsMergeCounts { - const out: StandardsMergeCounts = { lineStyles: 0, hatches: 0, components: 0, wallTypes: 0, ceilingTypes: 0, roofTypes: 0 }; + const out: StandardsMergeCounts = { lineStyles: 0, hatches: 0, components: 0, wallTypes: 0, ceilingTypes: 0, roofTypes: 0, viewTemplates: 0 }; for (const op of ops) { const key = op.kind === "add" ? op.collection : op.kind === "setField" ? op.key : null; const n = op.kind === "add" ? op.items.length : op.kind === "setField" && Array.isArray(op.value) ? op.value.length : 0; diff --git a/src/state/projectSlice.ts b/src/state/projectSlice.ts index dbbc7b47..fd7a0cd6 100644 --- a/src/state/projectSlice.ts +++ b/src/state/projectSlice.ts @@ -1035,7 +1035,7 @@ export function createProjectSlice( // Rückmeldung, was hinzukam ([101]); ein Undo-Schritt. const ops = standardsMergeOps(get().project); const c = standardsMergeCounts(ops); - const parts = (["components", "wallTypes", "ceilingTypes", "roofTypes", "hatches", "lineStyles"] as const) + const parts = (["components", "wallTypes", "ceilingTypes", "roofTypes", "hatches", "lineStyles", "viewTemplates"] as const) .filter((k) => c[k] > 0) .map((k) => t(`resources.loadStandards.n.${k}`, { n: c[k] })); if (ops.length) applyChange(ops); diff --git a/src/ui/resourceManager/StandardsUpdateDialog.tsx b/src/ui/resourceManager/StandardsUpdateDialog.tsx index 290a2184..9b869120 100644 --- a/src/ui/resourceManager/StandardsUpdateDialog.tsx +++ b/src/ui/resourceManager/StandardsUpdateDialog.tsx @@ -9,7 +9,7 @@ import type { Project } from "../../model/types"; import { standardsChangeKey, standardsUpdatePlan } from "../../model/standards"; import { t } from "../../i18n"; -const COLLECTION_ORDER = ["components", "hatches", "lineStyles", "wallTypes", "ceilingTypes", "roofTypes"]; +const COLLECTION_ORDER = ["components", "hatches", "lineStyles", "wallTypes", "ceilingTypes", "roofTypes", "viewTemplates"]; export function StandardsUpdateDialog({ project,