fix: [rd] 셔터박스 Z 배치를 편심 구조로 수정
- 전면 50mm 돌출, 나머지 깊이는 후면(벽쪽) 배치 - 박스/샤프트/모터 Z 위치 분리 (독립 계산) - 밑면 슬랫 개구부를 전면 가까이로 이동 - 도면(500×380 단면도) 기준 배치
This commit is contained in:
@@ -1124,9 +1124,11 @@ function fs3dBuild() {
|
||||
// Center: opening center at 0,H/2,0
|
||||
const hw = W / 2;
|
||||
|
||||
// 셔터박스 비대칭 Z 오프셋: 샤프트 앞면이 가이드레일(Z=0) 근처에 위치
|
||||
// 샤프트 중심 Z = -(반지름 + 여유), 박스는 샤프트를 감싸도록 배치
|
||||
const boxZOffset = -(b.shaftDia / 2 + 5); // 샤프트 앞면이 Z≈-5 (가이드레일 바로 뒤)
|
||||
// 셔터박스 Z 배치 — 도면 기준: 전면판이 슬랫 라인에서 50mm 전면 돌출, 나머지는 후면(벽쪽)
|
||||
// 슬랫/가이드레일 = Z=0 기준선
|
||||
const frontOffset = 50; // 전면판에서 슬랫 라인까지 거리 (도면: 50mm)
|
||||
const boxCenterZ = frontOffset - b.depth / 2; // 박스 중심 Z (스크린: 50-250=-200)
|
||||
const shaftCenterZ = -(b.shaftDia / 2 + 5); // 샤프트 중심 Z (샤프트 앞면 ≈ Z=-5)
|
||||
|
||||
// === SHUTTER BOX (CASE) — 조립식 철판 구조 ===
|
||||
const pt = b.thickness || 1.6; // 철판 두께
|
||||
@@ -1134,7 +1136,7 @@ function fs3dBuild() {
|
||||
const boxMat = new THREE.MeshStandardMaterial({ color: 0x374151, transparent: true, opacity: S.td.caseOpacity, side: THREE.DoubleSide });
|
||||
const boxEdgeMat = new THREE.LineBasicMaterial({ color: 0x94a3b8 });
|
||||
meshes.case = new THREE.Group();
|
||||
meshes.case.position.set(0, H, boxZOffset);
|
||||
meshes.case.position.set(0, H, boxCenterZ);
|
||||
|
||||
// 철판 생성 헬퍼
|
||||
function addPlate(w, h, d, x, y, z) {
|
||||
@@ -1165,13 +1167,13 @@ function addPlate(w, h, d, x, y, z) {
|
||||
// 우측판 (Right side plate — 전체 높이)
|
||||
addPlate(pt, b.height, b.depth, W1 / 2 - pt / 2, b.height / 2, 0);
|
||||
|
||||
// ── 밑면 결합체 (슬랫 통과 슬롯만 개방) ──
|
||||
// ── 밑면 결합체 (슬랫 통과 슬롯: 전면 50mm 오프셋 위치) ──
|
||||
const bottomOpen = p.sb.bottomOpen;
|
||||
const bottomLipD = (b.depth - bottomOpen) / 2;
|
||||
if (bottomLipD > 0) {
|
||||
addPlate(W1, pt, bottomLipD, 0, pt / 2, -b.depth / 2 + bottomLipD / 2);
|
||||
addPlate(W1, pt, bottomLipD, 0, pt / 2, b.depth / 2 - bottomLipD / 2);
|
||||
}
|
||||
// 슬랫 개구부는 전면에서 frontOffset(50mm) 위치
|
||||
const frontLipD = frontOffset; // 전면 ~ 개구부 (50mm)
|
||||
const backLipD = b.depth - frontOffset - bottomOpen; // 개구부 ~ 후면
|
||||
if (frontLipD > 0) addPlate(W1, pt, frontLipD, 0, pt / 2, b.depth / 2 - frontLipD / 2);
|
||||
if (backLipD > 0) addPlate(W1, pt, backLipD, 0, pt / 2, -b.depth / 2 + backLipD / 2);
|
||||
|
||||
// ── 덮개 (Cover) — 절곡 선반 위에 올라가는 평판 (용접 결합, 양쪽 10mm 축소) ──
|
||||
const coverY = b.height + pt; // 절곡 선반(pt) 위에 올라감
|
||||
@@ -1270,7 +1272,7 @@ function addPlate(w, h, d, x, y, z) {
|
||||
flangeNM.position.set(nonMotorSide * (mainShaftLen / 2 + flangeThick / 2), 0, 0);
|
||||
meshes.shaft.add(flangeNM);
|
||||
|
||||
meshes.shaft.position.set(0, shaftY, boxZOffset);
|
||||
meshes.shaft.position.set(0, shaftY, shaftCenterZ);
|
||||
scene.add(meshes.shaft);
|
||||
|
||||
// === MOTOR (체인 구동: 모터는 샤프트와 수평(Z방향) 배치 — 슬랫 간섭 방지) ===
|
||||
@@ -1397,7 +1399,7 @@ function addPlate(w, h, d, x, y, z) {
|
||||
meshes.motor.add(chainLine);
|
||||
|
||||
|
||||
meshes.motor.position.set(0, shaftY, boxZOffset);
|
||||
meshes.motor.position.set(0, shaftY, shaftCenterZ);
|
||||
scene.add(meshes.motor);
|
||||
|
||||
// === GUIDE RAILS (ExtrudeGeometry) ===
|
||||
@@ -1631,7 +1633,7 @@ function createRailGroup() {
|
||||
transparent: true,
|
||||
});
|
||||
meshes.slatRoll = new THREE.Mesh(rollGeo, rollMat);
|
||||
meshes.slatRoll.position.set(0, shaftY, boxZOffset);
|
||||
meshes.slatRoll.position.set(0, shaftY, shaftCenterZ);
|
||||
scene.add(meshes.slatRoll);
|
||||
|
||||
// 표면 나선 라인 (감긴 슬랫 질감)
|
||||
|
||||
Reference in New Issue
Block a user