From bf04ba5f4ac83018bbeedd5e62ed23da0f59863e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 13 Mar 2026 09:53:33 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[bim]=20=EC=83=A4=ED=94=84=ED=8A=B8-?= =?UTF-8?q?=EB=B8=8C=EB=9E=98=ED=82=B7-=EB=AA=A8=ED=84=B0=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=20=EA=B5=AC=EC=A1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 샤프트 길이를 브래킷 중심간 거리로 계산 (고정 비율 제거) - 모터를 브래킷 내측에 밀착 배치 - 폭 변경 시에도 분리되지 않는 구조로 개선 --- resources/views/juil/bim-generator.blade.php | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/resources/views/juil/bim-generator.blade.php b/resources/views/juil/bim-generator.blade.php index 37395a0f..8e29db59 100644 --- a/resources/views/juil/bim-generator.blade.php +++ b/resources/views/juil/bim-generator.blade.php @@ -413,20 +413,22 @@ class GeneratorScene { const edgeMesh = new THREE.LineSegments(edges, new THREE.LineBasicMaterial({ color: 0x94a3b8 })); edgeMesh.position.set(0, boxY, 0); this.objectGroup.add(edgeMesh); - // ── 샤프트 (셔터박스 내부 원통) ── - this.addCylinder(SD / 2, W1 * 0.85, [0, boxY, 0], COLORS.shaft, 'x'); - - // ── 브래킷 (좌우) ── - const bkW = 0.08, bkX = W1 / 2 - bkW / 2; + // ── 브래킷 (좌우 베어링 지지판) ── + const bkW = 0.08; + const bkX = W1 / 2 - bkW / 2; this.addBox(bkW, BH * 0.7, BD * 0.5, [bkX, boxY, 0], COLORS.bracket); this.addBox(bkW, BH * 0.7, BD * 0.5, [-bkX, boxY, 0], COLORS.bracket); - // ── 모터 (원통, 모터 측) ── + // ── 샤프트 (양쪽 브래킷을 관통 — 브래킷 중심간 거리) ── + const shaftLen = W1 - bkW; + this.addCylinder(SD / 2, shaftLen, [0, boxY, 0], COLORS.shaft, 'x'); + + // ── 모터 (모터측 브래킷 내측에 밀착 배치) ── const motorDir = params.motorSide === 'right' ? 1 : -1; - const motorR = SD * 0.45; - const motorLen = motorR * 3; - const motorX = motorDir * (W1 / 2 - 0.12); - this.addCylinder(motorR, motorLen, [motorX, boxY, -BD * 0.2], COLORS.motor, 'x'); + const motorR = Math.min(SD * 0.55, BH * 0.28); + const motorLen = Math.min(W1 * 0.12, 0.25); + const motorX = motorDir * (bkX - bkW / 2 - motorLen / 2 - 0.01); + this.addCylinder(motorR, motorLen, [motorX, boxY, 0], COLORS.motor, 'x'); // ── 가이드레일 (C-채널, ExtrudeGeometry) ── const railH = H0 + 0.1; // 바닥~셔터박스 하단 결합부