From cf8410e450a9ea5446b8a329a381e1ba1940e5ad Mon Sep 17 00:00:00 2001 From: ypshim Date: Tue, 27 Oct 2026 13:58:27 +0900 Subject: [PATCH] =?UTF-8?q?feat(rebar):=20=EA=B8=B8=EC=9D=B4=20=EB=8B=A8?= =?UTF-8?q?=EB=A9=B4=EC=9D=98=20=EC=A3=BC=EC=B2=A0=EA=B7=BC=20B5=E2=80=93B?= =?UTF-8?q?8=EC=9D=84=20=EA=B5=B5=EA=B2=8C=20=ED=91=9C=EC=8B=9C=ED=95=98?= =?UTF-8?q?=EA=B3=A0=20=EC=96=91=EB=81=9D=20=EB=8B=A4=EB=A6=AC=EB=A5=BC=20?= =?UTF-8?q?=EA=B7=B8=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - B5–B8 선 굵기 2, B5 양끝 아래, B6·B7 양끝 위, B8 직선 (확대기초철근 (1).md §6) - 테스트: 다리 6개 확인 Co-Authored-By: Claude Haiku 5.5 --- src/view/footing-section-l-svg.ts | 21 +++++++++++++++------ tests/footing-section-l-svg.test.ts | 4 ++++ 2 files changed, 19 insertions(+), 6 deletions(-) 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');