fix: [drawing] ① 마감재 수평면 방향 반전 — 벽쪽으로 이동

- 수평면: 백월→개구부(우측) 에서 립→벽(좌측) 방향으로 반전
- 측면탭: 백월 좌측에서 립 끝(우측)으로 이동
- 랩+3단꺾임: 개구부쪽에서 벽쪽으로 이동, 접힘 방향 반전
- ①랩 라벨, ① 원숫자, 개구부 텍스트 위치 업데이트
This commit is contained in:
김보곤
2026-03-11 16:33:00 +09:00
parent eab39e0b29
commit 222e2b2ae3

View File

@@ -770,7 +770,7 @@ function renderGrCross() {
const lipEndX = swEndX + bLip;
const by = pad; // 본체 상단 Y
const svgW = Math.max(lipEndX, bx + m1c) + pad + 160;
const svgW = lipEndX + pad + 160;
const svgH = bOuterW + pad * 2 + 100;
// ── 색상 정의 (부재별 명확 구분) ──
@@ -837,44 +837,41 @@ function renderGrCross() {
`<rect x="${c4SideStartX}" y="${c4Y+c4c-t2-c4a}" width="${t2}" height="${c4a}" fill="${cBk4}" stroke="${ms}" stroke-width="${mw}" opacity="0.8"/>`,
].join('\n');
// ── ① 마감재 SUS 1.2T × 2장 (② 바깥을 감싸는 외피, 절곡: 10-11-110-30-15-15-15, 상하 대칭) ──
// 수평면 시작점 = ②백월 바깥 (①이 ②를 감싸므로 ② 좌측 바깥에서 시작)
const wallRight = pad + wallW; // 방화벽 우측면 X
const trimL1 = bx - t1; // ① 수평면 시작 = ② 백월 바깥 (①두께만큼 좌측)
const m1HEnd = trimL1 + m1c; // 수평면 측 끝 X
const trimR = m1HEnd + t1; // 치수선용 우측 끝 (① 우측 끝)
const trimX2 = trimR; // 치수선용
// ── ① 마감재 SUS 1.2T × 2장 (② 바깥을 감싸는 외피, 절곡: 코킹립10-측면탭11-수평면110-30-3단꺾임15×3, 상하 대칭) ──
// 수평면이 립(개구부) 영역에서 벽쪽(좌측)으로 펼쳐지는 구조
// 측면탭(우측/립쪽) → 수평면(좌측으로 110mm) → 랩+3단꺾임(좌측/벽쪽)
const trimR1 = lipEndX; // ① 수평면 우측 끝 (② 립 끝)
const trimL1 = trimR1 - m1c; // 수평면 측 끝 (벽 방향, 110mm)
const trimX2 = trimR1; // 치수선용 우측 끝
// ①는 ② 바깥을 감싸는 구조 (겹침 없음)
const tTop = by - t1; // 상단 ① 수평면 Y (② 상면 바깥)
const tBot = by + bOuterW; // 하단 ① 수평면 Y (② 하면 바깥)
// 개구부쪽 3단 꺾임 좌표 (상단 기준)
const wrapX = m1HEnd - t1; // 랩 시작 X
const wrap1Y = tTop + t1 + m1d; // 랩 Y
const step1X = wrapX - m1e; // 1끝 X
const step2Y = wrap1Y - m1f; // 2단 끝 Y
const step3X = step1X - m1g; // 3단 끝 X
// 벽쪽 랩+3단꺾임 좌표 (상단 기준)
const wrapX = trimL1; // 랩 X = 수평면 좌측 끝
const wrap1Y = tTop + t1 + m1d; // 랩 하단 Y
const step2Y = wrap1Y - m1f; // 2상단 Y
const trim1Svg = [
// ══════ 상단 ① 마감재 (② 상면 바깥을 감싸기) ══════
// 측면탭: ② 백월 좌측을 따라 아래로 (② 내부 방향)
`<rect x="${trimL1}" y="${tTop}" width="${t1}" height="${m1b+t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
// 수평면: ② 상면 위를 덮음 (좌→우 110mm)
// 측면탭: ② 립 바깥에서 아래로 (개구부쪽, 우측)
`<rect x="${trimR1-t1}" y="${tTop}" width="${t1}" height="${m1b+t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
// 수평면: 립 영역에서 벽 방향으로 110mm (우→좌)
`<rect x="${trimL1}" y="${tTop}" width="${m1c}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
// 랩: 개구부쪽 아래로 30mm
// 랩: 벽쪽 끝에서 아래로 30mm
`<rect x="${wrapX}" y="${tTop+t1}" width="${t1}" height="${m1d}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
// 3단 꺾임
`<rect x="${step1X}" y="${wrap1Y-t1}" width="${m1e+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${step1X}" y="${step2Y}" width="${t1}" height="${m1f}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${step3X}" y="${step2Y}" width="${m1g+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
// 3단 꺾임 (벽쪽에서 우측/② 중심 방향으로 접힘)
`<rect x="${wrapX}" y="${wrap1Y-t1}" width="${m1e+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${wrapX+m1e}" y="${step2Y}" width="${t1}" height="${m1f}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${wrapX+m1e}" y="${step2Y}" width="${m1g+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
// ══════ 하단 ① 마감재 (② 하면 바깥을 감싸기, 거울상) ══════
`<rect x="${trimL1}" y="${tBot-m1b}" width="${t1}" height="${m1b+t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${trimR1-t1}" y="${tBot-m1b}" width="${t1}" height="${m1b+t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${trimL1}" y="${tBot}" width="${m1c}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${wrapX}" y="${tBot-m1d}" width="${t1}" height="${m1d}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${step1X}" y="${tBot-m1d}" width="${m1e+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${step1X}" y="${tBot-m1d}" width="${t1}" height="${m1f}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${step3X}" y="${tBot-m1d+m1f-t1}" width="${m1g+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${wrapX}" y="${tBot-m1d}" width="${m1e+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${wrapX+m1e}" y="${tBot-m1d}" width="${t1}" height="${m1f}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
`<rect x="${wrapX+m1e}" y="${tBot-m1d+m1f-t1}" width="${m1g+t1}" height="${t1}" fill="${cTrim}" stroke="${cTrim}" stroke-width="0.3"/>`,
].join('\n');
// ── 연기차단재 (현재 비활성 — 위치 재조정 후 활성화 예정) ──
@@ -906,8 +903,8 @@ function renderGrCross() {
dimLines += `<text x="${dimRightX+8}" y="${by+bOuterW/2+4}" fill="#3b82f6" font-size="12" font-weight="900" text-anchor="start" font-family="Pretendard">${g.width} mm</text>`;
// ② 플랜지 26mm (②의 립 끝 기준 라벨)
dimLines += `<text x="${lipEndX+6}" y="${by+bFl/2+3}" fill="${cBody}" font-size="8" font-weight="700" text-anchor="start" font-family="Pretendard">②FL${g.flange}</text>`;
// ① 랩 30mm (① 마감재 랩 위치 라벨)
dimLines += `<text x="${m1HEnd+6}" y="${by+bOuterW/2+4}" fill="${cTrim}" font-size="8" font-weight="700" text-anchor="start" font-family="Pretendard">①랩${m1d/sc}</text>`;
// ① 랩 30mm (① 마감재 랩 위치 라벨, 벽쪽)
dimLines += `<text x="${trimL1-6}" y="${by+bOuterW/2+4}" fill="${cTrim}" font-size="8" font-weight="700" text-anchor="end" font-family="Pretendard">①랩${m1d/sc}</text>`;
// 슬롯 개구 (우측 중앙)
dimLines += `<text x="${lipEndX+6}" y="${by+bOuterW/2+16}" fill="#22c55e" font-size="8" font-weight="700" text-anchor="start" font-family="Pretendard">슬롯${bSlot/sc}</text>`;
// 립 깊이
@@ -915,9 +912,9 @@ function renderGrCross() {
// 두께 (하단, 120mm 치수선 아래)
dimLines += `<text x="${(totalLeft+totalRight)/2}" y="${by+bOuterW+68}" fill="#94a3b8" font-size="8" font-weight="700" text-anchor="middle" font-family="Pretendard">①t=${g.trimThick||1.2}(SUS) ②t=${g.thickness}(EGI)</text>`;
// 부재 번호 라벨 (참조 도면 기준 배치)
// ① 마감재: 우측 랩/플랜지 영역 (상단, 하단 각 1개)
dimLines += `<text x="${(lipEndX+wrapX)/2}" y="${by+bFl/2+4}" fill="${cTrim}" font-size="27" font-weight="900" text-anchor="middle" font-family="Pretendard">①</text>`;
dimLines += `<text x="${(lipEndX+wrapX)/2}" y="${by+bOuterW-bFl/2+4}" fill="${cTrim}" font-size="27" font-weight="900" text-anchor="middle" font-family="Pretendard">①</text>`;
// ① 마감재: 수평면 중앙 (상단, 하단 각 1개)
dimLines += `<text x="${(bx+lipEndX)/2}" y="${tTop+t1/2+3}" fill="${cTrim}" font-size="27" font-weight="900" text-anchor="middle" font-family="Pretendard">①</text>`;
dimLines += `<text x="${(bx+lipEndX)/2}" y="${tBot+t1/2+3}" fill="${cTrim}" font-size="27" font-weight="900" text-anchor="middle" font-family="Pretendard">①</text>`;
// ② 가이드레일: 채널 내부 중앙
dimLines += `<text x="${bx+t2+bSw/2}" y="${by+bOuterW/2+4}" fill="${cBody}" font-size="33" font-weight="900" text-anchor="middle" font-family="Pretendard">②</text>`;
// ③ C형: 몸체(45mm) 중심
@@ -952,7 +949,7 @@ function renderGrCross() {
<rect x="${slatX1}" y="${slatY}" width="${slatX2-slatX1}" height="${slatT}" fill="#c084fc" opacity="0.8" rx="1"/>
${g.showDim ? `<text x="${slatX1}" y="${slatY-4}" fill="#c084fc" font-size="8" font-weight="700" text-anchor="start" font-family="Pretendard">슬랫 t=${g.slatThick}</text>` : ''}
<!-- 개구부 방향 -->
<text x="${m1HEnd+t1+6}" y="${by+bOuterW/2-2}" fill="#64748b" font-size="9" font-weight="700" text-anchor="start" font-family="Pretendard">→개구부</text>
<text x="${lipEndX+10}" y="${by+bOuterW/2-2}" fill="#64748b" font-size="9" font-weight="700" text-anchor="start" font-family="Pretendard">→개구부</text>
${dimLines}
<text x="${(bx+lipEndX)/2}" y="${by+bOuterW+82}" fill="#94a3b8" font-size="10" font-weight="900" text-anchor="middle" font-family="Pretendard">GUIDE RAIL — 스크린형 (①마감재 ②가이드레일 ③C형 ④D형)</text>
</svg>`;