[94][95][96] Standards: SIA-400-Baustoffe mit Ansichtsschraffur, Linientypen, „Standards laden“

- Kern standards.rs: 33 Baustoffe/Bekleidungen (Schnittschraffur, Füll-/Ansichtsfarbe, Textur, λ, Rohdichte,
  VKF-RF), Schraffuren, Linientypen, Wand-/Decken-/Dachaufbauten; merge_ops ergänzt nur Fehlendes
- Kern surface_pattern.rs: Ansichtsschraffur (Lattung, Boden-Deckel, Läuferverband, Schindeln, Trapezblech,
  Naturstein polygonal, Plattenteilung), massstabsabhängig ausgedünnt; in Ansicht (Wände, Dächer) und
  Dachaufsicht; je Element drehbar/versetzbar
- Modell: Component.lambda/density/fireClass/elevationColor/surfacePattern/standardId,
  Wall/Roof.surfacePatternAngle/Offset
- render2d/Chunk-Pfad: Punkte im Strichmuster bleiben (Strichpunkt war Strichlinie), Bögen mit Punkten über
  den Strichpfad, Strichmuster skalieren mit dem Massstab; SVG runde Kappen bei Punkten
- Neue Projekte mit Standards, Ressourcen-Manager „Standards laden“, Bauteil-Felder, Textur von ambientCG laden
This commit is contained in:
Claude committed 2026-10-29 23:15:07 +00:00
1 parent f24d41607b
commit 2bd39cf404
35 files changed
+1707 -33

No files matched your search

+2
View File
@@ -52,6 +52,7 @@ import {
SectionLineSection,
DetailRefSection,
} from "./ObjectInfoPanel";
import { SurfacePatternPlacement } from "./SurfacePatternPlacement";
/** UI-Zustand des 3-Optionen-Quellen-Dropdowns (nicht 1:1 das Modell-Feld:
* „custom" ist abgeleitet aus „ist ein expliziter Wert gesetzt?", nicht
@@ -784,6 +785,7 @@ export function AttributesPanel() {
{sel.wall && <WallSection wall={sel.wall} host={host} />}
{sel.ceiling && <CeilingSection ceiling={sel.ceiling} host={host} />}
{sel.roof && <RoofSection roof={sel.roof} host={host} />}
{(sel.wall || sel.roof) && <SurfacePatternPlacement kind={sel.wall ? "wall" : "roof"} id={sel.id} host={host} />}
{sel.opening && <OpeningSection opening={sel.opening} host={host} />}
{sel.stair && <StairSection stair={sel.stair} host={host} />}
{sel.room && <RoomSection room={sel.room} roomId={sel.id} host={host} />}
+53
View File
@@ -0,0 +1,53 @@
// Ansichtsschraffur am Element ([94]): Drehung und Versatz des Oberflächenmusters je Wand bzw. Dach
// (das Muster selbst gehört zum Bauteil der sichtbaren Schicht). Nur sichtbar, wenn ein Bauteil des
// Elements ein Muster trägt.
import { t } from "../i18n";
import type { usePanelHost } from "./host";
export function SurfacePatternPlacement({
kind,
id,
host,
}: {
kind: "wall" | "roof";
id: string;
host: ReturnType<typeof usePanelHost>;
}) {
const p = host.project;
const el = kind === "wall" ? p.walls.find((w) => w.id === id) : p.roofs?.find((r) => r.id === id);
if (!el || !host.onSetSurfacePatternPlacement) return null;
const typeId = kind === "wall" ? (el as { wallTypeId?: string }).wallTypeId : (el as { roofTypeId?: string }).roofTypeId;
const types = kind === "wall" ? p.wallTypes : p.roofTypes ?? [];
const layers = types.find((tp) => tp.id === typeId)?.layers ?? [];
const hasPattern = layers.some((l) => p.components.find((c) => c.id === l.componentId)?.surfacePattern);
if (!hasPattern) return null;
const angle = el.surfacePatternAngle ?? 0;
const off = el.surfacePatternOffset ?? { x: 0, y: 0 };
const set = host.onSetSurfacePatternPlacement;
const field = (key: Parameters<typeof t>[0], value: number, step: number, apply: (v: number) => void) => (
<div className="objinfo-field">
<span className="objinfo-flabel">{t(key)}</span>
<input
type="number"
className="objinfo-text"
step={step}
value={Number(value.toFixed(3))}
title={t(key)}
onChange={(e) => {
const v = Number(e.target.value);
if (Number.isFinite(v)) apply(v);
}}
/>
</div>
);
return (
<>
<div className="objinfo-sep" />
<div className="objinfo-section-label">{t("objinfo.surfacePattern")}</div>
{field("objinfo.surfacePattern.angle", angle, 1, (v) => set({ surfacePatternAngle: v || undefined }))}
{field("objinfo.surfacePattern.offsetX", off.x, 0.01, (x) => set({ surfacePatternOffset: { x, y: off.y } }))}
{field("objinfo.surfacePattern.offsetY", off.y, 0.01, (y) => set({ surfacePatternOffset: { x: off.x, y } }))}
</>
);
}
+2
View File
@@ -394,6 +394,8 @@ export interface PanelHostValue {
* "both" = heutiges Verhalten, "below"/"above" = die Wand endet an der Decke.
*/
onSetWallSliceTermination: (termination: SliceTermination) => void;
/** Ansichtsschraffur ([94]) an der gewählten Wand bzw. am gewählten Dach drehen/versetzen. */
onSetSurfacePatternPlacement?: (patch: { surfacePatternAngle?: number; surfacePatternOffset?: { x: number; y: number } }) => void;
/** Weist der Wand einen Wandtyp-Preset (mehrschichtiger Aufbau) zu. */
onSetWallType: (wallTypeId: string) => void;
/** Setzt die Gesamtdicke einer einschichtigen Wand (Meter). */