diff --git a/src/view/footing-section-l-svg.ts b/src/view/footing-section-l-svg.ts index fb6be40..d10543d 100644 --- a/src/view/footing-section-l-svg.ts +++ b/src/view/footing-section-l-svg.ts @@ -1,6 +1,6 @@ import type { PierModel } from '../core/geometry'; import { NOMINAL_DIAMETER } from '../core/rebar/common'; -import { assemblyGridIndices, assemblyJs, b10Levels, b9Bars, grid, gridPositions, layers, sideDepth } from '../core/rebar/footing'; +import { assemblyGridIndices, assemblyJs, b10Levels, b9Bars, grid, gridPositions, layers, legLength, sideDepth } from '../core/rebar/footing'; import { DEFAULT_FOOTING_REBAR } from '../core/rebar/footing-settings'; /** @@ -57,11 +57,20 @@ export function footingSectionLSvg(model: PierModel): string { const xa = x(-L / 2 + fs.cSide); const xb = x(L / 2 - fs.cSide); - // B5–B8 (along L): one line per family from cover to cover. - parts.push(line('b5', 'B5', xa, xb, y(z.B5), COLOR.b5, 1.6)); - parts.push(line('b6', 'B6', xa, xb, y(z.B68), COLOR.b5, 1.2)); - parts.push(line('b7', 'B7', xa, xb, y(z.B7), COLOR.b5, 1.2)); - parts.push(line('b8', 'B8', xa, xb, y(z.B68), COLOR.b5, 1.2)); + // B5–B8 (along L, 주철근): one line per family from cover to cover, with the legs at both ends + // (B5 ⊓ down, B6 and B7 ⊔ up to the B5 height / up, B8 straight; 확대기초철근 (1).md §6). + const legW = 1.6; + parts.push(line('b5', 'B5', xa, xb, y(z.B5), COLOR.b5, 2)); + parts.push(line('b6', 'B6', xa, xb, y(z.B68), COLOR.b5, 2)); + parts.push(line('b7', 'B7', xa, xb, y(z.B7), COLOR.b5, 2)); + parts.push(line('b8', 'B8', xa, xb, y(z.B68), COLOR.b5, 2)); + const leg = (name: string, xx: number, y1: number, y2: number) => + ``; + for (const xx of [xa, xb]) { + parts.push(leg('B5', xx, y(z.B5), y(z.B5 - legLength('S29')))); + parts.push(leg('B6', xx, y(z.B68), y(z.B5))); + parts.push(leg('B7', xx, y(z.B7), y(z.B7 + legLength('S19')))); + } // B1–B4 (along W, spaced along L): points on the L grid. Odd positions carry B1, B2, B3; even carry B4 (as bottomBars). const xsL = gridPositions(L, fs, 'sL'); diff --git a/tests/footing-section-l-svg.test.ts b/tests/footing-section-l-svg.test.ts index 6a958df..4416fae 100644 --- a/tests/footing-section-l-svg.test.ts +++ b/tests/footing-section-l-svg.test.ts @@ -29,6 +29,10 @@ describe('확대기초 교각축 단면 (길이 L) (승인 2026-10-27)', () => { expect(crossBars(L, W, H, fs).length).toBe(4); }); + it('주철근 B5–B8: 선 4개와 다리 6개 (B5 양끝 아래, B6·B7 양끝 위, B8 직선)', () => { + expect(svg.split('class="mainleg"').length - 1).toBe(6); + }); + it('shows the length, the grid string, and the B10 levels as dimensions', () => { expect(svg).toContain('길이 10400'); expect(svg).toContain('8@200=1600');