[216] Körper-Netze von Wänden mit Formöffnung tragen die wallId (3D-Liste = Pick-Liste)
This commit is contained in:
3 files changed
+8
-1
No files matched your search
@@ -214,6 +214,8 @@ export type RMeshKind = "terrain" | "imported" | "extrusion";
|
||||
* render3d::types::MeshInput.
|
||||
*/
|
||||
export interface RMesh {
|
||||
/** [216] Wand, deren Körper (Formöffnung) dieses Netz ist; sonst leer. */
|
||||
wallId?: string;
|
||||
positions: number[];
|
||||
indices: number[];
|
||||
kind: RMeshKind;
|
||||
|
||||
@@ -48,6 +48,7 @@ export function splitWallBodies(walls: readonly RWall[]): { walls: RWall[]; mesh
|
||||
}
|
||||
if (w.body) {
|
||||
meshes.push({
|
||||
wallId: w.wallId,
|
||||
positions: w.body.positions,
|
||||
indices: w.body.indices,
|
||||
kind: "extrusion",
|
||||
|
||||
@@ -205,7 +205,11 @@ export function installTestHooks(): void {
|
||||
return {
|
||||
only: f.only,
|
||||
hidden: f.hidden,
|
||||
walls: uniq(projectToModel3d(p, { hide }).walls.map((w) => w.wallId)),
|
||||
// [216] Wände mit Formöffnung kommen als Körper-Netz (mit `wallId`) statt als Stücke.
|
||||
walls: (() => {
|
||||
const m = projectToModel3d(p, { hide });
|
||||
return uniq([...m.walls.map((w) => w.wallId), ...m.meshes.flatMap((x) => (x.wallId ? [x.wallId] : []))]);
|
||||
})(),
|
||||
pickWalls: uniq(pickGeometry(p, 0, hide).walls.map((w) => w.wallId)),
|
||||
pickOpenings: (() => {
|
||||
const g = pickGeometry(p, 0, hide);
|
||||
|
||||
Reference in new issue
Block a user