Merge branch 'worktree-agent-a6b600eecf6bd85ef' into claude/practical-noether-1hb2s1

# Conflicts:
#	src-tauri/core/src/plan/context.rs
#	src/plan/__golden__/komplex-ansicht-ansicht-sued.txt
This commit is contained in:
Claude committed 2026-11-11 05:37:26 +00:00
commit 2213a674d4
53 files changed
+680 -81

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
// [180] Klassen der abgeleiteten Darstellung: alles Sichtbare liegt auf einer Klasse, auch was nicht zu einem
// Element gehört (Schatten, Schnittmarken, automatische Koten) oder ein Befehl erzeugt (Aussenbemassung).
// Die Codes stehen im Kern (`src-tauri/core/src/standards.rs`, `DERIVED_CATEGORIES`; „Standards laden" legt die
// Klassen an); hier nur die Codes für die TS-Seite (Gleichheit prüft `derivedCategories.test.ts`).
// Fehlt eine Klasse im Projekt, bleibt die Darstellung sichtbar (wie im Kern `standards::derived_visible`).
import type { LayerCategory } from "./types";
import { findCategory } from "./layers";
/** Sonnenschatten im Grundriss, Schlagschatten in der Ansicht. */
export const SHADOW_CATEGORY = "08";
/** Automatische Aussenbemassung (Befehl `autodim`). */
export const AUTO_DIM_CATEGORY = "81";
/** Automatische Höhenkoten in Schnitt und Ansicht. */
export const LEVEL_MARK_CATEGORY = "82";
/** Schnitt- und Ansichtsmarken im Grundriss. */
export const SECTION_MARK_CATEGORY = "91";
export const DERIVED_CATEGORY_CODES: readonly string[] = [SHADOW_CATEGORY, AUTO_DIM_CATEGORY, LEVEL_MARK_CATEGORY, SECTION_MARK_CATEGORY];
/** Abgeleitete Darstellung der Klasse `code` sichtbar: Klasse eingeblendet (`shown`) oder im Projekt nicht vorhanden. */
export function derivedVisible(layers: LayerCategory[], code: string, shown: (code: string) => boolean): boolean {
return shown(code) || !findCategory(layers, code);
}
+1 -1
View File
@@ -92,7 +92,7 @@ describe("translateProject", () => {
it("Extrusion: points + Kreis-Mitte verschieben sich", () => {
const solid: ExtrudedSolid = {
id: "EX1",
type: "extrudedSolid",
type: "extrudedSolid", categoryCode: "20",
levelId: "eg",
points: [{ x: 0, y: 0 }, { x: 1, y: 0 }, { x: 1, y: 1 }],
height: 1,
+2 -2
View File
@@ -88,8 +88,8 @@ export function richProject(): Project {
{ type: "image", categoryCode: "03", id: "c4", name: "Luftbild", src: "data:image/png;base64,AAAA", min: { x: 0, y: 0 }, max: { x: 10, y: 10 }, opacity: 0.7, drape: true, filters: { saturation: 0.5, grayscale: 1 } },
],
extrudedSolids: [
{ id: "x1", type: "extrudedSolid", levelId: lvl, points: [{ x: 0, y: 0 }, { x: 1, y: 0 }, { x: 1, y: 1 }], height: 2, baseOffset: 0.1, operation: "subtract", taper: 0.1, cornerRadius: 0.05, chamfer: 0.02 },
{ id: "x2", type: "extrudedSolid", levelId: lvl, points: [], height: 1, circle: { center: { x: 3, y: 3 }, r: 0.4 }, brep: { spec: { kind: "box", w: 1, nested: { a: [1, 2] } }, origin: { x: 0, y: 0 }, label: "Quader" } },
{ id: "x1", type: "extrudedSolid", categoryCode: "20", levelId: lvl, points: [{ x: 0, y: 0 }, { x: 1, y: 0 }, { x: 1, y: 1 }], height: 2, baseOffset: 0.1, operation: "subtract", taper: 0.1, cornerRadius: 0.05, chamfer: 0.02 },
{ id: "x2", type: "extrudedSolid", categoryCode: "20", levelId: lvl, points: [], height: 1, circle: { center: { x: 3, y: 3 }, r: 0.4 }, brep: { spec: { kind: "box", w: 1, nested: { a: [1, 2] } }, origin: { x: 0, y: 0 }, label: "Quader" } },
],
columns: [
{
+6
View File
@@ -370,6 +370,9 @@ export const sampleProject: Project = {
layers: [
{ code: "00", name: "Raster", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
{ code: "01", name: "Vermessung", color: "#4a4a4a", lw: 0.18, visible: true, locked: false },
// [180] Klassen der abgeleiteten Darstellung (wie „Standards laden", Kern `standards.rs`): Schatten,
// Auto-Bemassung, automatische Höhenkoten in Schnitt/Ansicht, Schnitt-/Ansichtsmarken.
{ code: "08", name: "Schatten", color: "#707078", lw: 0.13, 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).
@@ -409,7 +412,10 @@ export const sampleProject: Project = {
{ 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 },
{ code: "81", name: "Auto-Bemassung", color: "#303038", lw: 0.13, visible: true, locked: false },
{ code: "82", name: "Höhenkoten", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
{ code: "90", name: "Referenzen", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
{ code: "91", name: "Schnittmarken", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
{ code: "99", name: "Konstruktion", color: "#404040", lw: 0.13, visible: true, locked: false },
],
// [140] Strichstärken folgen dem Massstab (neue Projekte; bestehende behalten ihre Einstellung).
+3 -2
View File
@@ -484,9 +484,9 @@ const columns: NonNullable<Project["columns"]> = [
const extrudedSolids: NonNullable<Project["extrudedSolids"]> = [
// Abzugskörper: Durchreiche Küche ↔ Atelier in der EG-Innenwand x = 6.
{ id: "void-durchreiche", type: "extrudedSolid", levelId: "eg", points: rect(5.8, 6.6, 6.2, 7.8), height: 0.6, baseOffset: 1.0, operation: "subtract" },
{ id: "void-durchreiche", type: "extrudedSolid", levelId: "eg", categoryCode: "20", points: rect(5.8, 6.6, 6.2, 7.8), height: 0.6, baseOffset: 1.0, operation: "subtract" },
// Freier Körper: runder Brunnentrog im Garten (Kreisprofil, Fase).
{ id: "koerper-brunnen", type: "extrudedSolid", levelId: "ug", points: [], circle: { center: P(4.5, -6.5), r: 0.7 }, height: 0.6, baseOffset: -0.1, chamfer: 0.03 },
{ id: "koerper-brunnen", type: "extrudedSolid", levelId: "ug", categoryCode: "20", points: [], circle: { center: P(4.5, -6.5), r: 0.7 }, height: 0.6, baseOffset: -0.1, chamfer: 0.03 },
];
// ═════════════════════════════════════════════════════════════════════════════
@@ -872,6 +872,7 @@ export function buildComplexSampleProject(): Project {
p = addRooms(p);
// Aussenbemassung (Massketten je Fassade) in UG, EG, OG.
// [180] Die Ketten landen auf der Klasse „81 Auto-Bemassung" (Befehl `autodim`), nicht auf der aktiven.
for (const f of ["ug", "eg", "og"]) p = runCmd(p, f, "autodim", {}, "80").project;
return p;
}
+4
View File
@@ -1287,6 +1287,10 @@ export type ExtrudedSolid = {
type: "extrudedSolid";
/** Geschoss, dessen `baseElevation` die UK des Körpers bestimmt. */
levelId: string;
/**
* [180] Klasse (Ebene/Kategorie) wie bei jedem Bauteil: Sichtbarkeit in Grundriss, Schnitt und Ansicht.
*/
categoryCode: string;
/**
* Geschlossenes Profil in der XY-Ebene (Grundriss), ≥3 Punkte. Bei einem
* Kreis-Profil (`circle` gesetzt) eine Tessellierung des Kreises (48-Eck) —