fix: [rd] 모터 Z 오프셋 절반 축소 + 중복 체인 박스 제거

- 모터 이격거리: 150mm → 75mm (motorZ: -270 → -195)
- 체인 직선 두께 박스(csTop/csBot) 제거, Line 경로만 유지
This commit is contained in:
김보곤
2026-03-09 09:47:57 +09:00
parent ef1abae8ea
commit 10341e5f6a

View File

@@ -1241,7 +1241,7 @@ function fs3dBuild() {
const motorR = b.shaftDia * 0.45;
const shaftSprocketR = 70; // 브라켓 높이(180mm) 내 크기 (ø140)
const motorSprocketR = 30; // 모터측 작은 스프로켓 (ø60)
const motorZ = -(shaftSprocketR + motorSprocketR + 170); // 모터 Z 오프셋 (슬랫 감김 간섭 방지 +150mm)
const motorZ = -(shaftSprocketR + motorSprocketR + 95); // 모터 Z 오프셋 (슬랫 감김 간섭 방지 +75mm)
// 브라켓: Z 중심은 샤프트(0)와 모터(motorZ) 사이
const motorBkGeo = new THREE.BoxGeometry(motorBkThick, motorBkH, motorBkW);
const motorBk = new THREE.Mesh(motorBkGeo, bracketMat);
@@ -1348,23 +1348,6 @@ function fs3dBuild() {
chainLine.position.x = shaftSprocketX;
meshes.motor.add(chainLine);
// 체인 직선 두께 (상/하단 — 스프로켓 반지름 차이만큼 기울기 적용)
const tangentLen = Math.sqrt(Math.pow(R1 - R2, 2) + motorZ * motorZ);
if (tangentLen > 10) {
const halfZ = motorZ / 2;
const chainTilt = Math.atan2(R1 - R2, Math.abs(motorZ)); // 반지름 차이에 의한 기울기
// 상단 직선
const csGeo = new THREE.BoxGeometry(6, 4, tangentLen);
const csTop = new THREE.Mesh(csGeo, chainMat);
csTop.position.set(shaftSprocketX, (R1 + R2) / 2, halfZ);
csTop.rotation.x = chainTilt;
meshes.motor.add(csTop);
// 하단 직선
const csBot = new THREE.Mesh(csGeo.clone(), chainMat);
csBot.position.set(shaftSprocketX, -(R1 + R2) / 2, halfZ);
csBot.rotation.x = -chainTilt;
meshes.motor.add(csBot);
}
meshes.motor.position.set(0, shaftY, 0);
scene.add(meshes.motor);