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; // 바닥~셔터박스 하단 결합부