fix: [rd] 스크린 가이드레일 폭/깊이 교정 + 셔터박스 Z계산 depth 기준으로 통일

- 스크린 gr: width 70→120(면폭), depth 120→70(Z방향 깊이) 교정
- 셔터박스 railHalf, 개구부: gr.width → gr.depth (Z방향 치수)
- S 초기값, HTML input 기본값 동기화
This commit is contained in:
김보곤
2026-03-09 16:58:05 +09:00
parent c5c10e8942
commit 8e4c91af61

View File

@@ -140,11 +140,11 @@
<div class="grid grid-cols-2 gap-4">
<div>
<label class="fs-label">레일 전체 (mm)</label>
<input type="number" id="grWidth" class="fs-input" value="70" step="0.1" onchange="fsRender()">
<input type="number" id="grWidth" class="fs-input" value="120" step="0.1" onchange="fsRender()">
</div>
<div>
<label class="fs-label">레일 깊이 (mm)</label>
<input type="number" id="grDepth" class="fs-input" value="120" step="0.1" onchange="fsRender()">
<input type="number" id="grDepth" class="fs-input" value="70" step="0.1" onchange="fsRender()">
</div>
<div>
<label class="fs-label">강판 두께 (mm)</label>
@@ -401,7 +401,7 @@
openHeight: 3000,
quantity: 1,
// Guide Rail
gr: { width:70, depth:120, thickness:1.55, lip:10, flange:26, sideWall:80, backWall:67, trimThick:1.2, sealThick:0.8, sealDepth:40, slatThick:0.8, anchorSpacing:500, viewMode:'cross', showDim:true, showSeal:true },
gr: { width:120, depth:70, thickness:1.55, lip:10, flange:26, sideWall:80, backWall:67, trimThick:1.2, sealThick:0.8, sealDepth:40, slatThick:0.8, anchorSpacing:500, viewMode:'cross', showDim:true, showSeal:true },
// Shutter Box
sb: { width:2280, height:380, depth:500, thickness:1.6, shaftDia:80, bracketW:10, motorSide:'right', viewMode:'front', showShaft:true, showSlatRoll:true, showMotor:true, showBrake:true, showSpring:true },
// 3D
@@ -420,7 +420,7 @@
sb:{height:550, depth:650, frontH:410, bottomOpen:75, shaftDia:120},
bk:{nmH:320, nmD:320, mtH:320, mtD:530, thick:18, sprocketR:215, motorSpR:40, motorOffset:160} },
screen: { marginW:140, marginH:350, weightFactor:2,
gr:{width:70, depth:120, thickness:1.55, lip:10, flange:26, sideWall:80, backWall:67, trimThick:1.2},
gr:{width:120, depth:70, thickness:1.55, lip:10, flange:26, sideWall:80, backWall:67, trimThick:1.2},
slatThick:0.8,
sb:{height:380, depth:500, frontH:240, bottomOpen:75, shaftDia:80},
bk:{nmH:180, nmD:180, mtH:180, mtD:380, thick:18, sprocketR:70, motorSpR:30, motorOffset:0} },
@@ -1194,8 +1194,8 @@ function fs3dBuild() {
const hw = W / 2;
// 셔터박스 Z 배치 — 도면 기준
// 가이드레일 중심 = Z=0, 레일 너비 = gr.width (스크린:70, 철재:120)
const railHalf = p.gr.width / 2; // 스크린:35, 철재:60
// 가이드레일 중심 = Z=0, 레일 깊이(Z방향) = gr.depth (스크린:70, 철재:75)
const railHalf = p.gr.depth / 2; // 스크린:35, 철재:37.5
const frontOffset = railHalf + 50; // 박스 전면판 Z (스크린:85, 철재:110)
const boxCenterZ = frontOffset - b.depth / 2;
// 샤프트 Z: 기본 위치에서 시작, 박스 전면판을 벗어나면 자동 보정
@@ -1245,7 +1245,7 @@ function addPlate(w, h, d, x, y, z) {
// ── 밑면 결합체 (슬랫 통과 개구부: 레일 너비만큼만 개방) ──
// 구조: [전면 립 50mm] → [개구부 = 레일 너비] → [후면 밑판]
const frontLipD = 50; // 전면판 ~ 레일 전면 (50mm)
const openingW = p.gr.width; // 개구부 = 레일 너비 (스크린:70, 철재:120)
const openingW = p.gr.depth; // 개구부 = 레일 깊이(Z방향) (스크린:70, 철재:75)
const backLipD = b.depth - frontLipD - openingW; // 레일 후면 ~ 후면판
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);