[202] Treppe verschieben: Deckenloch wandert mit, ankommende Treppe ohne Loch bleibt sichtbar
Griff stairBy (grips::run_doc, auch Abfrage gripOps) und Bewegen/Drehen/Spiegeln/Skalieren (cmd_transform) nehmen die Löcher der Decke mit, auf der die Treppe ankommt: Aussparungen Ceiling.openings (Bögen kippen bei Spiegelung) und Deckenöffnungs-Elemente (hostCeilingId), gleiche Abbildung im selben Op-Satz (stair_guard::carried_holes, cmd_transform::carry_hole_ops). Es bleiben: Loch mit einer weiteren, nicht bewegten Treppe; gesperrte Decke/Öffnung; mitgewählte Decke/Öffnung (bewegt sich selbst, kein Doppelzug). Kopien lassen das Loch beim Original. Ankommende Treppe ohne Loch: im Grundriss oben unbeschnitten gezeichnet (arrivals_in_plan), Absturzsicherung in 3D/IFC weiter nur mit Loch (arrivals). Goldens: Musterhaus (einfach) OG zeigt jetzt die EG-Treppe (Decke dort ohne Loch). Tests: Rust stair_guard (Griff, Befehl, Drehen, zwei Treppen, gesperrte/mitgewählte Decke, Öffnungs-Element, ohne Loch), plan/domains angepasst; e2e stairHole202 (Musterhaus komplex).
This commit is contained in:
12 files changed
+476
-28
No files matched your search
@@ -1,10 +1,10 @@
|
||||
viewBox -1.621 0 8.242 7.763
|
||||
bytes 2638
|
||||
bytes 4266
|
||||
g 1
|
||||
line 2
|
||||
polygon 13
|
||||
line 19
|
||||
polygon 15
|
||||
polyline 2
|
||||
rect 1
|
||||
svg 1
|
||||
text 3
|
||||
hash bf1a2d46506512f4
|
||||
hash 47b6c74b9f5b15d4
|
||||
@@ -1,10 +1,10 @@
|
||||
viewBox -1.56 0 8.121 7.581
|
||||
bytes 4518
|
||||
bytes 6163
|
||||
g 1
|
||||
line 2
|
||||
polygon 30
|
||||
line 19
|
||||
polygon 32
|
||||
polyline 2
|
||||
rect 1
|
||||
svg 1
|
||||
text 3
|
||||
hash f90a323318f1a1e6
|
||||
hash fa12f60d23324d84
|
||||
@@ -73,6 +73,8 @@ declare global {
|
||||
walls: () => { id: string; start: { x: number; y: number }; end: { x: number; y: number } }[];
|
||||
/** [185] 3D-Element-Filter (Store) und die Wand-ids des 3D-Modells bzw. der Pick-Geometrie mit ihm. */
|
||||
view3d: () => { only: string[] | null; hidden: string[]; walls: string[]; pickWalls: string[]; floors: string[]; pickOpenings: { id: string; host: string }[] };
|
||||
/** [202] Treppe (Antritt, Zentrum), erster Punkt des ersten Lochs der Decke `ceilingId` und Zahl der Plan-Linien der Treppe im aktiven Geschoss. */
|
||||
stairHole: (stairId: string, ceilingId: string) => { start: { x: number; y: number }; center: { x: number; y: number } | null; hole0: { x: number; y: number } | null; lines: number };
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -207,5 +209,22 @@ export function installTestHooks(): void {
|
||||
return { wallId: s.project.walls.find((w) => w.floorId === s.activeLevelId)?.id ?? s.project.walls[0]?.id ?? "", visible: vis.sort(), prims: prims.length, wallPrims: prims.filter((q) => !!(q as { wallId?: string }).wallId).length };
|
||||
},
|
||||
selected: () => ({ drawings: [...getState().selection.drawings], groups: [...getState().selection.groups], all: JSON.stringify(getState().selection) }),
|
||||
stairHole: (stairId, ceilingId) => {
|
||||
const s = getState();
|
||||
const st = (s.project.stairs ?? []).find((x) => x.id === stairId)!;
|
||||
const hole = (s.project.ceilings ?? []).find((c) => c.id === ceilingId)?.openings?.[0]?.[0];
|
||||
const codes = new Set<string>();
|
||||
const walk = (cs: { code: string; children?: unknown[] }[]): void => {
|
||||
for (const c of cs) {
|
||||
codes.add(c.code);
|
||||
walk((c.children ?? []) as { code: string; children?: unknown[] }[]);
|
||||
}
|
||||
};
|
||||
walk(s.project.layers);
|
||||
const lines = generatePlan(s.project, s.activeLevelId, codes, undefined, s.detail, false, false, true, 50).primitives.filter(
|
||||
(q) => q.kind === "line" && (q as { stairId?: string }).stairId === stairId,
|
||||
).length;
|
||||
return { start: { ...st.start }, center: st.center ? { ...st.center } : null, hole0: hole ? { ...hole } : null, lines };
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user