diff --git a/src/view/footing-section-svg.ts b/src/view/footing-section-svg.ts index 7cae727..f041cdf 100644 --- a/src/view/footing-section-svg.ts +++ b/src/view/footing-section-svg.ts @@ -73,8 +73,6 @@ export function footingSectionSvg(model: PierModel): string { parts.push(line('b5', 'B6', xa, xb, y(z.B68), COLOR.b5, 1.2)); parts.push(line('b5', 'B7', xa, xb, y(z.B7), COLOR.b5, 1.2)); parts.push(line('b5', 'B8', xa, xb, y(z.B68), COLOR.b5, 1.2)); - // B6 leg note: the leg runs from the 하면 1단 up to the B5 height (B6 다리 → B5 높이). - parts.push(text(cx, (y(z.B5) + y(z.B68)) / 2 - 3, `B6 다리 → B5 높이 ${(z.B5 - z.B68).toFixed(0)}`, 'middle', COLOR.b5)); // B1–B4 on the grid along W (교각축, orange points): odd grid positions carry B1, B2 and B3; even carry B4 (as bottomBars). const xs = gridPositions(W, fs, 'sAxis'); @@ -122,7 +120,7 @@ export function footingSectionSvg(model: PierModel): string { parts.push(text(x(W / 2) + 5, yDim + 14, `${fs.cSide}`, 'start', COLOR.dim)); parts.push(text(x(-W / 2 + fs.cSide) + 2, yDim + 14, `${g.e.toFixed(1)}`, 'start', COLOR.dim)); parts.push(text(x(W / 2 - fs.cSide) - 2, yDim + 14, `${g.e.toFixed(1)}`, 'end', COLOR.dim)); - parts.push(text(cx, yDim + 14, `${g.n}@${fs.sAxis}=${g.G}`, 'middle', COLOR.dim)); + parts.push(text(cx, yDim - 6, `${g.n}@${fs.sAxis}=${g.G}`, 'middle', COLOR.dim)); parts.push(text(cx, 20, `교각축 직각 단면 · 폭 ${W.toFixed(0)}`, 'middle', '#1F2937')); const xr = X0 + W_PX + 18; parts.push(``); @@ -130,6 +128,11 @@ export function footingSectionSvg(model: PierModel): string { parts.push(text(xr + 6, y(H) + 12, `${fs.cTop}`, 'start', COLOR.dim)); parts.push(text(xr + 6, (y(H) + y(0)) / 2, `${levels - 1}@${fs.sV}=${(levels - 1) * fs.sV}`, 'start', COLOR.dim)); parts.push(text(xr + 6, y(0) - 4, `${fs.cBottom}`, 'start', COLOR.dim)); + // B6 leg note in the right margin, with a leader to the B6 leg's end at the B6 height (B6 다리 → B5 높이, from the 하면 1단 up to B5). + const yNote = y(H) - 14; + parts.push(``); + parts.push(text(xr + 6, yNote, 'B6 다리 → B5', 'start', COLOR.b5)); + parts.push(text(xr + 6, yNote + 12, `높이 ${(z.B5 - z.B68).toFixed(0)}`, 'start', COLOR.b5)); // Bubbles outside the outline, spread apart, each with a leader to its bar (the leader carries the same data-bar, so it highlights too). const bubble = (name: string, bx: number, by: number, tx: number, ty: number) => { diff --git a/tests/footing-section-svg.test.ts b/tests/footing-section-svg.test.ts index ad417b0..b3c1e3a 100644 --- a/tests/footing-section-svg.test.ts +++ b/tests/footing-section-svg.test.ts @@ -60,7 +60,8 @@ describe('확대기초 교각축 직각 단면 (폭 W) (승인 2026-10-26, 추 }); it('2단계: B6 다리 주석 1723, 범례 5항목, 기둥과 말뚝 맥락 표시, 탭 4개 중 첫 탭만 작동', () => { - expect(svg).toContain('B6 다리 → B5 높이 1723'); + expect(svg).toContain('B6 다리 → B5'); + expect(svg).toContain('높이 1723'); for (const label of ['주철근 (B5–B8)', '직각·보조 (B1–B4)', '전단·띠 (B9)', '측면 수평 (B10-1 · B10-2)', '조립 (B11·B12)']) expect(svg).toContain(label); expect(svg).toContain('class="column"'); expect(svg.split('class="pile"').length - 1).toBeGreaterThan(0);