[272] Natives 3D-Fenster: Varianten-Grau, Geisterschicht und Sperre wie im WASM-Viewport (nativeViewQuery)
This commit is contained in:
4 files changed
+72
-6
No files matched your search
@@ -107,7 +107,7 @@ Kennwort, anonym) als PDF; Austausch mit Fachplanern über DXF/IFC.
|
||||
- ◐ **[259]** IFC-Export für Fachplaner (14./15.11.; ifcopenshell 0.9, `scripts/check-ifc-fachplaner.py`, Georeferenz, Bögen, Mengen, Ebenen, Raumhöhen; Option „Kontext mitgeben“). Offen: nicht in Archicad/Revit/Solibri/BIMcollab geöffnet (Prüfzeile 13.14 in `doc/RELEASE-1.0.md`; Sicht der Ebenen ungeprüft); IFC2x3 nur über bestehende Tests; Dachraum-Körper füllt die Schräge nicht aus. · M
|
||||
- ◐ **[255]** Baurecht-Nachweis gegen Modell als Tabelle (14.11.; Kern `site_proof.rs`, Abfrage `siteProof`, Flächenbilanz, Blatt-Tabelle, CLI `kennzahlen --nachweis`). Offen: Blatt-Tabelle nimmt aGSF/Grünfläche nicht aus den Panel-Eingaben (nur Parzellenfläche/-grenze); Grünfläche nur per Eingabe; Grenzabstand als Verstossfläche statt kleinster Abstand; Fassadenhöhe nur über ±0.00; lange Zeilentexte kürzen bei < 150 mm Rahmenbreite mit „…“; Blatt-Tabelle nur als Primitive in Chromium angesehen; Mac/Tauri nicht geprüft. · S
|
||||
|
||||
- ◐ **[272]** Varianten wie Archicad „Design Options“ (17.11., für 1.0): Sätze/Varianten/Kombinationen im Kern (`design_options.rs`, Sichtbarkeit in `renovation::View`), Panel „Varianten“, Auge/Stift/Grau/Sperre, Variantenvergleich als Blatt-Tabelle, CLI `--options`/`--combination`. Offen: Blatt-Tabelle „Variantenvergleich“ ohne Umbau-Zustand/Kombination der Ansicht (zeigt immer die gespeicherten Kombinationen); Variantensatz-Wahl in Ansichtsvorlagen/Ausschnitten nur im Modell (UI nur Ebene und Viewport); ungeprüft, ob Wandanschlüsse im Grundriss Wände anderer Varianten berücksichtigen; 3D-Dokument der App fragt ohne Bearbeitung (Axo nur Kern-Abfrage); Sperre wirkt auf die Auswahl, nicht auf Fang/Griffe einer schon gewählten Fremd-Auswahl; 3D-Geisterschicht nur im Code/Kern-Test (kein render3d unter Linux, Bild nicht gesehen); natives 3D-Fenster (`views/plan/nativeSync.ts`) reicht `designOptionEdit` nicht durch; Raum-Grau im Schnitt/Ansicht entfällt (keine Raumdarstellung dort); Tauri/Mac nicht geprüft (`doc/RELEASE-1.0.md` 13.38). · M–L
|
||||
- ◐ **[272]** Varianten wie Archicad „Design Options“ (17.11., für 1.0): Sätze/Varianten/Kombinationen im Kern (`design_options.rs`, Sichtbarkeit in `renovation::View`), Panel „Varianten“, Auge/Stift/Grau/Sperre, Variantenvergleich als Blatt-Tabelle, CLI `--options`/`--combination`. Offen: Blatt-Tabelle „Variantenvergleich“ ohne Umbau-Zustand/Kombination der Ansicht (zeigt immer die gespeicherten Kombinationen); Variantensatz-Wahl in Ansichtsvorlagen/Ausschnitten nur im Modell (UI nur Ebene und Viewport); ungeprüft, ob Wandanschlüsse im Grundriss Wände anderer Varianten berücksichtigen; 3D-Dokument der App fragt ohne Bearbeitung (Axo nur Kern-Abfrage); Sperre wirkt auf die Auswahl, nicht auf Fang/Griffe einer schon gewählten Fremd-Auswahl; 3D-Geisterschicht nur im Code/Kern-Test (kein render3d unter Linux, Bild nicht gesehen); natives 3D-Fenster reicht Umbau, Kombination und `designOptionEdit` (Grau, Geisterschicht, Sperre) jetzt durch (`nativeViewQuery` in `views/plan/nativeSync.ts`, 18.11.; Metal/Tauri nicht geprüft, Rust-Seite `native.rs` nahm `ghost` schon an); Raum-Grau im Schnitt/Ansicht entfällt (keine Raumdarstellung dort); Tauri/Mac nicht geprüft (`doc/RELEASE-1.0.md` 13.38). · M–L
|
||||
### Phase 4 (4.–12.12.): Härten und veröffentlichen
|
||||
- Nur noch Fehler aus dem Referenz-Ablauf; Leistung mit grossen Kontext-Importen; keine neuen Funktionen.
|
||||
- Release 1.0.0: Tag, signierte Pakete, Release-Notes (ehrlich: was nicht geht), Download-Seite.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// [272] Das native 3D-Fenster baut dieselbe Anfrage wie der WASM-Viewport (Stift, Grau, Sperre, Geisterschicht).
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { applyOps } from "../../core/ops";
|
||||
import { designOptionEditArg, ghostFilter3d } from "../../core";
|
||||
import { addDesignOptionOps, addDesignOptionSetOps } from "../../model/designOptions";
|
||||
import { sampleProject } from "../../model/sampleProject";
|
||||
import { nativeViewQuery } from "./nativeSync";
|
||||
|
||||
function withSet() {
|
||||
const { ops, id } = addDesignOptionSetOps(sampleProject, "Dachform");
|
||||
const p = applyOps(sampleProject, ops);
|
||||
return { p: applyOps(p, addDesignOptionOps(p, id)), id };
|
||||
}
|
||||
|
||||
describe("nativeViewQuery", () => {
|
||||
it("ohne Stift keine Bearbeitungsfelder, keine Geisterschicht", () => {
|
||||
const q = nativeViewQuery(sampleProject, sampleProject.drawingLevels[0].id, null, true, true);
|
||||
expect(q.designOptionEdit).toBeUndefined();
|
||||
expect(ghostFilter3d(q)).toBeNull();
|
||||
});
|
||||
it("Stift: gleiche Anfrage wie im WASM-Pfad (layer + lock), Grau gibt Geisterschicht", () => {
|
||||
const { p, id } = withSet();
|
||||
const draw = { set: id, option: "a" };
|
||||
const lvl = p.drawingLevels[0].id;
|
||||
const q = nativeViewQuery(p, lvl, draw, true, true);
|
||||
expect(q.designOptionEdit).toEqual(designOptionEditArg(p, draw, true, { lock: true }));
|
||||
expect(q.designOptionEdit).toMatchObject({ layer: true, lock: true, grey: true });
|
||||
expect(ghostFilter3d(q)).not.toBeNull();
|
||||
const q2 = nativeViewQuery(p, lvl, draw, false, false);
|
||||
expect(q2.designOptionEdit?.lock).toBeUndefined();
|
||||
expect(ghostFilter3d(q2)).toBeNull();
|
||||
});
|
||||
});
|
||||
@@ -13,8 +13,8 @@ import type { Plan } from "../../core";
|
||||
import { materializeUnderlay } from "../../core";
|
||||
import type { Project } from "../../model/types";
|
||||
import { planSceneBin } from "../../core";
|
||||
import { ghostFilter3d, projectToModel3d } from "../../core";
|
||||
import type { Hide3d } from "../../core";
|
||||
import { designOptionEditArg, ghostFilter3d, projectToModel3d, storedChoice } from "../../core";
|
||||
import type { DesignOptionTarget, Filter3d, Hide3d } from "../../core";
|
||||
|
||||
type Model3d = ReturnType<typeof projectToModel3d>;
|
||||
|
||||
@@ -104,6 +104,28 @@ export function pushNativeWalls(
|
||||
}, DEBOUNCE_MS);
|
||||
}
|
||||
|
||||
/**
|
||||
* [271]/[272] Anfrage-Felder der Ansicht fürs 3D-Fenster: Umbaufilter und Variantenkombination der aktiven Ebene sowie
|
||||
* Bearbeitungsvariante (Stift, Grau, Sperre, Geisterschicht) — dieselben Felder wie `Wasm3DViewport` (`hide`), damit das
|
||||
* native Metal-Fenster Grau, Geisterschicht und Sperre ebenso zeigt.
|
||||
*/
|
||||
export function nativeViewQuery(
|
||||
project: Project,
|
||||
activeLevelId: string,
|
||||
draw: DesignOptionTarget | null | undefined,
|
||||
grey: boolean,
|
||||
lock: boolean,
|
||||
): Pick<Filter3d, "renovation" | "renovationPhase" | "designOptions" | "designOptionEdit"> {
|
||||
const level = project.drawingLevels.find((x) => x.id === activeLevelId);
|
||||
const choice = level ? storedChoice(project, level) : undefined;
|
||||
const edit = designOptionEditArg(project, draw, grey, { lock });
|
||||
return {
|
||||
...(level?.renovationFilter ? { renovation: level.renovationFilter, ...(level.renovationPhase ? { renovationPhase: level.renovationPhase } : {}) } : {}),
|
||||
...(choice ? { designOptions: choice } : {}),
|
||||
...(edit ? { designOptionEdit: edit } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
/** [180] Modell fürs native 3D-Fenster: ohne die grauen Klassen, die stehen gedämpft in `ghost` (render3d `ghost.rs`). */
|
||||
export function nativeModel3d(project: Project, explode: number, hide?: Hide3d): Model3d & { ghost?: Model3d } {
|
||||
const model = projectToModel3d(project, { voids: true, explode, hide });
|
||||
|
||||
@@ -36,7 +36,7 @@ import { crossKindOverlayAllowed, tracePlan, withTrace } from "../core";
|
||||
import { levelMarkerPrimitives, levelMarksEnabled } from "../core";
|
||||
import { unitsForLevel } from "../tools/displayUnits";
|
||||
import { setSheetOwnerOutlines, setSheetSnapSegments, snapSegmentsFromPrimitives } from "../tools/sheetSnapGeometry";
|
||||
import { pushNativeScene, pushNativeWalls } from "./plan/nativeSync";
|
||||
import { nativeViewQuery, pushNativeScene, pushNativeWalls } from "./plan/nativeSync";
|
||||
import { explodeFloorOffsets, selectionHighlightLines } from "../core";
|
||||
import { clashHighlightLines } from "../analysis/clash";
|
||||
import { useClashSession } from "../panels/clashSession";
|
||||
@@ -852,10 +852,21 @@ function LevelPlanView({
|
||||
// Explosionsaxonometrie ([65]) auch im nativen 3D-Fenster.
|
||||
const explode = useStore((s) => (s.explode3d ? s.explode3dGap : 0));
|
||||
// [180] Mit dem Darstellungsmodus der Klassen wie im WASM-Viewport (aus, grau = Geisterschicht).
|
||||
// [271]/[272] Dazu Umbaufilter, Variantenkombination und Bearbeitungsvariante (Grau, Geisterschicht, Sperre) wie im WASM-Viewport.
|
||||
const activeLevelId = useStore((s) => s.activeLevelId);
|
||||
const drawDesignOption = useStore((s) => s.drawDesignOption);
|
||||
const designOptionGrey = useStore((s) => s.designOptionGrey);
|
||||
const designOptionLock = useStore((s) => s.designOptionLock);
|
||||
const nativeHide = useMemo(() => {
|
||||
const d = classDisplay3d(flattenCategories(project.layers ?? []).map((c) => c.code), categoryDisplay);
|
||||
return { hide: d.hide, grey: d.grey, hideFloors: hiddenFloorIds(project.drawingLevels, floorDisplay), greyFloors: greyedFloorIds(project.drawingLevels, floorDisplay) };
|
||||
}, [project.layers, project.drawingLevels, categoryDisplay, floorDisplay]);
|
||||
return {
|
||||
hide: d.hide,
|
||||
grey: d.grey,
|
||||
hideFloors: hiddenFloorIds(project.drawingLevels, floorDisplay),
|
||||
greyFloors: greyedFloorIds(project.drawingLevels, floorDisplay),
|
||||
...nativeViewQuery(project, activeLevelId, drawDesignOption, designOptionGrey, designOptionLock),
|
||||
};
|
||||
}, [project, categoryDisplay, floorDisplay, activeLevelId, drawDesignOption, designOptionGrey, designOptionLock]);
|
||||
useEffect(() => {
|
||||
pushNativeWalls(project, explode, nativeHide);
|
||||
}, [project, explode, nativeHide]);
|
||||
|
||||
Reference in new issue
Block a user