fix: [fire-shutter] 벽체 기둥+인방 U자 일체형으로 이음새 제거

This commit is contained in:
김보곤
2026-03-09 11:29:04 +09:00
parent 2c437d33e7
commit 1ff98a0f5a

View File

@@ -1492,33 +1492,47 @@ function fs3dBuild() {
scene.add(meshes.bottomBar);
// === WALL (좌/우 기둥 + 상부 인방) ===
// 기둥: 하나의 통 박스 (바닥~전체높이, 개구부 양옆)
// 인방: 셔터박스 윗면부터 위로만 (셔터박스 내부 침범 안 함)
// 벽체: 기둥+인방을 하나의 U자 형상으로 생성 (이음새 없음)
const wl = S.wall;
const wallH = H + b.height + wl.topMargin;
const colH = H + b.height;
const wallColor = new THREE.Color(wl.color);
const wallMat = new THREE.MeshStandardMaterial({ color: wallColor, transparent: true, opacity: wl.opacity / 100, side: THREE.DoubleSide });
meshes.wall = new THREE.Group();
// 좌/우 기둥 (바닥~셔터박스 윗면까지, 인방과 겹치지 않게)
const colH = H + b.height; // 기둥 높이: 인방 아래까지
if (wl.wing > 0) {
const colGeo = new THREE.BoxGeometry(wl.wing, colH, wl.thick);
const hw = W1 / 2;
const wg = wl.wing;
const topH = wl.topMargin;
const totalH = colH + topH;
if (wg > 0 && topH > 0) {
// U자 형상 (기둥+인방 일체형)
const shape = new THREE.Shape();
shape.moveTo(-hw - wg, 0);
shape.lineTo(-hw - wg, totalH);
shape.lineTo(hw + wg, totalH);
shape.lineTo(hw + wg, 0);
shape.lineTo(hw, 0);
shape.lineTo(hw, colH);
shape.lineTo(-hw, colH);
shape.lineTo(-hw, 0);
shape.lineTo(-hw - wg, 0);
const wallGeo = new THREE.ExtrudeGeometry(shape, { depth: wl.thick, bevelEnabled: false });
wallGeo.translate(0, 0, -wl.thick / 2);
meshes.wall.add(new THREE.Mesh(wallGeo, wallMat));
} else if (wg > 0) {
// 기둥만 (인방 없음)
const colGeo = new THREE.BoxGeometry(wg, colH, wl.thick);
const leftCol = new THREE.Mesh(colGeo, wallMat);
leftCol.position.set(-W1 / 2 - wl.wing / 2, colH / 2, 0);
leftCol.position.set(-hw - wg / 2, colH / 2, 0);
meshes.wall.add(leftCol);
const rightCol = new THREE.Mesh(colGeo.clone(), wallMat);
rightCol.position.set(W1 / 2 + wl.wing / 2, colH / 2, 0);
rightCol.position.set(hw + wg / 2, colH / 2, 0);
meshes.wall.add(rightCol);
}
// 상부 인방 (셔터박스 윗면~topMargin, 기둥 포함 전체 폭)
if (wl.topMargin > 0) {
const totalW = W1 + wl.wing * 2;
const lintelGeo = new THREE.BoxGeometry(totalW, wl.topMargin, wl.thick);
} else if (topH > 0) {
// 인방만 (기둥 없음)
const lintelGeo = new THREE.BoxGeometry(W1, topH, wl.thick);
const lintel = new THREE.Mesh(lintelGeo, wallMat);
lintel.position.set(0, colH + wl.topMargin / 2, 0);
lintel.position.set(0, colH + topH / 2, 0);
meshes.wall.add(lintel);
}