[G1] Körper im Grundriss über das Kern-Netz: Poché aus Ebenenschnitt, Bauteil-Schraffur, Abzugskörper beliebiger Form
- Grundriss: alle freien Körper (auch B-Rep, Eckenradius/Fase, Löcher, Verjüngung) über `solid_mesh::body_mesh` wie importierte Netze (`mesh_plan.rs::plan_bodies`, gemeinsamer Kern `draw_items`): waagrechter Ebenenschnitt als Poché, der Teil darunter als Aufsicht (`hlr`, von geschnittenen Bauteilen verdeckt), ganz darunter Aufsicht, darüber Überkopf-Linie; Pick-Fläche über das Profil. Ohne Netz bleibt der Profil-Weg (`solid_by_profile`). Raumstempel weichen Körper-Poché und -Aufsicht aus. - `ExtrudedSolid.componentId` (Rust-Modell, gen:types): Füllung/SIA-Schraffur der Schnittfläche in Grundriss (`style::body_component_style`) und Schnitt (`append_body_sections`); ab 1:100 schwarz wie gehabt. Objekt-Info „Bauteil" (Dropdown, de/en), `selection_info` liefert `componentId`. - Abzugskörper beliebiger Form im Grundriss (`extras::subtract_voids`): Wände und geschnittene Stützen über den Ebenenschnitt auf Schnitthöhe, Decken/Stützen über den Grundriss im Höhenband (Manifold-Band, nach oben weisende Dreiecke vereinigt über i_overlay); Schneider mit Löchern über `voids::subtract_polys` / `segment_outside_polys`, Prismen weiter über den flachen Weg (unverändert). - Kreis-Körper ohne `points` (Brunnen im Musterhaus komplex) bekommen eine Beschreibung (`extruded_solid_spec`): Golden UG 1:50/1:100 und Ansicht Süd zeigen jetzt den Brunnen. Tests: domains `koerper_poche_aus_netz_radius_fase_loch_bauteil` (+ angepasst `koerper_poche_auf_schnitthoehe`, `ansichtsbereich_blendet_aus_und_strichelt`), section `koerper_mit_bauteil_im_schnitt`, extras `abzugskoerper_beliebiger_form_im_grundriss`, solid_mesh `kreis_koerper_ohne_punkte`. Geprüft: cargo test --lib (Kern, release) grün, build:core --no-opt, vitest (ganz) grün, Goldens nachgeführt (Plan; CLI unverändert), tsc. Angesehen: Musterhaus komplex EG/UG 1:50 --hatch mit Testkörpern (CLI-SVG, Chromium). Nicht geprüft: Tauri-App/Mac, 3D (truck) für den Brunnen, Benchmarks in src-tauri/core/tests. Offen: Untersicht Wendel-/Podesttreppen.
This commit is contained in:
25 files changed
+594
-115
No files matched your search
@@ -964,6 +964,9 @@ export const de = {
|
||||
"objinfo.extrudedSolid.taper": "Verjüngung",
|
||||
"objinfo.extrudedSolid.cornerRadius": "Eckenradius",
|
||||
"objinfo.extrudedSolid.chamfer": "Fase",
|
||||
"objinfo.extrudedSolid.component": "Bauteil",
|
||||
"objinfo.extrudedSolid.component.none": "– neutral –",
|
||||
"objinfo.extrudedSolid.componentHint": "Material der Schnittfläche (Füllung und Schraffur in Grundriss und Schnitt)",
|
||||
"objinfo.extrudedSolid.brep": "B-Rep-Körper",
|
||||
"objinfo.extrudedSolid.baseOffset": "Abstand über Geschoss-UK",
|
||||
"objinfo.extrudedSolid.subtract": "Abzugskörper",
|
||||
|
||||
@@ -960,6 +960,9 @@ export const en: Record<TranslationKey, string> = {
|
||||
"objinfo.extrudedSolid.taper": "Taper",
|
||||
"objinfo.extrudedSolid.cornerRadius": "Corner radius",
|
||||
"objinfo.extrudedSolid.chamfer": "Chamfer",
|
||||
"objinfo.extrudedSolid.component": "Component",
|
||||
"objinfo.extrudedSolid.component.none": "– neutral –",
|
||||
"objinfo.extrudedSolid.componentHint": "Material of the cut face (fill and hatch in plan and section)",
|
||||
"objinfo.extrudedSolid.brep": "B-rep solid",
|
||||
"objinfo.extrudedSolid.baseOffset": "Offset above storey base",
|
||||
"objinfo.extrudedSolid.subtract": "Subtraction body",
|
||||
|
||||
@@ -1341,6 +1341,11 @@ export type ExtrudedSolid = {
|
||||
* Grundriss-Fläche (Auswahl/2D-Umriss), `height` die Körperhöhe.
|
||||
*/
|
||||
brep?: { spec: Record<string, unknown>; origin: Vec2; label?: string };
|
||||
/**
|
||||
* [G1] Bauteil (Component Manager) des Körpers: Füllung und SIA-Schraffur der Schnittfläche im
|
||||
* Grundriss und im Schnitt. Fehlt = neutrale Körper-Füllung mit Rückfall-Schraffur.
|
||||
*/
|
||||
componentId?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -585,6 +585,8 @@ export interface PanelHostValue {
|
||||
onSetExtrudedSolidSubtract: (subtract: boolean) => void;
|
||||
/** Abstand der Körper-UK über der Geschoss-UK (Meter). */
|
||||
onSetExtrudedSolidBaseOffset: (offset: number) => void;
|
||||
/** [G1] Bauteil des Körpers (Schnittfläche); "" löst die Zuweisung. */
|
||||
onSetExtrudedSolidComponent: (componentId: string) => void;
|
||||
|
||||
// ── Stützen-Attribute (Tragwerk; nur die selektierte Stütze) ────────────
|
||||
/** Wechselt das Profil (Rechteck/Kreis); leitet ein sinnvolles Mass ab. */
|
||||
|
||||
@@ -7,6 +7,7 @@ import { solidProps } from "../../engine/truckSolid";
|
||||
import { t } from "../../i18n";
|
||||
import type { ExtrudedSolidInfo, ColumnInfo } from "../../state/selectionInfo";
|
||||
import { usePanelHost } from "../host";
|
||||
import { useStore } from "../../state/appStore";
|
||||
import { Dropdown } from "../../ui/Dropdown";
|
||||
import { DimensionField } from "./fields";
|
||||
|
||||
@@ -60,6 +61,7 @@ export function ExtrudedSolidSection({
|
||||
solid: ExtrudedSolidInfo;
|
||||
host: ReturnType<typeof usePanelHost>;
|
||||
}) {
|
||||
const components = useStore((st) => st.project.components);
|
||||
return (
|
||||
<>
|
||||
<div className="objinfo-sep" />
|
||||
@@ -100,6 +102,23 @@ export function ExtrudedSolidSection({
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* [G1] Bauteil: Füllung und SIA-Schraffur der Schnittfläche in Grundriss und Schnitt. */}
|
||||
{!solid.subtract && (
|
||||
<div className="objinfo-field">
|
||||
<span className="objinfo-flabel">{t("objinfo.extrudedSolid.component")}</span>
|
||||
<Dropdown
|
||||
value={solid.componentId}
|
||||
onChange={(v) => host.onSetExtrudedSolidComponent(v)}
|
||||
options={[
|
||||
{ value: "", label: t("objinfo.extrudedSolid.component.none") },
|
||||
...components.map((c) => ({ value: c.id, label: c.name })),
|
||||
]}
|
||||
title={t("objinfo.extrudedSolid.componentHint")}
|
||||
width={130}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Abzugskörper: zieht sich von Wänden/Decken/Stützen ab (Grundriss, Schnitt, 3D, STEP). */}
|
||||
{solid.canSubtract && (
|
||||
<div className="objinfo-field">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
viewBox -4.2 0 37.045 17.378
|
||||
bytes 232642
|
||||
bytes 234402
|
||||
circle 4
|
||||
g 1
|
||||
line 553
|
||||
path 2
|
||||
polygon 1326
|
||||
polygon 1341
|
||||
polyline 50
|
||||
rect 1
|
||||
svg 1
|
||||
text 4
|
||||
hash d8d8603c14110f10
|
||||
hash c283cb05e9570e10
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -13.693 0 38.86 33.813
|
||||
bytes 38699
|
||||
circle 15
|
||||
bytes 42016
|
||||
circle 16
|
||||
g 1
|
||||
line 94
|
||||
line 98
|
||||
path 23
|
||||
polygon 43
|
||||
polyline 64
|
||||
polygon 45
|
||||
polyline 80
|
||||
rect 1
|
||||
svg 1
|
||||
text 71
|
||||
tspan 15
|
||||
hash 266ecd86022ba7cb
|
||||
hash 914de604bff9969a
|
||||
@@ -1,13 +1,13 @@
|
||||
viewBox -13.693 0 38.527 33.406
|
||||
bytes 44623
|
||||
circle 15
|
||||
bytes 47974
|
||||
circle 16
|
||||
g 1
|
||||
line 90
|
||||
line 94
|
||||
path 38
|
||||
polygon 78
|
||||
polyline 71
|
||||
polygon 80
|
||||
polyline 87
|
||||
rect 1
|
||||
svg 1
|
||||
text 71
|
||||
tspan 15
|
||||
hash cd8d6d1ec759f128
|
||||
hash a4878f4a1e60006c
|
||||
@@ -276,6 +276,11 @@ export function buildElementAttributesHost(c: FlatHostOpts) {
|
||||
const id = selection.id;
|
||||
applyChange((p) => patchItem(p, "extrudedSolids", id, { baseOffset: Math.abs(offset) > 1e-9 ? offset : undefined }));
|
||||
},
|
||||
onSetExtrudedSolidComponent: (componentId) => {
|
||||
if (selection?.kind !== "extrudedSolid") return;
|
||||
const id = selection.id;
|
||||
applyChange((p) => patchItem(p, "extrudedSolids", id, { componentId: componentId || undefined }));
|
||||
},
|
||||
// ── Stützen-Attribute (Tragwerk; nur bei selektierter Stütze) ──────────
|
||||
onSetColumnProfileKind: (kind) => {
|
||||
if (selection?.kind !== "column") return;
|
||||
|
||||
@@ -59,7 +59,7 @@ describe("deriveSelection (Kern)", () => {
|
||||
expect(sel.extrudedSolid!.area).toBeCloseTo(3, 12);
|
||||
expect(sel.extrudedSolid!.spec).toMatchObject({ kind: "extrude", height: 2 });
|
||||
expect(Object.keys(sel.extrudedSolid!)).toEqual([
|
||||
"height", "taper", "cornerRadius", "chamfer", "area", "spec", "subtract", "canSubtract", "baseOffset", "floorId", "floorName",
|
||||
"height", "taper", "cornerRadius", "chamfer", "area", "spec", "subtract", "canSubtract", "baseOffset", "componentId", "floorId", "floorName",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -361,6 +361,8 @@ export interface ExtrudedSolidInfo {
|
||||
canSubtract: boolean;
|
||||
/** Abstand der UK über der Geschoss-UK (m). */
|
||||
baseOffset: number;
|
||||
/** [G1] Bauteil der Schnittfläche (Füllung/SIA-Schraffur in Grundriss und Schnitt); "" = keins. */
|
||||
componentId: string;
|
||||
/** B-Rep-Beschreibung (Weltkoordinaten) für Kennwerte — `null`, wenn truck keine hat. */
|
||||
spec: SolidSpec | null;
|
||||
/** Geschoss, dessen `baseElevation` die UK des Körpers bestimmt. */
|
||||
|
||||
Reference in new issue
Block a user