fix: [fire-shutter] HEAD BOX→셔터박스(CASE) 용어 수정, 3D 슬랫 라인 좌표를 로컬 좌표로 변환

This commit is contained in:
김보곤
2026-03-08 20:30:57 +09:00
parent c05b7813d0
commit 7cf6bcabc3

View File

@@ -556,7 +556,7 @@ function renderSettingsPreview() {
<rect x="${ox - 20}" y="${oy - 20}" width="${sw + 40}" height="20" fill="url(#hatch)" stroke="#8b7355" stroke-width="1"/>
<!-- Shutter Box -->
<rect x="${ox}" y="${oy}" width="${sw}" height="${boxH}" fill="#374151" stroke="#94a3b8" stroke-width="2" rx="3"/>
<text x="${ox + sw/2}" y="${oy + boxH/2 + 4}" fill="#60a5fa" font-size="11" font-weight="900" text-anchor="middle" font-family="Pretendard">셔터박스 (HEAD BOX)</text>
<text x="${ox + sw/2}" y="${oy + boxH/2 + 4}" fill="#60a5fa" font-size="11" font-weight="900" text-anchor="middle" font-family="Pretendard">셔터박스 (CASE)</text>
<!-- Shaft circle -->
<circle cx="${ox + sw/2}" cy="${oy + boxH/2}" r="18" fill="none" stroke="#64748b" stroke-width="2" stroke-dasharray="4 2"/>
<!-- Guide Rails -->
@@ -809,7 +809,7 @@ function renderSbFront() {
<line x1="${ox + sw + 20}" y1="${oy}" x2="${ox + sw + 20}" y2="${oy + sh}" stroke="#3b82f6" stroke-width="1"/>
<text x="${ox + sw + 35}" y="${oy + sh/2 + 4}" fill="#3b82f6" font-size="11" font-weight="900" text-anchor="start" font-family="Pretendard">${b.height} mm</text>
<!-- Case label -->
<text x="${ox + sw/2}" y="${oy - 10}" fill="#94a3b8" font-size="11" font-weight="900" text-anchor="middle" font-family="Pretendard">HEAD BOX / CASE — t=${b.thickness}mm</text>
<text x="${ox + sw/2}" y="${oy - 10}" fill="#94a3b8" font-size="11" font-weight="900" text-anchor="middle" font-family="Pretendard">셔터박스 (CASE) — t=${b.thickness}mm</text>
</svg>`;
displaySvg(svg);
@@ -1065,13 +1065,14 @@ function fs3dBuild() {
meshes.slats.position.set(0, H - shutterH / 2, 0);
scene.add(meshes.slats);
// Slat lines (horizontal grooves for steel type)
// Slat lines (horizontal grooves for steel type) — local coords relative to meshes.slats
if (S.productType === 'steel') {
const lineGroup = new THREE.Group();
const slatPitch = 80; // mm
const lineCount = Math.floor(shutterH / slatPitch);
for (let i = 1; i < lineCount; i++) {
const y = H - i * slatPitch;
const y = shutterH / 2 - i * slatPitch; // local Y: top of plane → down
if (y < -shutterH / 2) break;
const lineGeo = new THREE.BufferGeometry().setFromPoints([
new THREE.Vector3(-W/2 + 10, y, 1),
new THREE.Vector3(W/2 - 10, y, 1)