[K2] Oeffnungen in 3D und Wand-Loch-Mesh nach Rust (openings3d.rs, wall_mesh_cut.rs)
Glas/Mehrfachverglasung, Tuerblatt/Kassette, Blend- und Fluegelrahmen je Eckstoss, Sprossen, SIA-Symbole, Baenke, Zarge, Schwelle und Rollladenkasten rechnet der Kern; toWalls3d/openings.ts sammelt nur noch aus dem Project und uebergibt alle Waende in einem Aufruf (emitOpeningMeshes), Farbe je Bauteil-Klasse bleibt TS. wallMeshCut.ts ist Fassade (wallCutMeshes fuer viele Baender, solidSubrects, isWatertight); STL/OBJ/IFC holen die Loch-Meshes gesammelt. TS-Rechenlogik geloescht. Ergebnis bitgleich (Beispiel + 40 Zufallsprojekte x 4 Detailgrade, 6586 Baender, IFC-Datei identisch). projectToModel3d (1500 Waende) 193 -> 126 ms.
This commit is contained in:
14 files changed
+1943
-1425
No files matched your search
@@ -73,7 +73,7 @@ import {
|
||||
} from "../model/wall";
|
||||
import { pickGeometry } from "../plan/toWalls3d";
|
||||
import type { RWall } from "../plan/toWalls3d";
|
||||
import { isWatertight, wallCutMesh } from "../plan/wallMeshCut";
|
||||
import { isWatertight, wallCutMeshes, type CutMesh } from "../plan/wallMeshCut";
|
||||
import { evaluateRoom } from "../geometry/roomArea";
|
||||
import { columnFootprint } from "../geometry/column";
|
||||
import { emitRoofs } from "../plan/toWalls3d/roofs";
|
||||
@@ -607,7 +607,11 @@ export function exportIfcSpf(projectIn: Project): string {
|
||||
// aussen bleiben. Watertightness (isWatertight) misst das anschliessend am
|
||||
// fertigen IFC-Mesh → treibt das Closed-Flag des Face-Sets.
|
||||
const bandsByWallId = new Map<string, RWall[]>();
|
||||
for (const band of pickGeometry(project).walls) {
|
||||
const allBands = pickGeometry(project).walls;
|
||||
// Loch-Ausschnitte aller Bänder in EINEM Kern-Aufruf.
|
||||
const cutOf = new Map<RWall, CutMesh>();
|
||||
wallCutMeshes(allBands).forEach((m, i) => cutOf.set(allBands[i], m));
|
||||
for (const band of allBands) {
|
||||
const list = bandsByWallId.get(band.wallId);
|
||||
if (list) list.push(band);
|
||||
else bandsByWallId.set(band.wallId, [band]);
|
||||
@@ -620,7 +624,8 @@ export function exportIfcSpf(projectIn: Project): string {
|
||||
const positions: number[] = [];
|
||||
const indices: number[] = [];
|
||||
for (const band of bands) {
|
||||
const cut = wallCutMesh(band);
|
||||
const cut = cutOf.get(band);
|
||||
if (!cut) continue;
|
||||
const base = positions.length / 3;
|
||||
for (let i = 0; i < cut.positions.length; i += 3) {
|
||||
positions.push(
|
||||
|
||||
Reference in new issue
Block a user