feat(rebar): 확대기초 교각축 단면(길이 L) 탭 추가

- view/footing-section-l-svg.ts: 길이 방향 단면 (B1–B4 점, B5–B8 선, B9 세로선, B10-2 점·B10-1 선, B11 점, B12 선)
- 탭 전환: 교각축 직각 단면(폭 W) ↔ 교각축 단면(길이 L), 다리 배치 상세·B10 모서리는 다음 단계
- 테스트: 점·선 개수가 철근표 개수와 같음

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-27 13:56:05 +09:00
1 parent d3c761dcd1
commit 0e9d89951a
3 files changed
+211 -15

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
import { describe, expect, it } from 'vitest';
import { buildPier } from '../src/core/geometry';
import { assemblyBars, assemblyJs, b9Bars, bottomBars, crossBars, sideBars } from '../src/core/rebar/footing';
import { DEFAULT_FOOTING_REBAR } from '../src/core/rebar/footing-settings';
import { footingSectionLSvg } from '../src/view/footing-section-l-svg';
import { loadP1 } from './helpers';
const countMark = (svg: string, cls: string, bar: string) => svg.split(`class="${cls}" data-bar="${bar}"`).length - 1;
describe('확대기초 교각축 단면 (길이 L) (승인 2026-10-27)', () => {
const m = buildPier(loadP1());
const foot = m.footings[0];
const L = foot.length * 1000;
const W = foot.width * 1000;
const H = (foot.top - foot.bottom) * 1000;
const fs = DEFAULT_FOOTING_REBAR;
const svg = footingSectionLSvg(m);
it('point and line counts match the rebar table families', () => {
const bottom = bottomBars(L, W, H, fs);
expect(countMark(svg, 'b1', 'B1')).toBe(bottom.find((b) => b.name === 'B1')!.count);
expect(countMark(svg, 'b2', 'B2')).toBe(bottom.find((b) => b.name === 'B2')!.count);
expect(countMark(svg, 'b4', 'B4')).toBe(bottom.find((b) => b.name === 'B4')!.count);
expect(countMark(svg, 'b10', 'B10-2')).toBe(sideBars(L, W, H, fs).find((b) => b.name === 'B10-2')!.count);
expect(countMark(svg, 'b10', 'B10-1')).toBe(sideBars(L, W, H, fs).find((b) => b.name === 'B10-1')!.count / 2);
expect(countMark(svg, 'b11', 'B11')).toBe(assemblyBars(L, W, H, fs).find((b) => b.name === 'B11')!.count);
expect(countMark(svg, 'b12', 'B12')).toBe(assemblyJs(H, fs).length);
expect(svg.split('class="b9"').length - 1).toBe(new Set(b9Bars(L, W, [], 2000, fs).bars.map((b) => b.x)).size);
expect(crossBars(L, W, H, fs).length).toBe(4);
});
it('shows the length, the grid string, and the B10 levels as dimensions', () => {
expect(svg).toContain('길이 10400');
expect(svg).toContain('8@200=1600');
});
it('has bubbles for B5, B11, B12 and B10-2', () => {
for (const name of ['B5', 'B11', 'B12', 'B10-2']) expect(svg).toContain(`data-bubble="${name}"`);
});
});