[137] Objekt-Info für Gelände/Baugrube, Schatten und Baurechtslinien anwählbar (Pseudo-Auswahl site)
This commit is contained in:
15 files changed
+447
-232
No files matched your search
@@ -457,6 +457,10 @@ export const de = {
|
||||
"objinfo.kind.column": "Stütze",
|
||||
"objinfo.kind.roof": "Dach",
|
||||
"objinfo.kind.contextObject": "Kontext-Objekt",
|
||||
"objinfo.kind.sunStudy": "Schatten (Sonnenstand)",
|
||||
"objinfo.kind.siteRules": "Baurecht",
|
||||
"objinfo.sunStudy.hint": "Schatten werden aus dem Modell abgeleitet — Datum und Uhrzeit hier ändern.",
|
||||
"objinfo.siteRules.hint": "Parzellengrenze und zulässige Fläche kommen aus dem Baurecht — hier bearbeiten.",
|
||||
// ── Kontext-Objekt-Attribute (Object-Info-Panel) ────────────────────────
|
||||
"objinfo.contextObject.section": "Georeferenzierung",
|
||||
"objinfo.contextObject.type": "Art",
|
||||
@@ -464,6 +468,7 @@ export const de = {
|
||||
"objinfo.contextObject.type.terrainMesh": "Gelände",
|
||||
"objinfo.contextObject.type.contourSet": "Höhenlinien",
|
||||
"objinfo.contextObject.type.image": "Luftbild",
|
||||
"objinfo.contextObject.type.excavation": "Baugrube",
|
||||
"objinfo.contextObject.lv95E": "LV95 Ost (E)",
|
||||
"objinfo.contextObject.lv95N": "LV95 Nord (N)",
|
||||
"objinfo.contextObject.noAnchor": "Kein Standort-Bezug im Projekt",
|
||||
@@ -2087,6 +2092,12 @@ export const de = {
|
||||
"site.excavation.shoring": "Verbau (senkrecht), Kante",
|
||||
"site.excavation.shoringHint": "Gewählte Kanten: senkrechte Wand (Spundwand) statt Böschung",
|
||||
"site.earthDepth": "Erdreich-Band im Schnitt [m]",
|
||||
"site.terrain.visible": "Gelände sichtbar",
|
||||
"site.terrain.visible.hint": "Blendet die Kategorie {name} ein oder aus (alle Ansichten, ein Undo-Schritt)",
|
||||
"site.terrain.smooth": "Glättung",
|
||||
"site.terrain.smooth.hint": "Gelände aus den Höhenlinien neu erzeugen (Bruchkanten bleiben, ein Undo-Schritt)",
|
||||
"site.terrain.smooth.raw": "roh (ohne Glättung)",
|
||||
"site.terrain.smooth.level": "Stufe {n}",
|
||||
"site.type.image": "Luftbild",
|
||||
"site.group.image": "Luftbild",
|
||||
"site.dwgHint": "DWG? Zuerst mit dem gratis ODA File Converter in DXF umwandeln.",
|
||||
@@ -2174,6 +2185,9 @@ export const de = {
|
||||
"pick.kind.room": "Raum",
|
||||
"pick.kind.roof": "Dach",
|
||||
"pick.kind.context": "Kontext-Objekt",
|
||||
"pick.kind.site": "Lage",
|
||||
"pick.site.sunStudy": "Schatten (Sonnenstand)",
|
||||
"pick.site.siteRules": "Baurecht",
|
||||
"pick.shape.line": "Linie",
|
||||
"pick.shape.polyline": "Polylinie",
|
||||
"pick.shape.area": "Fläche",
|
||||
|
||||
@@ -455,6 +455,10 @@ export const en: Record<TranslationKey, string> = {
|
||||
"objinfo.kind.column": "Column",
|
||||
"objinfo.kind.roof": "Roof",
|
||||
"objinfo.kind.contextObject": "Context object",
|
||||
"objinfo.kind.sunStudy": "Shadow (sun position)",
|
||||
"objinfo.kind.siteRules": "Building regulations",
|
||||
"objinfo.sunStudy.hint": "Shadows are derived from the model — change date and time here.",
|
||||
"objinfo.siteRules.hint": "Parcel boundary and buildable area come from the building regulations — edit them here.",
|
||||
// ── Context object attributes (object info panel) ───────────────────────
|
||||
"objinfo.contextObject.section": "Georeferencing",
|
||||
"objinfo.contextObject.type": "Type",
|
||||
@@ -462,6 +466,7 @@ export const en: Record<TranslationKey, string> = {
|
||||
"objinfo.contextObject.type.terrainMesh": "Terrain",
|
||||
"objinfo.contextObject.type.contourSet": "Contours",
|
||||
"objinfo.contextObject.type.image": "Aerial image",
|
||||
"objinfo.contextObject.type.excavation": "Excavation",
|
||||
"objinfo.contextObject.lv95E": "LV95 East (E)",
|
||||
"objinfo.contextObject.lv95N": "LV95 North (N)",
|
||||
"objinfo.contextObject.noAnchor": "No location reference in project",
|
||||
@@ -2073,6 +2078,12 @@ export const en: Record<TranslationKey, string> = {
|
||||
"site.excavation.shoring": "Shoring (vertical), edge",
|
||||
"site.excavation.shoringHint": "Selected edges: vertical wall (sheet piling) instead of a slope",
|
||||
"site.earthDepth": "Earth band in section [m]",
|
||||
"site.terrain.visible": "Terrain visible",
|
||||
"site.terrain.visible.hint": "Shows or hides the category {name} (all views, one undo step)",
|
||||
"site.terrain.smooth": "Smoothing",
|
||||
"site.terrain.smooth.hint": "Regenerate the terrain from its contour lines (breaklines kept, one undo step)",
|
||||
"site.terrain.smooth.raw": "raw (no smoothing)",
|
||||
"site.terrain.smooth.level": "Level {n}",
|
||||
"site.excavation.qty": "Cut {cut} m³ · Fill {fill} m³ · Backfill {backfill} m³",
|
||||
"site.excavation.noTerrain": "No terrain below the excavation",
|
||||
"site.type.image": "Aerial",
|
||||
@@ -2162,6 +2173,9 @@ export const en: Record<TranslationKey, string> = {
|
||||
"pick.kind.room": "Room",
|
||||
"pick.kind.roof": "Roof",
|
||||
"pick.kind.context": "Context object",
|
||||
"pick.kind.site": "Site",
|
||||
"pick.site.sunStudy": "Shadow (sun position)",
|
||||
"pick.site.siteRules": "Building regulations",
|
||||
"pick.shape.line": "Line",
|
||||
"pick.shape.polyline": "Polyline",
|
||||
"pick.shape.area": "Area",
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
// Einstellungen eines Kontext-Objekts (importiertes Mesh, Gelände, Baugrube) — gemeinsam für die Liste im
|
||||
// Panel „Gelände & Kontext" und die Objekt-Info ([137]: ein angeklicktes Gelände bzw. eine Baugrube zeigt
|
||||
// dort dieselben Felder). Gelände zusätzlich: Sichtbarkeit seiner Kategorie und Glättung (aus den
|
||||
// Höhenlinien neu erzeugt, ein Undo-Schritt).
|
||||
//
|
||||
// Bezeichner englisch, UI-Text/Kommentare deutsch. Alle sichtbaren Texte über t(...).
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { usePanelHost } from "./host";
|
||||
import { useStore } from "../state/appStore";
|
||||
import type { ContextObject } from "../model/types";
|
||||
import { flattenCategories } from "../model/types";
|
||||
import type { ExcavationQuantity } from "../core";
|
||||
|
||||
/** Zahl-Eingabe für ein Feld eines Kontext-Objekts (leer = Standard, ungültig = keine Änderung). */
|
||||
export function NumField(props: {
|
||||
label: string;
|
||||
value: number | undefined;
|
||||
step: number;
|
||||
min?: number;
|
||||
placeholder?: string;
|
||||
onChange: (v: number | undefined) => void;
|
||||
}) {
|
||||
return (
|
||||
<label className="site-prop">
|
||||
<span>{props.label}</span>
|
||||
<input
|
||||
type="number"
|
||||
step={props.step}
|
||||
min={props.min}
|
||||
placeholder={props.placeholder}
|
||||
value={props.value ?? ""}
|
||||
onChange={(e) => {
|
||||
const raw = e.target.value.trim();
|
||||
if (raw === "") return props.onChange(undefined);
|
||||
const v = Number(raw);
|
||||
if (Number.isFinite(v)) props.onChange(v);
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
const fmt1 = (v: number) => v.toLocaleString("de-CH", { maximumFractionDigits: 1, minimumFractionDigits: 1 });
|
||||
|
||||
function ExcavationQty({ q }: { q: ExcavationQuantity | undefined }) {
|
||||
if (!q) return <div className="site-qty">{t("site.excavation.noTerrain")}</div>;
|
||||
return (
|
||||
<div className="site-qty">
|
||||
{t("site.excavation.qty", { cut: fmt1(q.cut), fill: fmt1(q.fill), backfill: fmt1(q.backfill) })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/** Glättungsstufen der Gelände-Erzeugung (`terrain.rs`, 0 = roh). */
|
||||
const SMOOTH_LEVELS = [0, 1, 2, 3] as const;
|
||||
|
||||
/** Felder eines Kontext-Objekts; `null` für Arten ohne eigene Einstellungen (Höhenlinien, Luftbild). */
|
||||
export function ContextObjectProps({ obj, quantities }: { obj: ContextObject; quantities: readonly ExcavationQuantity[] }) {
|
||||
const host = usePanelHost();
|
||||
const notify = useStore((s) => s.notify);
|
||||
const regenerateTerrain = useStore((s) => s.regenerateTerrain);
|
||||
const patch = (field: string) => (v: number | undefined) => host.onPatchContextObject(obj.id, { [field]: v }, `site-${obj.id}-${field}`);
|
||||
|
||||
if (obj.type === "importedMesh") {
|
||||
// [T4] Glatt oder kantig schattieren, Knickwinkel je Mesh (Vorgabe 30°).
|
||||
return (
|
||||
<div className="site-props">
|
||||
<label className="site-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={obj.smoothShading === true}
|
||||
onChange={(e) => host.onPatchContextObject(obj.id, { smoothShading: e.target.checked }, `site-${obj.id}-smoothShading`)}
|
||||
/>
|
||||
{t("site.smoothShading")}
|
||||
</label>
|
||||
{obj.smoothShading === true && (
|
||||
<NumField label={t("site.creaseAngle")} value={obj.creaseAngle} step={5} min={1} placeholder="30" onChange={patch("creaseAngle")} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (obj.type === "terrainMesh") {
|
||||
const cat = obj.categoryCode ? flattenCategories(host.project.layers).find((c) => c.code === obj.categoryCode) : undefined;
|
||||
const hasSource = (host.project.context ?? []).some((o) => o.type === "contourSet");
|
||||
return (
|
||||
<div className="site-props">
|
||||
{cat && (
|
||||
<label className="site-check" title={t("site.terrain.visible.hint", { name: `${cat.code} ${cat.name}` })}>
|
||||
<input type="checkbox" data-testid="terrain-visible" checked={cat.visible} onChange={() => host.onToggleCategory(cat.code)} />
|
||||
{t("site.terrain.visible")}
|
||||
</label>
|
||||
)}
|
||||
{hasSource && (
|
||||
<label className="site-prop" title={t("site.terrain.smooth.hint")}>
|
||||
<span>{t("site.terrain.smooth")}</span>
|
||||
<select
|
||||
data-testid="terrain-smooth"
|
||||
value={obj.smooth === undefined ? "" : String(obj.smooth)}
|
||||
onChange={(e) => {
|
||||
const v = Number(e.target.value);
|
||||
if (e.target.value === "" || !Number.isFinite(v)) return;
|
||||
if (!regenerateTerrain(obj.id, v)) notify(t("site.terrainFailed"), "error");
|
||||
}}
|
||||
>
|
||||
{obj.smooth === undefined && <option value="">—</option>}
|
||||
{SMOOTH_LEVELS.map((n) => (
|
||||
<option key={n} value={String(n)}>
|
||||
{n === 0 ? t("site.terrain.smooth.raw") : t("site.terrain.smooth.level", { n })}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
)}
|
||||
<NumField label={t("site.contourInterval")} value={obj.contourInterval} step={0.5} min={0} placeholder="—" onChange={patch("contourInterval")} />
|
||||
<NumField label={t("site.contourIndexEvery")} value={obj.contourIndexEvery} step={1} min={1} placeholder="5" onChange={patch("contourIndexEvery")} />
|
||||
<NumField label={t("site.earthDepth")} value={obj.earthDepth} step={0.5} min={0.1} placeholder="1.5" onChange={patch("earthDepth")} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (obj.type === "excavation") {
|
||||
return (
|
||||
<div className="site-props">
|
||||
<NumField label={t("site.excavation.bottom")} value={obj.bottom} step={0.05} onChange={(v) => v !== undefined && patch("bottom")(v)} />
|
||||
<NumField label={t("site.excavation.slope")} value={obj.slope} step={5} min={5} placeholder="45" onChange={patch("slope")} />
|
||||
<NumField label={t("site.excavation.fillSlope")} value={obj.fillSlope} step={5} min={5} placeholder="33.7" onChange={patch("fillSlope")} />
|
||||
<NumField label={t("site.excavation.bermWidth")} value={obj.bermWidth} step={0.25} min={0} placeholder="—" onChange={patch("bermWidth")} />
|
||||
<NumField label={t("site.excavation.bermHeight")} value={obj.bermHeight} step={0.5} min={0} placeholder="—" onChange={patch("bermHeight")} />
|
||||
<NumField label={t("site.excavation.workingSpace")} value={obj.workingSpace} step={0.1} min={0} placeholder="0" onChange={patch("workingSpace")} />
|
||||
<div className="site-prop" title={t("site.excavation.shoringHint")}>
|
||||
<span>{t("site.excavation.shoring")}</span>
|
||||
<span>
|
||||
{obj.outline.map((_, i) => (
|
||||
<label key={i} style={{ marginRight: 6 }}>
|
||||
<input
|
||||
type="checkbox"
|
||||
data-testid={`excavation-shoring-${i}`}
|
||||
checked={obj.edgeShoring?.[i] === true}
|
||||
onChange={(e) => {
|
||||
const next = obj.outline.map((__, k) => (k === i ? e.target.checked : obj.edgeShoring?.[k] === true));
|
||||
host.onPatchContextObject(obj.id, { edgeShoring: next.some(Boolean) ? next : undefined }, `site-${obj.id}-edgeShoring`);
|
||||
}}
|
||||
/>
|
||||
{i + 1}
|
||||
</label>
|
||||
))}
|
||||
</span>
|
||||
</div>
|
||||
<ExcavationQty q={quantities.find((x) => x.id === obj.id)} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -59,6 +59,11 @@ import type {
|
||||
WallInfo,
|
||||
} from "../state/selectionInfo";
|
||||
import type { MeasurementReadout } from "../tools/types";
|
||||
import { useStore } from "../state/appStore";
|
||||
import { excavationQuantities } from "../core";
|
||||
import { ContextObjectProps } from "./ContextObjectProps";
|
||||
import { SunStudySection } from "./SunStudySection";
|
||||
import { SiteRulesSection } from "./SiteRulesSection";
|
||||
|
||||
// ── Bezugspunkt-Raster ───────────────────────────────────────────────────────
|
||||
// Neun Anker als 3×3-Raster. Zeile 0 = oben (fy=0), Spalte 0 = links (fx=0).
|
||||
@@ -91,7 +96,27 @@ export function ObjectInfoPanel() {
|
||||
// (das Mess-Werkzeug erzeugt kein Element). Hat Vorrang vor dem Leerzustand.
|
||||
const m = host.measurement;
|
||||
|
||||
// [137] Lage-Darstellung angeklickt (Schattenfläche / Baurechtslinie): Einstellungen der Quelle.
|
||||
const site = useStore((s) => s.selection.site);
|
||||
const ctxObj = sel?.kind === "contextObject" ? (host.project.context ?? []).find((o) => o.id === sel.id) : undefined;
|
||||
const quantities = useMemo(
|
||||
() => (ctxObj?.type === "excavation" ? excavationQuantities(host.project) : []),
|
||||
[ctxObj?.type, host.project],
|
||||
);
|
||||
|
||||
// ── Leerzustand ───────────────────────────────────────────────────────────
|
||||
if (sel === null && site.length > 0) {
|
||||
const sun = site[0] === "sunStudy";
|
||||
return (
|
||||
<div className="objinfo-panel">
|
||||
<div className="objinfo-head">
|
||||
<span className="objinfo-kind">{t(sun ? "objinfo.kind.sunStudy" : "objinfo.kind.siteRules")}</span>
|
||||
</div>
|
||||
<div className="objinfo-muted objinfo-site-hint">{t(sun ? "objinfo.sunStudy.hint" : "objinfo.siteRules.hint")}</div>
|
||||
<div className="site-panel objinfo-site">{sun ? <SunStudySection /> : <SiteRulesSection />}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (sel === null) {
|
||||
return (
|
||||
<div className="objinfo-panel">
|
||||
@@ -340,6 +365,11 @@ export function ObjectInfoPanel() {
|
||||
<span className="objinfo-flabel">{t("objinfo.contextObject.type")}</span>
|
||||
<span className="objinfo-fval">{t(`objinfo.contextObject.type.${sel.contextObject.objType}`)}</span>
|
||||
</div>
|
||||
{ctxObj && (
|
||||
<div className="site-panel objinfo-site">
|
||||
<ContextObjectProps obj={ctxObj} quantities={quantities} />
|
||||
</div>
|
||||
)}
|
||||
{sel.contextObject.lv95Center ? (
|
||||
<>
|
||||
<div className="objinfo-field">
|
||||
|
||||
+2
-158
@@ -27,6 +27,7 @@ import { SunStudySection } from "./SunStudySection";
|
||||
import { SiteRulesSection } from "./SiteRulesSection";
|
||||
import { PointCloudSection } from "./PointCloudSection";
|
||||
import { excavationQuantities } from "../core";
|
||||
import { ContextObjectProps } from "./ContextObjectProps";
|
||||
|
||||
/** Typ-spezifisches Badge-Label (i18n-Key) je Kontext-Objekt-Art. */
|
||||
function typeBadgeKey(obj: ContextObject): TranslationKey {
|
||||
@@ -61,37 +62,6 @@ function layerOf(obj: ContextObject): string {
|
||||
}
|
||||
}
|
||||
|
||||
/** Zahl-Eingabe für ein Feld eines Kontext-Objekts (leer = Standard, ungültig = keine Änderung). */
|
||||
function NumField(props: {
|
||||
label: string;
|
||||
value: number | undefined;
|
||||
step: number;
|
||||
min?: number;
|
||||
placeholder?: string;
|
||||
onChange: (v: number | undefined) => void;
|
||||
}) {
|
||||
return (
|
||||
<label className="site-prop">
|
||||
<span>{props.label}</span>
|
||||
<input
|
||||
type="number"
|
||||
step={props.step}
|
||||
min={props.min}
|
||||
placeholder={props.placeholder}
|
||||
value={props.value ?? ""}
|
||||
onChange={(e) => {
|
||||
const raw = e.target.value.trim();
|
||||
if (raw === "") return props.onChange(undefined);
|
||||
const v = Number(raw);
|
||||
if (Number.isFinite(v)) props.onChange(v);
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
const fmt1 = (v: number) => v.toLocaleString("de-CH", { maximumFractionDigits: 1, minimumFractionDigits: 1 });
|
||||
|
||||
/** Gruppiert Kontext-Objekte nach Ebene, Reihenfolge des ersten Auftretens. */
|
||||
function groupByLayer(objects: ContextObject[]): { layer: string; items: ContextObject[] }[] {
|
||||
const order: string[] = [];
|
||||
@@ -109,15 +79,6 @@ function groupByLayer(objects: ContextObject[]): { layer: string; items: Context
|
||||
return order.map((layer) => ({ layer, items: byLayer.get(layer)! }));
|
||||
}
|
||||
|
||||
function ExcavationQty({ q }: { q: { cut: number; fill: number; backfill: number } | undefined }) {
|
||||
if (!q) return <div className="site-qty">{t("site.excavation.noTerrain")}</div>;
|
||||
return (
|
||||
<div className="site-qty">
|
||||
{t("site.excavation.qty", { cut: fmt1(q.cut), fill: fmt1(q.fill), backfill: fmt1(q.backfill) })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function SitePanel() {
|
||||
const host = usePanelHost();
|
||||
// Gewählte Kontext-Objekte schmal aus dem Store ([121], [130]).
|
||||
@@ -140,8 +101,6 @@ export function SitePanel() {
|
||||
const [smooth, setSmooth] = useState(true);
|
||||
// [68] Mengen der Baugruben (Kern), nur neu, wenn sich das Projekt ändert.
|
||||
const quantities = useMemo(() => excavationQuantities(host.project), [host.project]);
|
||||
const patch = (id: string, field: string) => (v: number | undefined) =>
|
||||
host.onPatchContextObject(id, { [field]: v }, `site-${id}-${field}`);
|
||||
|
||||
const onGenerate = () => {
|
||||
if (!effectiveSet) return;
|
||||
@@ -278,122 +237,7 @@ export function SitePanel() {
|
||||
>
|
||||
×
|
||||
</button>
|
||||
{obj.type === "importedMesh" && (
|
||||
// [T4] Glatt oder kantig schattieren, Knickwinkel je Mesh (Vorgabe 30°).
|
||||
<div className="site-props">
|
||||
<label className="site-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={obj.smoothShading === true}
|
||||
onChange={(e) =>
|
||||
host.onPatchContextObject(obj.id, { smoothShading: e.target.checked }, `site-${obj.id}-smoothShading`)
|
||||
}
|
||||
/>
|
||||
{t("site.smoothShading")}
|
||||
</label>
|
||||
{obj.smoothShading === true && (
|
||||
<NumField
|
||||
label={t("site.creaseAngle")}
|
||||
value={obj.creaseAngle}
|
||||
step={5}
|
||||
min={1}
|
||||
placeholder="30"
|
||||
onChange={patch(obj.id, "creaseAngle")}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{obj.type === "terrainMesh" && (
|
||||
<div className="site-props">
|
||||
<NumField
|
||||
label={t("site.contourInterval")}
|
||||
value={obj.contourInterval}
|
||||
step={0.5}
|
||||
min={0}
|
||||
placeholder="—"
|
||||
onChange={patch(obj.id, "contourInterval")}
|
||||
/>
|
||||
<NumField
|
||||
label={t("site.contourIndexEvery")}
|
||||
value={obj.contourIndexEvery}
|
||||
step={1}
|
||||
min={1}
|
||||
placeholder="5"
|
||||
onChange={patch(obj.id, "contourIndexEvery")}
|
||||
/>
|
||||
<NumField
|
||||
label={t("site.earthDepth")}
|
||||
value={obj.earthDepth}
|
||||
step={0.5}
|
||||
min={0.1}
|
||||
placeholder="1.5"
|
||||
onChange={patch(obj.id, "earthDepth")}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{obj.type === "excavation" && (
|
||||
<div className="site-props">
|
||||
<NumField
|
||||
label={t("site.excavation.bottom")}
|
||||
value={obj.bottom}
|
||||
step={0.05}
|
||||
onChange={(v) => v !== undefined && patch(obj.id, "bottom")(v)}
|
||||
/>
|
||||
<NumField label={t("site.excavation.slope")} value={obj.slope} step={5} min={5} placeholder="45" onChange={patch(obj.id, "slope")} />
|
||||
<NumField
|
||||
label={t("site.excavation.fillSlope")}
|
||||
value={obj.fillSlope}
|
||||
step={5}
|
||||
min={5}
|
||||
placeholder="33.7"
|
||||
onChange={patch(obj.id, "fillSlope")}
|
||||
/>
|
||||
<NumField
|
||||
label={t("site.excavation.bermWidth")}
|
||||
value={obj.bermWidth}
|
||||
step={0.25}
|
||||
min={0}
|
||||
placeholder="—"
|
||||
onChange={patch(obj.id, "bermWidth")}
|
||||
/>
|
||||
<NumField
|
||||
label={t("site.excavation.bermHeight")}
|
||||
value={obj.bermHeight}
|
||||
step={0.5}
|
||||
min={0}
|
||||
placeholder="—"
|
||||
onChange={patch(obj.id, "bermHeight")}
|
||||
/>
|
||||
<NumField
|
||||
label={t("site.excavation.workingSpace")}
|
||||
value={obj.workingSpace}
|
||||
step={0.1}
|
||||
min={0}
|
||||
placeholder="0"
|
||||
onChange={patch(obj.id, "workingSpace")}
|
||||
/>
|
||||
<div className="site-prop" title={t("site.excavation.shoringHint")}>
|
||||
<span>{t("site.excavation.shoring")}</span>
|
||||
<span>
|
||||
{obj.outline.map((_, i) => (
|
||||
<label key={i} style={{ marginRight: 6 }}>
|
||||
<input
|
||||
type="checkbox"
|
||||
data-testid={`excavation-shoring-${i}`}
|
||||
checked={obj.edgeShoring?.[i] === true}
|
||||
onChange={(e) => {
|
||||
const next = obj.outline.map((__, k) => (k === i ? e.target.checked : obj.edgeShoring?.[k] === true));
|
||||
host.onPatchContextObject(obj.id, { edgeShoring: next.some(Boolean) ? next : undefined }, `site-${obj.id}-edgeShoring`);
|
||||
}}
|
||||
/>
|
||||
{i + 1}
|
||||
</label>
|
||||
))}
|
||||
</span>
|
||||
</div>
|
||||
<ExcavationQty q={quantities.find((x) => x.id === obj.id)} />
|
||||
</div>
|
||||
)}
|
||||
<ContextObjectProps obj={obj} quantities={quantities} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -8,7 +8,7 @@ import { flattenCategories } from "../model/types";
|
||||
/** Art eines auswählbaren Objekts an einer Klickstelle (Reihenfolge = Standard-Priorität). */
|
||||
export type PickKind =
|
||||
| "section" | "opening" | "wall" | "column" | "drawing" | "solid"
|
||||
| "ceiling" | "stair" | "room" | "roof" | "context";
|
||||
| "ceiling" | "stair" | "room" | "roof" | "site" | "context";
|
||||
|
||||
type WithCategory = { id: string; categoryCode?: string };
|
||||
|
||||
@@ -25,7 +25,8 @@ function collection(project: Project, kind: PickKind): readonly WithCategory[] {
|
||||
case "column": return p.columns ?? [];
|
||||
case "context": return p.context ?? [];
|
||||
case "solid": return p.extrudedSolids ?? [];
|
||||
case "section": return [];
|
||||
case "section":
|
||||
case "site": return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ export interface Selection {
|
||||
contextObjects: string[];
|
||||
/** Schnitt-/Ansichtslinien (DrawingLevel-Ids). */
|
||||
sectionLines: string[];
|
||||
/**
|
||||
* [137] Abgeleitete Lage-Darstellung (kein Modellelement): `"sunStudy"` (Schattenfläche angeklickt)
|
||||
* bzw. `"siteRules"` (Baurechtslinie) — die Objekt-Info zeigt die Einstellungen der Quelle.
|
||||
*/
|
||||
site: string[];
|
||||
/**
|
||||
* Gewählte Gruppen — rein informativ (Bounding-Box, Doppelklick-Ziel); die
|
||||
* Mitglieder stehen zusätzlich in den übrigen Arten (s. `groupActions.ts`).
|
||||
@@ -54,6 +59,7 @@ export const SELECTION_KINDS: readonly SelectionKind[] = [
|
||||
"roofs",
|
||||
"contextObjects",
|
||||
"sectionLines",
|
||||
"site",
|
||||
"groups",
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
// [137] Alles Sichtbare anwählbar (Musterhaus komplex): Klick im Grundriss auf Baugrube, Gelände,
|
||||
// Schatten und Baurechtslinien; Objekt-Info der Baugrube; Gelände neu glätten mit Undo.
|
||||
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
import { buildComplexSampleProject } from "../model/sampleProjectComplex";
|
||||
import { collectVisibleCodes } from "../model/layers";
|
||||
import { generatePlan } from "../plan/generatePlan";
|
||||
import { PlanPickIndex } from "../plan/planView/planPick";
|
||||
import { planPrimAt } from "../plan/planLazy";
|
||||
import { deriveSelection } from "./selectionInfo";
|
||||
import { getState, setState } from "./appStore";
|
||||
import type { Project, TerrainMesh } from "../model/types";
|
||||
|
||||
let p: Project;
|
||||
let terrainId: string;
|
||||
beforeAll(() => {
|
||||
p = buildComplexSampleProject();
|
||||
terrainId = p.context!.find((c) => c.type === "terrainMesh")!.id;
|
||||
});
|
||||
|
||||
/** Pick-Ids (Feld `contextObjectId`) unter (x, y) im EG 1:500, oberste zuerst — wie `PlanView.contextIdsAt`. */
|
||||
const idsAt = (proj: Project, pts: [number, number][]): string[][] => {
|
||||
const plan = generatePlan(proj, "eg", collectVisibleCodes(proj.layers), undefined, "mittel", false, false, true, 500);
|
||||
const ix = new PlanPickIndex(plan);
|
||||
const out = pts.map(([x, y]) => ix.polygonsAt({ x, y }, "contextObjectId").map((i) => (planPrimAt(plan, i) as { contextObjectId?: string }).contextObjectId!));
|
||||
ix.release();
|
||||
return out;
|
||||
};
|
||||
/** Erstes Kontext-Objekt (ohne Lage-Darstellung `@…`). */
|
||||
const contextAt = (proj: Project, x: number, y: number): string | null => idsAt(proj, [[x, y]])[0].find((id) => !id.startsWith("@")) ?? null;
|
||||
|
||||
describe("[137] Grundriss: Kontext anwählen", () => {
|
||||
it("Baugrube (Sohle und Böschung) vor dem Gelände, daneben das Gelände", () => {
|
||||
expect(contextAt(p, 8, -0.5)).toBe("baugrube");
|
||||
// Südwest-Böschung: ausserhalb der Sohle (Arbeitsraum 0.8 m um −0.36), noch im Wirkbereich.
|
||||
expect(contextAt(p, -1.6, 4)).toBe("baugrube");
|
||||
expect(contextAt(p, 25, -10)).toBe(terrainId);
|
||||
});
|
||||
|
||||
it("Objekt-Info der Baugrube: Kontext-Objekt der Art Baugrube", () => {
|
||||
const sel = deriveSelection(p, { contextObjects: ["baugrube"] });
|
||||
expect(sel?.kind).toBe("contextObject");
|
||||
expect(sel?.contextObject?.objType).toBe("excavation");
|
||||
});
|
||||
});
|
||||
|
||||
describe("[137] Schatten und Baurecht anwählen", () => {
|
||||
it("Parzellengrenze → Baurecht, Schattenfläche → Sonnenstand (Pick-Ids im Plan)", () => {
|
||||
// Westgrenze der Parzelle von (−14, −12) nach (−15, 24): bei y = 6 liegt sie auf x = −14.5.
|
||||
const grid: [number, number][] = [];
|
||||
for (let y = 22; y >= -4; y -= 1) for (let x = -10; x <= 26; x += 1) grid.push([x, y]);
|
||||
const [parcel, far, ...rest] = idsAt(p, [[-14.5, 6], [-40, -40], ...grid]);
|
||||
expect(parcel).toContain("@siteRules");
|
||||
expect(far).toEqual([]);
|
||||
// Schatten (21. Juni, 10 Uhr): irgendwo neben dem Haus.
|
||||
expect(rest.some((ids) => ids.includes("@sunStudy"))).toBe(true);
|
||||
// Studie aus: keine Schatten-Ids mehr.
|
||||
const off = idsAt({ ...p, sunStudy: { ...p.sunStudy!, show: false } }, grid);
|
||||
expect(off.some((ids) => ids.includes("@sunStudy"))).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("[137] Gelände neu glätten", () => {
|
||||
it("andere Stufe ersetzt das Netz (gleiche Id), Undo stellt es wieder her", () => {
|
||||
const terrain = () => getState().project.context!.find((c) => c.id === terrainId) as TerrainMesh;
|
||||
setState({ project: p, undoDepth: 0, redoDepth: 0, canUndo: false, canRedo: false });
|
||||
getState().clearHistory();
|
||||
const before = terrain();
|
||||
expect(before.smooth).toBe(2);
|
||||
expect(before.sourceId).toBe("hoehenlinien");
|
||||
expect(getState().regenerateTerrain(terrainId, 0)).toBe(true);
|
||||
const raw = terrain();
|
||||
expect(raw.smooth).toBe(0);
|
||||
expect(raw.indices.length).toBeLessThan(before.indices.length);
|
||||
expect(raw.contourInterval).toBe(before.contourInterval);
|
||||
getState().undo();
|
||||
expect(terrain().indices.length).toBe(before.indices.length);
|
||||
expect(terrain().smooth).toBe(2);
|
||||
});
|
||||
});
|
||||
+22
-1
@@ -35,6 +35,12 @@ export interface SiteSlice {
|
||||
generateTerrain: (contourSetId: string, opts?: TerrainOptions) => string | null;
|
||||
/** [T6]/[68] Ändert Felder eines Kontext-Objekts (Gelände, Baugrube) in einem Schritt; `coalesceKey` für Tippen. */
|
||||
patchContextObject: (id: string, patch: Record<string, unknown>, coalesceKey?: string) => void;
|
||||
/**
|
||||
* [137] Gelände `terrainId` aus seinen Höhenlinien (`sourceId`, sonst dem ersten Höhenlinien-Satz) mit
|
||||
* Glättungsstufe `smooth` (0 = roh) neu erzeugen — gleiche Id und Einstellungen, ein Undo-Schritt.
|
||||
* `false`, wenn es keine Quelle gibt oder kein Netz entsteht.
|
||||
*/
|
||||
regenerateTerrain: (terrainId: string, smooth: number) => boolean;
|
||||
/** Leert die gesamte Kontext-Schicht. */
|
||||
clearContext: () => void;
|
||||
}
|
||||
@@ -94,10 +100,25 @@ export function createSiteSlice(
|
||||
if (!set || set.type !== "contourSet") return null;
|
||||
const terrain = generateTerrainFromContours(set.contours, opts);
|
||||
if (terrain.indices.length === 0) return null; // kein sinnvolles TIN
|
||||
addToContext([terrain]);
|
||||
addToContext([{ ...terrain, sourceId: set.id }]);
|
||||
return terrain.id;
|
||||
},
|
||||
|
||||
regenerateTerrain: (terrainId, smooth) => {
|
||||
const ctx = get().project.context ?? [];
|
||||
const terrain = ctx.find((o) => o.id === terrainId && o.type === "terrainMesh");
|
||||
if (!terrain || terrain.type !== "terrainMesh") return false;
|
||||
const sets = ctx.filter((o) => o.type === "contourSet");
|
||||
const set = sets.find((o) => o.id === terrain.sourceId) ?? sets[0];
|
||||
if (!set || set.type !== "contourSet") return false;
|
||||
const fresh = generateTerrainFromContours(set.contours, { smooth });
|
||||
if (fresh.indices.length === 0) return false;
|
||||
get().applyChange((p) =>
|
||||
patchItem(p, "context", terrainId, (o) => ({ ...o, positions: fresh.positions, indices: fresh.indices, smooth, sourceId: set.id }) as ContextObject),
|
||||
);
|
||||
return true;
|
||||
},
|
||||
|
||||
clearContext: () => get().applyChange((p) => fieldOps(p, "context", [])),
|
||||
};
|
||||
}
|
||||
@@ -206,6 +206,7 @@ export function useMouseSelectionHandlers(opts: {
|
||||
column: "columns",
|
||||
roof: "roofs",
|
||||
context: "contextObjects",
|
||||
site: "site",
|
||||
} as const satisfies Record<string, SelectionKind>;
|
||||
type Kind = keyof typeof channels;
|
||||
const target: { kind: Kind; id: string } | null = sel.sectionLineId
|
||||
@@ -286,7 +287,9 @@ export function useMouseSelectionHandlers(opts: {
|
||||
? ["roofs", sel.roofId]
|
||||
: sel.contextObjectId
|
||||
? ["contextObjects", sel.contextObjectId]
|
||||
: null;
|
||||
: sel.siteId
|
||||
? ["site", sel.siteId]
|
||||
: null;
|
||||
setSelection({ ...clearKinds(), groups: [], ...(one ? { [one[0]]: [one[1]] } : {}) });
|
||||
};
|
||||
// Links-Drag (Marquee) im Grundriss: die getroffene Wand-MENGE übernehmen
|
||||
|
||||
+43
-15
@@ -189,7 +189,7 @@ export interface PlanViewHandle {
|
||||
|
||||
const PICK_ORDER: readonly PickKind[] = [
|
||||
"section", "opening", "wall", "column", "drawing", "solid",
|
||||
"ceiling", "stair", "room", "roof", "context",
|
||||
"ceiling", "stair", "room", "roof", "site", "context",
|
||||
];
|
||||
|
||||
/** Ein Objekt unter dem Cursor — für das Durchschalten übereinanderliegender Objekte. */
|
||||
@@ -218,6 +218,7 @@ const EMPTY_PICK: PickIds = {
|
||||
roofId: null,
|
||||
sectionLineId: null,
|
||||
contextObjectId: null,
|
||||
siteId: null,
|
||||
};
|
||||
|
||||
/** Mac: Cmd+Klick; sonst Strg+Klick (Alt+Klick ist die Schere, Ctrl+Klick unter macOS das Kontextmenü). */
|
||||
@@ -292,6 +293,11 @@ export interface PlanSelection {
|
||||
* (alle anderen gehen vor, analog `roofId`); sonst `null`.
|
||||
*/
|
||||
contextObjectId: string | null;
|
||||
/**
|
||||
* [137] Getroffene Lage-Darstellung (Schattenfläche → `"sunStudy"`, Baurechtslinie → `"siteRules"`),
|
||||
* wenn kein Element höherer Priorität getroffen wurde; Vorrang vor Kontext-Objekten (sie liegt darüber).
|
||||
*/
|
||||
siteId?: string | null;
|
||||
/**
|
||||
* War beim Klick Shift gedrückt? Dann ERWEITERT der Aufrufer (App) die
|
||||
* Auswahl um das getroffene Element (bzw. schaltet es ab/zu), statt sie zu
|
||||
@@ -675,6 +681,7 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
columns: selectedColumnIds,
|
||||
groups: selectedGroupIds,
|
||||
drawings: selectedDrawingIds,
|
||||
site: selectedSite,
|
||||
} = selection;
|
||||
const selectedDrawingId = single(selection, "drawings");
|
||||
// Linke Maustaste liegt beim Werkzeug/der Transformation, wenn App das meldet
|
||||
@@ -1565,12 +1572,24 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
// Grundriss-Pick-Band (Bounding-Box) per Punkt-in-Polygon — macht es wie eine
|
||||
// Wand irgendwo innerhalb seiner Fläche anklickbar, nicht nur exakt auf der
|
||||
// dünnen Umrisslinie.
|
||||
const pickContextObject = (clientX: number, clientY: number): string | null => {
|
||||
// Pick-Ids unter dem Cursor im Feld `contextObjectId`, oberste zuerst. Die abgeleitete Lage-Darstellung
|
||||
// ([137], Kern `plan/extras.rs`) trägt dort `@sunStudy`/`@siteRules` (Schattenflächen, Baurechts-Bänder).
|
||||
const contextIdsAt = (clientX: number, clientY: number): string[] => {
|
||||
const v = clientToView(clientX, clientY, view);
|
||||
const i = getPick().topPolygon(viewToModel(v.x, v.y), "contextObjectId");
|
||||
return i === null ? null : (planPrimAt(plan, i) as { contextObjectId?: string }).contextObjectId!;
|
||||
const pick = getPick();
|
||||
return pick.polygonsAt(viewToModel(v.x, v.y), "contextObjectId").map((i) => (pick.prim(i) as { contextObjectId?: string }).contextObjectId!);
|
||||
};
|
||||
|
||||
// [137] Getroffene Lage-Darstellung: Quelle `"sunStudy"`/`"siteRules"` (Baurechtslinie vor Schatten) oder null.
|
||||
const pickSiteAt = (clientX: number, clientY: number): string | null => {
|
||||
const ids = contextIdsAt(clientX, clientY).filter((id) => id.startsWith("@"));
|
||||
const id = ids.find((x) => x === "@siteRules") ?? ids[0];
|
||||
return id ? id.slice(1) : null;
|
||||
};
|
||||
|
||||
const pickContextObject = (clientX: number, clientY: number): string | null =>
|
||||
contextIdsAt(clientX, clientY).find((id) => !id.startsWith("@")) ?? null;
|
||||
|
||||
// Getroffener extrudierter Körper (truck-Integration): der Footprint-Umriss
|
||||
// ist ein reiner Haarlinien-Umriss (fill:"none"), aber per Punkt-in-Polygon
|
||||
// trotzdem als FLÄCHE anklickbar (analog Raum, nicht nur auf der Linie).
|
||||
@@ -2119,8 +2138,13 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
// Kontext-Objekt (Gebäude/Terrain) als ALLERLETZTE Priorität — seine
|
||||
// Bbox-Pick-Fläche kann grosszügig überlappen, daher erst wenn wirklich
|
||||
// nichts anderes getroffen wurde.
|
||||
const contextObjectId =
|
||||
// [137] Schatten/Baurechtslinien (Lage-Darstellung) über dem Gelände, unter allen Bauteilen.
|
||||
const siteId =
|
||||
openingId || wallId || columnId || drawingId || extrudedSolidId || ceilingId || stairId || roomId || roofId
|
||||
? null
|
||||
: pickSiteAt(clientX, clientY);
|
||||
const contextObjectId =
|
||||
openingId || wallId || columnId || drawingId || extrudedSolidId || ceilingId || stairId || roomId || roofId || siteId
|
||||
? null
|
||||
: pickContextObject(clientX, clientY);
|
||||
return {
|
||||
@@ -2136,6 +2160,7 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
roofId,
|
||||
sectionLineId: null,
|
||||
contextObjectId,
|
||||
siteId,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2236,7 +2261,7 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
const key = `${kind}:${id}`;
|
||||
if (seen.has(key)) return;
|
||||
seen.add(key);
|
||||
const base = kind === "drawing" ? drawingLabel(id) : t(`pick.kind.${kind}`);
|
||||
const base = kind === "drawing" ? drawingLabel(id) : kind === "site" ? t(id === "siteRules" ? "pick.site.siteRules" : "pick.site.sunStudy") : t(`pick.kind.${kind}`);
|
||||
const cat = describePick?.(kind, id);
|
||||
out.push({ kind, id, hitIndex, label: cat ? `${base} · ${cat}` : base });
|
||||
};
|
||||
@@ -2251,6 +2276,7 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
add("stair", dp.stairId, dp.hitIndex);
|
||||
add("room", dp.roomId, dp.hitIndex);
|
||||
add("roof", dp.roofId, dp.hitIndex);
|
||||
add("site", dp.siteId, dp.hitIndex);
|
||||
add("context", dp.contextObjectId, dp.hitIndex);
|
||||
const first = out.slice();
|
||||
// 2) Alles Übrige an dieser Stelle, nach Standard-Priorität sortiert.
|
||||
@@ -2272,7 +2298,8 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
addRest("stair", p.stairId, idx);
|
||||
addRest("room", p.roomId, idx);
|
||||
addRest("roof", p.roofId, idx);
|
||||
addRest("context", p.contextObjectId, idx);
|
||||
if (p.contextObjectId?.startsWith("@")) addRest("site", p.contextObjectId.slice(1), idx);
|
||||
else addRest("context", p.contextObjectId, idx);
|
||||
addRest("section", p.sectionLineId, idx);
|
||||
}
|
||||
for (const id of nearDrawingIds(clientX, clientY)) addRest("drawing", id, null);
|
||||
@@ -2282,6 +2309,7 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
addRest("stair", pickStair(clientX, clientY), null);
|
||||
addRest("room", pickRoom(clientX, clientY), null);
|
||||
addRest("roof", pickRoof(clientX, clientY), null);
|
||||
addRest("site", pickSiteAt(clientX, clientY), null);
|
||||
addRest("context", pickContextObject(clientX, clientY), null);
|
||||
addRest("section", pickSectionLine(clientX, clientY), null);
|
||||
// Stabil nach Standard-Priorität ordnen (innerhalb einer Art bleibt die Fundreihenfolge).
|
||||
@@ -2317,6 +2345,7 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
roofId: c.kind === "roof" ? c.id : null,
|
||||
sectionLineId: c.kind === "section" ? c.id : null,
|
||||
contextObjectId: c.kind === "context" ? c.id : null,
|
||||
siteId: c.kind === "site" ? c.id : null,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2794,14 +2823,12 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
// Hervorhebung der selektierten Kontext-Objekte (Gebäude/Terrain): das
|
||||
// (unsichtbare) Bbox-Pick-Band mit contextObjectId als Akzentkontur
|
||||
// überzeichnen — analog zur Dach-/Raum-Auswahl.
|
||||
// [137] Gewählte Lage-Darstellung (Schatten/Baurecht): ihre Flächen bzw. Bänder (`@…`-Ids) ebenso.
|
||||
const highlightContextObjectPolys = useMemo(() => {
|
||||
const ids =
|
||||
selectedContextObjectIds && selectedContextObjectIds.length
|
||||
? new Set(selectedContextObjectIds)
|
||||
: null;
|
||||
if (!ids) return [];
|
||||
return primsOwnedBy("contextObjectId", selectedContextObjectIds, (p): p is Extract<Primitive, { kind: "polygon" }> => p.kind === "polygon");
|
||||
}, [plan, selectedContextObjectIds]);
|
||||
const ids = [...(selectedContextObjectIds ?? []), ...(selectedSite ?? []).map((s) => "@" + s)];
|
||||
if (!ids.length) return [];
|
||||
return primsOwnedBy("contextObjectId", ids, (p): p is Extract<Primitive, { kind: "polygon" }> => p.kind === "polygon");
|
||||
}, [plan, selectedContextObjectIds, selectedSite]);
|
||||
|
||||
// Hervorhebung der selektierten Schnitt-/Ansichtslinie: das (unsichtbare)
|
||||
// Pick-Band (Polygon mit sectionLineId) mit Akzentkontur überzeichnen.
|
||||
@@ -2838,7 +2865,8 @@ export const PlanView = forwardRef<PlanViewHandle, PlanViewProps>(
|
||||
// Primitive des per Listen-Hover vorgemerkten Objekts (Vorschau-Hervorhebung).
|
||||
const hoverPrims = useMemo((): Primitive[] => {
|
||||
if (!hoverPick) return [];
|
||||
const field: Record<PickKind, OwnerField> = {
|
||||
if (hoverPick.kind === "site") return primsOwnedBy("contextObjectId", ["@" + hoverPick.id], (_p): _p is Primitive => true);
|
||||
const field: Record<Exclude<PickKind, "site">, OwnerField> = {
|
||||
wall: "wallId", drawing: "drawingId", ceiling: "ceilingId", opening: "openingId",
|
||||
stair: "stairId", room: "roomId", roof: "roofId", context: "contextObjectId",
|
||||
section: "sectionLineId", solid: "extrudedSolidId", column: "columnId",
|
||||
|
||||
@@ -828,6 +828,7 @@ function LevelPlanView({
|
||||
[project],
|
||||
);
|
||||
|
||||
|
||||
// Live-Spiegelung in die nativen wgpu-Fenster (No-op ohne Tauri, debounced):
|
||||
// EXAKT der sichtbare Plan (gleiches Geschoss, gleicher Detailgrad) fürs
|
||||
// 2D-Fenster, die Projekt-Wände fürs 3D-Fenster.
|
||||
|
||||
Reference in new issue
Block a user