[255] Baurecht-Nachweis: Ausnützung (GFZ/AZ/BMZ/ÜZ/GZ), Höhen und Grenzabstand gegen das Modell als Tabelle (Panel, CSV/PDF, Blatt-Tabelle, CLI)
This commit is contained in:
21 files changed
+690
-15
No files matched your search
@@ -0,0 +1,71 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { sampleProject } from "../model/sampleProject";
|
||||
import type { Project, Room, SiteRules, Wall } from "../model/types";
|
||||
import { applyOps } from "../core/ops";
|
||||
import { setField } from "../core/opsBuild";
|
||||
import { computeSiteProof } from "./siteProof";
|
||||
import { areaReportToCsv, buildAreaReport } from "../export/areaReport";
|
||||
|
||||
// Einfaches Haus wie in areaReport.test.ts: Achsen 10 × 8 m, EG-Räume innen 9.7 × 7.7 m, Parzelle 400 m².
|
||||
function house(rules?: Partial<SiteRules>): Project {
|
||||
const base = structuredClone(sampleProject) as Project;
|
||||
const wt = base.wallTypes[0]!;
|
||||
const type = { ...wt, id: "w30", layers: [{ ...wt.layers[0]!, thickness: 0.3 }] };
|
||||
const pts = [[0, 0], [10, 0], [10, 8], [0, 8]] as const;
|
||||
const walls = pts.map((a, i): Wall => {
|
||||
const b = pts[(i + 1) % 4]!;
|
||||
return { ...(base.walls[0] as Wall), id: `hw${i}`, floorId: "eg", start: { x: a[0], y: a[1] }, end: { x: b[0], y: b[1] }, wallTypeId: "w30", height: 2.6, bottom: undefined, top: undefined };
|
||||
});
|
||||
const room = (id: string, cat: Room["siaCategory"], y0: number, y1: number): Room => ({
|
||||
...(base.rooms![0] as Room), id, floorId: "eg", siaCategory: cat, name: id,
|
||||
boundary: [{ x: 0.15, y: y0 }, { x: 9.85, y: y0 }, { x: 9.85, y: y1 }, { x: 0.15, y: y1 }],
|
||||
});
|
||||
const p: Project = { ...base, name: "Haus", wallTypes: [type], walls, rooms: [room("a", "HNF", 0.15, 4.15), room("b", "NNF", 4.15, 5.85), room("c", "VF", 5.85, 7.85)], openings: [], extrudedSolids: undefined, roofs: undefined, parcelArea: 400, siteRules: undefined };
|
||||
if (!rules) return p;
|
||||
const siteRules: SiteRules = { parcel: [{ x: -5, y: -5 }, { x: 15, y: -5 }, { x: 15, y: 15 }, { x: -5, y: 15 }], defaultSetback: 1, ...rules };
|
||||
return applyOps(p, [setField("siteRules", siteRules)]);
|
||||
}
|
||||
|
||||
const row = (p: ReturnType<typeof computeSiteProof>, k: string) => p.rows.find((r) => r.key === k)!;
|
||||
|
||||
describe("computeSiteProof (Kern site_proof.rs)", () => {
|
||||
it("ohne Baurecht: Projektwerte da, keine Vorgaben, nichts erfüllt/verletzt", () => {
|
||||
const pr = computeSiteProof(house());
|
||||
expect(pr.hasLimits).toBe(false);
|
||||
expect(pr.allOk).toBeNull();
|
||||
expect(pr.rows.every((r) => r.allowed === null && r.ok === null)).toBe(true);
|
||||
expect(row(pr, "az").actual).toBeCloseTo(74.69 / 400, 5);
|
||||
expect(row(pr, "totalHeight").actual).toBeCloseTo(2.6, 4);
|
||||
expect(pr.notes).toContain("noRules");
|
||||
});
|
||||
|
||||
it("Vorgaben: Reserve, Überschreitung, Untergrenze", () => {
|
||||
const pr = computeSiteProof(house({ maxAz: 0.5, maxGfz: 0.2, maxHeight: 6, minGz: 0.3 }), { greenArea: 160 });
|
||||
expect(row(pr, "az").ok).toBe(true);
|
||||
expect(row(pr, "az").reserve).toBeCloseTo(0.5 - 74.69 / 400, 5);
|
||||
expect(row(pr, "gfz").ok).toBe(false);
|
||||
expect(row(pr, "gfz").reserve!).toBeLessThan(0);
|
||||
expect(row(pr, "totalHeight").ok).toBe(true);
|
||||
expect(row(pr, "gz").actual).toBeCloseTo(0.4, 5);
|
||||
expect(row(pr, "gz").ok).toBe(true);
|
||||
expect(row(pr, "setback").ok).toBe(true);
|
||||
expect(pr.allOk).toBe(false);
|
||||
expect(pr.basis.find((b) => b.key === "agsf")).toMatchObject({ value: 400, source: "parcelArea" });
|
||||
});
|
||||
});
|
||||
|
||||
describe("Baurecht-Nachweis im Bericht", () => {
|
||||
it("Abschnitte Nachweis + Grundlagen; fehlende Vorgabe als Strich; CSV enthält sie", () => {
|
||||
const rep = buildAreaReport(house({ maxAz: 0.5 }), { areas: false, siteProof: true });
|
||||
expect(rep.sections).toHaveLength(2);
|
||||
const az = rep.sections[0]!.rows.find((r) => typeof r.cells[0] === "string" && r.cells[0].startsWith("AZ"))!;
|
||||
expect(az.cells[1]).toEqual({ n: 0.5, d: 2 });
|
||||
expect(az.cells[4]).toBe("ja");
|
||||
const gfz = rep.sections[0]!.rows.find((r) => typeof r.cells[0] === "string" && r.cells[0].startsWith("GFZ"))!;
|
||||
expect(gfz.cells[1]).toBe("—");
|
||||
expect(gfz.cells[4]).toBe("—");
|
||||
const csv = areaReportToCsv(rep);
|
||||
expect(csv).toContain("0.50");
|
||||
expect(csv).toContain("aGSF");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,48 @@
|
||||
// Baurecht-Nachweis ([255]): Vorgaben der Parzelle (`Project.siteRules`) gegen die Kennzahlen des Modells —
|
||||
// zulässig · Projekt · Reserve/Überschreitung · erfüllt, dazu die Grundlagen mit Quelle. Rechnet der Kern
|
||||
// (`src-tauri/core/src/site_proof.rs`) auf dem Projekt-Dokument; diese Datei ist die typisierte Fassade.
|
||||
|
||||
import type { Project } from "../model/types";
|
||||
import { documentFor } from "../core/document";
|
||||
import type { IvhbOptions } from "./areaTable";
|
||||
|
||||
export interface ProofRow {
|
||||
/** gfz, az, bmz, uz, gz, totalHeight, facadeHeight, setback, profile. */
|
||||
key: string;
|
||||
/** `max`: Projekt ≤ zulässig; `min`: Projekt ≥ zulässig. */
|
||||
limit: "max" | "min";
|
||||
/** `null` = keine Vorgabe im Projekt. */
|
||||
allowed: number | null;
|
||||
actual: number | null;
|
||||
/** Positiv = Reserve, negativ = Überschreitung (Unterschreitung bei `min`). */
|
||||
reserve: number | null;
|
||||
/** `null` = nicht prüfbar (Vorgabe oder Projektwert fehlt). */
|
||||
ok: boolean | null;
|
||||
decimals: number;
|
||||
unit: string;
|
||||
}
|
||||
|
||||
export interface ProofBasis {
|
||||
/** agsf, allowedArea, gf, agf, agbf, baumasse, greenArea. */
|
||||
key: string;
|
||||
value: number | null;
|
||||
decimals: number;
|
||||
unit: string;
|
||||
/** Schlüssel der Quelle (`siteProof.src.<source>`). */
|
||||
source: string;
|
||||
}
|
||||
|
||||
export interface SiteProof {
|
||||
rows: ProofRow[];
|
||||
basis: ProofBasis[];
|
||||
/** Hinweis-Schlüssel (`siteProof.note.<key>`). */
|
||||
notes: string[];
|
||||
hasLimits: boolean;
|
||||
/** Alle prüfbaren Vorgaben erfüllt; `null` ohne prüfbare Vorgabe. */
|
||||
allOk: boolean | null;
|
||||
}
|
||||
|
||||
/** Baurecht-Nachweis; die Optionen wie bei {@link computeIvhb} (aGSF, Grünfläche, Basis der aGF). */
|
||||
export function computeSiteProof(project: Project, options: IvhbOptions = {}): SiteProof {
|
||||
return documentFor(project).query<SiteProof>("siteProof", [], JSON.stringify(options));
|
||||
}
|
||||
+6
-4
@@ -23,7 +23,7 @@
|
||||
// --snapshot <Name|id> übernimmt Geschoss, Massstab, Vorlage und Sichtbarkeit eines Ausschnitts [207]
|
||||
// dossier-cli <projekt.obp> ifc [--ebkph] [--ebenen] (IFC mit eBKP-H-Hauptgruppen bzw. Modell-Ebenen als Klassifikation)
|
||||
// --schema 4|2x3: IFC4 (Standard) oder IFC2x3 (Coordination View 2.0)
|
||||
// dossier-cli <projekt.obp> dxf [--binary] [--scale 100] [--dim-unit cm] [--layout]|dwg|ifc|step|obj [--no-mtl]|stl|glb|gltf|schedule [--openings|--elements|--rooms] [--format json|csv|svg|pdf]|kennzahlen [--sia416] [--ivhb] [--format json|csv|svg|pdf] [--agsf m2] [--gruenflaeche m2] [--agf-basis gf|ngf|nf] [--untergeschosse]|raumprogramm [--import tabelle] [--sheet name|nr] [--mode replace|append] [--tolerance %] [--generate] [--format json|csv|svg|pdf] [--save projekt.obp]|sun [--level EG] [--out datei]
|
||||
// dossier-cli <projekt.obp> dxf [--binary] [--scale 100] [--dim-unit cm] [--layout]|dwg|ifc|step|obj [--no-mtl]|stl|glb|gltf|schedule [--openings|--elements|--rooms] [--format json|csv|svg|pdf]|kennzahlen [--sia416] [--ivhb] [--nachweis] [--format json|csv|svg|pdf] [--agsf m2] [--gruenflaeche m2] [--agf-basis gf|ngf|nf] [--untergeschosse]|raumprogramm [--import tabelle] [--sheet name|nr] [--mode replace|append] [--tolerance %] [--generate] [--format json|csv|svg|pdf] [--save projekt.obp]|sun [--level EG] [--out datei]
|
||||
// glb/gltf = glTF 2.0 (Y-up, Meter, Geschoss als Eltern; --flat ohne Geschoss-Knoten)
|
||||
// dossier-cli convert <eingabe> <ausgabe> [--cmd "befehl"]… Format nach Endung: dxf/dwg/ifc/obp → obp-Import,
|
||||
// obp → dxf/dwg/ifc/obj/stl/glb/gltf/step; --cmd: weitere Befehle
|
||||
@@ -85,6 +85,7 @@ import {
|
||||
computeKennzahlen,
|
||||
computeAreaTable,
|
||||
computeIvhb,
|
||||
computeSiteProof,
|
||||
buildAreaReport,
|
||||
buildOpeningReport,
|
||||
openingSchedule,
|
||||
@@ -1025,7 +1026,7 @@ async function execute(project: Project, file: string, command: string, rest: st
|
||||
return 0;
|
||||
case "kennzahlen": {
|
||||
// --sia416 / --ivhb: Flächentabelle bzw. IVHB-Kennziffern [70]; --format json|csv|svg|pdf (Default json).
|
||||
if (args.flags.has("sia416") || args.flags.has("ivhb")) {
|
||||
if (args.flags.has("sia416") || args.flags.has("ivhb") || args.flags.has("nachweis")) {
|
||||
const num = (k: string): number | undefined => {
|
||||
const v = args.flags.get(k);
|
||||
if (v === undefined) return undefined;
|
||||
@@ -1038,14 +1039,15 @@ async function execute(project: Project, file: string, command: string, rest: st
|
||||
const ivhbOptions = { agsf: num("agsf"), greenArea: num("gruenflaeche"), agfBasis: basis, includeUnderground: args.flags.has("untergeschosse") } as const;
|
||||
const wantAreas = args.flags.has("sia416");
|
||||
const wantIvhb = args.flags.has("ivhb");
|
||||
const wantProof = args.flags.has("nachweis");
|
||||
const format = args.flags.get("format") ?? "json";
|
||||
const stem = `${exportProjectName(project) || "projekt"}-flaechen`;
|
||||
if (format === "json") {
|
||||
const json = { ...(wantAreas ? { flaechentabelle: computeAreaTable(project) } : {}), ...(wantIvhb ? { ivhb: computeIvhb(project, ivhbOptions) } : {}) };
|
||||
const json = { ...(wantAreas ? { flaechentabelle: computeAreaTable(project) } : {}), ...(wantIvhb ? { ivhb: computeIvhb(project, ivhbOptions) } : {}), ...(wantProof ? { baurechtNachweis: computeSiteProof(project, ivhbOptions) } : {}) };
|
||||
out(args, JSON.stringify(json, null, 2), `${stem}.json`);
|
||||
return 0;
|
||||
}
|
||||
const report = buildAreaReport(project, { areas: wantAreas, ivhb: wantIvhb, ivhbOptions });
|
||||
const report = buildAreaReport(project, { areas: wantAreas, ivhb: wantIvhb, siteProof: wantProof, ivhbOptions });
|
||||
if (format === "csv") out(args, areaReportToCsv(report), `${stem}.csv`);
|
||||
else if (format === "svg") out(args, areaReportToSvg(report), `${stem}.svg`);
|
||||
else if (format === "pdf") out(args, new Uint8Array(buildAreaReportPdf(report).output("arraybuffer")), `${stem}.pdf`);
|
||||
|
||||
@@ -186,6 +186,7 @@ export type QueryName =
|
||||
| "programCompare"
|
||||
| "programLayout"
|
||||
| "ivhb"
|
||||
| "siteProof"
|
||||
| "siteCheck"
|
||||
| "excavationQuantities"
|
||||
| "dormerStatus"
|
||||
|
||||
@@ -43,6 +43,8 @@ export { sheetTables, createTable, drawTablesPdf, tableCatalog, tableLabels, tab
|
||||
export type { TableOut, TablePrim, TableColumn } from "../export/sheetTable";
|
||||
export { computeAreaTable, computeIvhb } from "../analysis/areaTable";
|
||||
export type { AreaTable, AreaRow, Ivhb, IvhbOptions, AgfBasis } from "../analysis/areaTable";
|
||||
export { computeSiteProof } from "../analysis/siteProof";
|
||||
export type { SiteProof, ProofRow, ProofBasis } from "../analysis/siteProof";
|
||||
export { exportProjectName, competitionIdentity, isAnonymous, competitionKeyword, identityLeaks, NEUTRAL_DATE, NEUTRAL_ISO } from "../export/competitionIdentity";
|
||||
export type { CompetitionIdentity } from "../export/competitionIdentity";
|
||||
export { buildAreaReport, areaReportToCsv, parseAreaReportCsv, areaReportToSvg, buildAreaReportPdf } from "../export/areaReport";
|
||||
|
||||
@@ -17,6 +17,7 @@ import { t } from "../i18n/translate";
|
||||
import { core } from "../engine/coreWasm";
|
||||
import { computeAreaTable, computeIvhb } from "../analysis/areaTable";
|
||||
import type { AreaRow, IvhbOptions } from "../analysis/areaTable";
|
||||
import { computeSiteProof } from "../analysis/siteProof";
|
||||
|
||||
/** Zelle: Text oder Zahl (`d` Nachkommastellen, `null` = nicht berechenbar). */
|
||||
export type Cell = string | { n: number | null; d: number; g?: boolean };
|
||||
@@ -51,6 +52,8 @@ export interface AreaReportOptions {
|
||||
/** IVHB-Kennziffern aufnehmen (Default nein). */
|
||||
ivhb?: boolean;
|
||||
ivhbOptions?: IvhbOptions;
|
||||
/** Baurecht-Nachweis ([255]): Vorgaben der Parzelle gegen Kennzahlen, mit Grundlagen (Default nein). */
|
||||
siteProof?: boolean;
|
||||
}
|
||||
|
||||
const num = (n: number | null | undefined, d: number): Cell => ({ n: n === undefined || n === null || !Number.isFinite(n) ? null : n, d });
|
||||
@@ -115,6 +118,30 @@ export function buildAreaReport(project: Project, opts: AreaReportOptions = {}):
|
||||
notes.push(t("areas.foot.ivhb"));
|
||||
addNotes(v.notes);
|
||||
}
|
||||
if (opts.siteProof) {
|
||||
const pr = computeSiteProof(project, opts.ivhbOptions);
|
||||
const dash = t("siteProof.none");
|
||||
const val = (n: number | null, d: number): Cell => (n === null || !Number.isFinite(n) ? dash : { n, d });
|
||||
sections.push({
|
||||
heading: t("siteProof.table"),
|
||||
columns: [t("siteProof.col.item"), t("siteProof.col.allowed"), t("siteProof.col.actual"), t("siteProof.col.reserve"), t("siteProof.col.ok")],
|
||||
widths: [5, 1.6, 1.6, 2.2, 1.1],
|
||||
rows: pr.rows.map((r) => ({
|
||||
cells: [t(`siteProof.row.${r.key}`), val(r.allowed, r.decimals), val(r.actual, r.decimals), val(r.reserve, r.decimals), r.ok === null ? dash : t(r.ok ? "siteProof.ok.yes" : "siteProof.ok.no")],
|
||||
})),
|
||||
});
|
||||
sections.push({
|
||||
heading: t("siteProof.basis.title"),
|
||||
columns: [t("siteProof.col.item"), t("siteProof.col.value"), t("siteProof.col.source")],
|
||||
widths: [5, 1.8, 4.5],
|
||||
rows: pr.basis.map((b) => ({ cells: [t(`siteProof.basis.${b.key}`), val(b.value, b.decimals), t(`siteProof.src.${b.source}`)] })),
|
||||
});
|
||||
notes.push(t("siteProof.foot"));
|
||||
for (const k of pr.notes) {
|
||||
const text = t(`siteProof.note.${k}`);
|
||||
if (!notes.includes(text)) notes.push(text);
|
||||
}
|
||||
}
|
||||
return { title: t("areas.title"), ...reportHead(project), sections, notes };
|
||||
}
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@ describe("Tabellen auf dem Blatt ([111])", () => {
|
||||
|
||||
it("alle Quellen liefern Primitive; Katalog nennt die Spalten", () => {
|
||||
const cat = tableCatalog(sampleProject);
|
||||
expect(Object.keys(cat.sources).sort()).toEqual(["areas", "costs", "earthworks", "elements", "openings", "roomBook", "rooms"]);
|
||||
const p = withTables((["openings", "areas", "rooms", "elements", "earthworks", "roomBook", "costs"] as const).map((source) => table({ id: source, source })));
|
||||
expect(Object.keys(cat.sources).sort()).toEqual(["areas", "costs", "earthworks", "elements", "openings", "roomBook", "rooms", "siteProof"]);
|
||||
const p = withTables((["openings", "areas", "rooms", "elements", "earthworks", "roomBook", "costs", "siteProof"] as const).map((source) => table({ id: source, source })));
|
||||
const out = sheetTables(p, "L1");
|
||||
expect(out.map((o) => o.id)).toEqual(["openings", "areas", "rooms", "elements", "earthworks", "roomBook", "costs"]);
|
||||
expect(out.map((o) => o.id)).toEqual(["openings", "areas", "rooms", "elements", "earthworks", "roomBook", "costs", "siteProof"]);
|
||||
for (const o of out) expect(o.prims.some((x) => x.k === "text")).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ interface Catalog {
|
||||
valueKeys: string[];
|
||||
}
|
||||
|
||||
export const TABLE_SOURCES: readonly LayoutTableSource[] = ["openings", "areas", "rooms", "elements", "earthworks", "roomBook", "costs"];
|
||||
export const TABLE_SOURCES: readonly LayoutTableSource[] = ["openings", "areas", "rooms", "elements", "earthworks", "roomBook", "costs", "siteProof"];
|
||||
|
||||
export function tableSourceLabel(s: LayoutTableSource): string {
|
||||
return t(`sheetTable.source.${s}`);
|
||||
|
||||
@@ -4158,6 +4158,62 @@ export const de = {
|
||||
"render.toLayout.done": "Rendering ins Blatt „{name}“ eingesetzt.",
|
||||
// ── [209] Kostenschätzung grob ──
|
||||
"sheetTable.source.costs": "Kostenschätzung grob (eBKP-H)",
|
||||
"siteProof.title": "Baurecht-Nachweis",
|
||||
"siteProof.table": "Nachweis gegen das Baurecht",
|
||||
"siteProof.basis.title": "Grundlagen des Nachweises",
|
||||
"siteProof.col.item": "Prüfgrösse",
|
||||
"siteProof.col.allowed": "Zulässig",
|
||||
"siteProof.col.actual": "Projekt",
|
||||
"siteProof.col.reserve": "Reserve (+) / Überschr. (−)",
|
||||
"siteProof.col.ok": "Erfüllt",
|
||||
"siteProof.col.basis": "Grundlage",
|
||||
"siteProof.col.value": "Wert",
|
||||
"siteProof.col.source": "Quelle",
|
||||
"siteProof.ok.yes": "ja",
|
||||
"siteProof.ok.no": "nein",
|
||||
"siteProof.none": "—",
|
||||
"siteProof.row.gfz": "GFZ Geschossflächenziffer (max.)",
|
||||
"siteProof.row.az": "AZ Ausnützungsziffer (max.)",
|
||||
"siteProof.row.bmz": "BMZ Baumassenziffer [m] (max.)",
|
||||
"siteProof.row.uz": "ÜZ Überbauungsziffer (max.)",
|
||||
"siteProof.row.gz": "GZ Grünflächenziffer (min.)",
|
||||
"siteProof.row.totalHeight": "Gesamthöhe [m] (max.)",
|
||||
"siteProof.row.facadeHeight": "Fassadenhöhe [m] (max.)",
|
||||
"siteProof.row.setback": "Grundfläche ausserhalb Grenzabstand/Baulinie [m²]",
|
||||
"siteProof.row.profile": "Bauteile über dem Gebäudeprofil [Anzahl]",
|
||||
"siteProof.basis.agsf": "Anrechenbare Grundstücksfläche aGSF [m²]",
|
||||
"siteProof.basis.allowedArea": "Zulässige Grundfläche nach Grenzabstand [m²]",
|
||||
"siteProof.basis.gf": "Geschossfläche GF, angerechnet [m²]",
|
||||
"siteProof.basis.agf": "Anrechenbare Geschossfläche aGF [m²]",
|
||||
"siteProof.basis.agbf": "Anrechenbare Gebäudefläche aGbF [m²]",
|
||||
"siteProof.basis.baumasse": "Baumasse oberirdisch [m³]",
|
||||
"siteProof.basis.greenArea": "Anrechenbare Grünfläche [m²]",
|
||||
"siteProof.src.agsfInput": "Eingabe",
|
||||
"siteProof.src.parcelArea": "Parzellenfläche des Projekts",
|
||||
"siteProof.src.parcelRing": "Fläche der Parzellengrenze (Baurecht)",
|
||||
"siteProof.src.none": "nicht gesetzt",
|
||||
"siteProof.src.setbacks": "Parzelle abzüglich Grenzabstände und Baulinien",
|
||||
"siteProof.src.sia416": "Flächentabelle SIA 416, oberirdisch",
|
||||
"siteProof.src.agfNgf": "SIA 416, NGF oberirdisch",
|
||||
"siteProof.src.agfGf": "SIA 416, GF oberirdisch",
|
||||
"siteProof.src.agfNf": "SIA 416, NF oberirdisch",
|
||||
"siteProof.src.footprint": "Grundfläche der Wände über ±0.00 (IVHB)",
|
||||
"siteProof.src.volumeAbove": "Volumen über ±0.00",
|
||||
"siteProof.src.greenInput": "Eingabe",
|
||||
"siteProof.note.noRules": "Kein Baurecht erfasst (Panel Lage): alle Vorgaben fehlen.",
|
||||
"siteProof.note.noLimits": "Keine Vorgaben für Ziffern oder Höhen gesetzt (Panel Lage, Baurecht); Zeilen mit „—“ sind nicht prüfbar.",
|
||||
"siteProof.note.heightTerrain": "Gesamthöhe über dem massgebenden Terrain (tiefstes gewachsenes Terrain an der Fassade).",
|
||||
"siteProof.note.heightZero": "Gesamthöhe über ±0.00 (kein Geländemodell).",
|
||||
"siteProof.note.facadeApprox": "Fassadenhöhe = höchste Wandoberkante über ±0.00 (Näherung).",
|
||||
"siteProof.foot": "Zulässige Werte aus den Baurecht-Eingaben des Projekts (kantonales Recht); Begriffe nach IVHB, Flächen nach SIA 416. Reserve = zulässig − Projekt (bei Mindestwerten Projekt − zulässig).",
|
||||
"siteRules.maxGfz": "GFZ max.",
|
||||
"siteRules.maxAz": "AZ max.",
|
||||
"siteRules.maxBmz": "BMZ max.",
|
||||
"siteRules.maxUz": "ÜZ max.",
|
||||
"siteRules.minGz": "GZ min.",
|
||||
"siteRules.maxFacadeHeight": "Fassadenhöhe max.",
|
||||
"siteRules.ratios.hint": "Zulässige Ziffern für den Baurecht-Nachweis (Flächenbilanz); leer = keine Vorgabe.",
|
||||
"sheetTable.source.siteProof": "Baurecht-Nachweis (AZ, ÜZ, Höhen)",
|
||||
"sheetTable.col.costCode": "eBKP-H",
|
||||
"sheetTable.col.costGroup": "Gruppe",
|
||||
"sheetTable.col.quantity": "Menge",
|
||||
|
||||
@@ -4144,6 +4144,62 @@ export const en: Record<TranslationKey, string> = {
|
||||
"render.toLayout.done": "Rendering placed on sheet \"{name}\".",
|
||||
// ── [209] Kostenschätzung grob ──
|
||||
"sheetTable.source.costs": "Cost estimate (eBKP-H)",
|
||||
"siteProof.title": "Zoning compliance",
|
||||
"siteProof.table": "Compliance with building regulations",
|
||||
"siteProof.basis.title": "Basis of the check",
|
||||
"siteProof.col.item": "Item",
|
||||
"siteProof.col.allowed": "Allowed",
|
||||
"siteProof.col.actual": "Project",
|
||||
"siteProof.col.reserve": "Reserve (+) / excess (−)",
|
||||
"siteProof.col.ok": "Met",
|
||||
"siteProof.col.basis": "Basis",
|
||||
"siteProof.col.value": "Value",
|
||||
"siteProof.col.source": "Source",
|
||||
"siteProof.ok.yes": "yes",
|
||||
"siteProof.ok.no": "no",
|
||||
"siteProof.none": "—",
|
||||
"siteProof.row.gfz": "GFA ratio (GFZ) (max.)",
|
||||
"siteProof.row.az": "Floor area ratio (AZ) (max.)",
|
||||
"siteProof.row.bmz": "Building mass ratio (BMZ) [m] (max.)",
|
||||
"siteProof.row.uz": "Site coverage ratio (ÜZ) (max.)",
|
||||
"siteProof.row.gz": "Green space ratio (GZ) (min.)",
|
||||
"siteProof.row.totalHeight": "Total height [m] (max.)",
|
||||
"siteProof.row.facadeHeight": "Facade height [m] (max.)",
|
||||
"siteProof.row.setback": "Footprint outside setbacks/building lines [m²]",
|
||||
"siteProof.row.profile": "Parts above the building profile [count]",
|
||||
"siteProof.basis.agsf": "Eligible site area (aGSF) [m²]",
|
||||
"siteProof.basis.allowedArea": "Buildable area after setbacks [m²]",
|
||||
"siteProof.basis.gf": "Gross floor area (GF), counted [m²]",
|
||||
"siteProof.basis.agf": "Eligible floor area (aGF) [m²]",
|
||||
"siteProof.basis.agbf": "Eligible building footprint (aGbF) [m²]",
|
||||
"siteProof.basis.baumasse": "Building mass above ground [m³]",
|
||||
"siteProof.basis.greenArea": "Eligible green area [m²]",
|
||||
"siteProof.src.agsfInput": "Input",
|
||||
"siteProof.src.parcelArea": "Site area of the project",
|
||||
"siteProof.src.parcelRing": "Area of the site boundary (zoning)",
|
||||
"siteProof.src.none": "not set",
|
||||
"siteProof.src.setbacks": "Site minus setbacks and building lines",
|
||||
"siteProof.src.sia416": "SIA 416 area table, above ground",
|
||||
"siteProof.src.agfNgf": "SIA 416, NGF above ground",
|
||||
"siteProof.src.agfGf": "SIA 416, GF above ground",
|
||||
"siteProof.src.agfNf": "SIA 416, NF above ground",
|
||||
"siteProof.src.footprint": "Wall footprint above ±0.00 (IVHB)",
|
||||
"siteProof.src.volumeAbove": "Volume above ±0.00",
|
||||
"siteProof.src.greenInput": "Input",
|
||||
"siteProof.note.noRules": "No zoning rules entered (Site panel): all limits are missing.",
|
||||
"siteProof.note.noLimits": "No limits set for ratios or heights (Site panel, zoning); rows with “—” cannot be checked.",
|
||||
"siteProof.note.heightTerrain": "Total height above the reference terrain (lowest natural terrain at the facade).",
|
||||
"siteProof.note.heightZero": "Total height above ±0.00 (no terrain model).",
|
||||
"siteProof.note.facadeApprox": "Facade height = highest wall top above ±0.00 (approximation).",
|
||||
"siteProof.foot": "Allowed values come from the project's zoning inputs (cantonal law); terms follow IVHB, areas follow SIA 416. Reserve = allowed − project (for minimum values project − allowed).",
|
||||
"siteRules.maxGfz": "Max. GFZ",
|
||||
"siteRules.maxAz": "Max. AZ",
|
||||
"siteRules.maxBmz": "Max. BMZ",
|
||||
"siteRules.maxUz": "Max. ÜZ",
|
||||
"siteRules.minGz": "Min. GZ",
|
||||
"siteRules.maxFacadeHeight": "Max. facade height",
|
||||
"siteRules.ratios.hint": "Allowed ratios for the zoning compliance check (area balance); empty = no limit.",
|
||||
"sheetTable.source.siteProof": "Zoning compliance (AZ, ÜZ, heights)",
|
||||
"sheetTable.col.costCode": "eBKP-H",
|
||||
"sheetTable.col.costGroup": "Group",
|
||||
"sheetTable.col.quantity": "Quantity",
|
||||
|
||||
@@ -286,6 +286,8 @@ export function buildWettbewerbSampleProject(): Project {
|
||||
// Grenzabstände je Parzellenkante (Süd, Ost, Nord/Strasse, West).
|
||||
setbacks: [4, 4, 5, 4], defaultSetback: 4,
|
||||
maxHeight: 12, show: true, show3d: true,
|
||||
// Beispielwerte (fiktive Zone) für den Baurecht-Nachweis [255].
|
||||
maxAz: 0.8, maxUz: 0.35, maxFacadeHeight: 12,
|
||||
},
|
||||
referenceElevationMasl: 441.3,
|
||||
geoAnchor: { lv95: { e: 2697450, n: 1261800 }, height: 441.3, model: P(0, 0), label: "Hofwiesenstrasse, 8400 Winterthur (fiktiv)" },
|
||||
|
||||
@@ -2047,7 +2047,8 @@ export type LayoutTableSource =
|
||||
| "elements"
|
||||
| "earthworks"
|
||||
| "roomBook"
|
||||
| "costs";
|
||||
| "costs"
|
||||
| "siteProof";
|
||||
|
||||
/**
|
||||
* Einfache Textfelder des Titelblocks (Master). Alle optional — leere Felder
|
||||
@@ -3644,6 +3645,20 @@ export type SiteRules = {
|
||||
buildingLines?: Array<{ a: Vec2; b: Vec2 }>;
|
||||
/** Zulässige Gesamthöhe über ±0.00 (m). */
|
||||
maxHeight?: number;
|
||||
/**
|
||||
* Zulässige Fassadenhöhe (m, höchste Wandoberkante über ±0.00) für den Baurecht-Nachweis.
|
||||
*/
|
||||
maxFacadeHeight?: number;
|
||||
/** Zulässige Geschossflächenziffer GFZ (IVHB) für den Baurecht-Nachweis. */
|
||||
maxGfz?: number;
|
||||
/** Zulässige Ausnützungsziffer AZ (aGF / aGSF) für den Baurecht-Nachweis. */
|
||||
maxAz?: number;
|
||||
/** Zulässige Baumassenziffer BMZ (m³/m²) für den Baurecht-Nachweis. */
|
||||
maxBmz?: number;
|
||||
/** Zulässige Überbauungsziffer ÜZ (aGbF / aGSF) für den Baurecht-Nachweis. */
|
||||
maxUz?: number;
|
||||
/** Mindest-Grünflächenziffer GZ für den Baurecht-Nachweis. */
|
||||
minGz?: number;
|
||||
/** Parzelle, zulässige Fläche und Verstösse im Grundriss zeigen (Default: ja). */
|
||||
show?: boolean;
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ export function AreaTableSection() {
|
||||
const [inputs, setInputs] = useState<AreaInputs>(DEFAULT_AREA_INPUTS);
|
||||
const notify = useStore((s) => s.notify);
|
||||
const report = useMemo(
|
||||
() => buildAreaReport(project, { areas: true, ivhb: true, ivhbOptions: ivhbOptionsOf(inputs) }),
|
||||
() => buildAreaReport(project, { areas: true, ivhb: true, siteProof: true, ivhbOptions: ivhbOptionsOf(inputs) }),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[project, inputs],
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// Grundriss entsteht aus `Project.siteRules` (`plan/generatePlan/siteRules.ts`).
|
||||
|
||||
import { t } from "../i18n";
|
||||
import type { TranslationKey } from "../i18n";
|
||||
import { useSelectionInfo } from "../state/useSelectionInfo";
|
||||
import { useStore } from "../state/appStore";
|
||||
import { checkSiteRules, patchItem, setField } from "../core";
|
||||
@@ -44,6 +45,16 @@ function withProjection<T extends { siteProjection?: boolean }>(e: T, on: boolea
|
||||
return (on ? { ...rest, siteProjection: true } : rest) as T;
|
||||
}
|
||||
|
||||
/** Zulässige Ziffern/Höhen für den Baurecht-Nachweis ([255]); leer oder 0 = keine Vorgabe. */
|
||||
const PROOF_FIELDS: { field: "maxFacadeHeight" | "maxGfz" | "maxAz" | "maxBmz" | "maxUz" | "minGz"; label: TranslationKey; step: number; unit: string }[] = [
|
||||
{ field: "maxFacadeHeight", label: "siteRules.maxFacadeHeight", step: 0.5, unit: "m" },
|
||||
{ field: "maxGfz", label: "siteRules.maxGfz", step: 0.05, unit: "" },
|
||||
{ field: "maxAz", label: "siteRules.maxAz", step: 0.05, unit: "" },
|
||||
{ field: "maxBmz", label: "siteRules.maxBmz", step: 0.1, unit: "m" },
|
||||
{ field: "maxUz", label: "siteRules.maxUz", step: 0.05, unit: "" },
|
||||
{ field: "minGz", label: "siteRules.minGz", step: 0.05, unit: "" },
|
||||
];
|
||||
|
||||
export function SiteRulesSection() {
|
||||
const project = useStore((s) => s.project);
|
||||
const applyChange = useStore((s) => s.applyChange);
|
||||
@@ -170,6 +181,29 @@ export function SiteRulesSection() {
|
||||
<span>m</span>
|
||||
</label>
|
||||
|
||||
{PROOF_FIELDS.map((f) => (
|
||||
<label key={f.field} className="kz-parcel" title={t("siteRules.ratios.hint")}>
|
||||
<span>{t(f.label)}</span>
|
||||
<input
|
||||
type="number"
|
||||
min={0}
|
||||
step={f.step}
|
||||
className="kz-input kz-num"
|
||||
value={rules[f.field] ?? ""}
|
||||
placeholder="–"
|
||||
onChange={(e) => {
|
||||
const v = parseLen(e.target.value);
|
||||
if (v === null) return;
|
||||
write((r) => {
|
||||
const { [f.field]: _old, ...rest } = r;
|
||||
return v === undefined || v === 0 ? rest : { ...rest, [f.field]: v };
|
||||
}, `siteRules:${f.field}`);
|
||||
}}
|
||||
/>
|
||||
<span>{f.unit}</span>
|
||||
</label>
|
||||
))}
|
||||
|
||||
<label className="kz-parcel" title={t("siteRules.profileAngle.hint")}>
|
||||
<span>{t("siteRules.profileAngle")}</span>
|
||||
<input
|
||||
|
||||
Reference in new issue
Block a user