- core/rebar/footing-legs.ts: 번호별 다리 형태·길이·끝 높이·이음 여부 (계산 함수 결과 사용) - view/footing-corner-svg.ts: B10-2 → B10-1 모서리 갈고리, 깊이 122.25 / 123.85, l_h 296, 최하단 제외 표시 - 패널 탭 4개 모두 작동 (B10 모서리는 개략도, 단면 비율 아님) - 테스트: 12개 철근, B2 다리 1723, B6 이음 필요, 모서리 값 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
35 lines
1.4 KiB
TypeScript
35 lines
1.4 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { buildPier } from '../src/core/geometry';
|
|
import { footingLegRows } from '../src/core/rebar/footing-legs';
|
|
import { footingCornerSvg } from '../src/view/footing-corner-svg';
|
|
import { loadP1 } from './helpers';
|
|
|
|
describe('확대기초 다리 배치 상세 · B10 모서리 (승인 2026-10-27)', () => {
|
|
const m = buildPier(loadP1());
|
|
const rows = footingLegRows(m);
|
|
const byBar = (name: string) => rows.find((r) => r.bar === name)!;
|
|
|
|
it('lists the 12 bar families of the footing', () => {
|
|
expect(rows.map((r) => r.bar)).toEqual(['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B10-1', 'B10-2', 'B11', 'B12']);
|
|
});
|
|
|
|
it('B2 leg goes up to the B1 height (1723); straight bars have no leg', () => {
|
|
expect(byBar('B2').legLength).toBeCloseTo(1723, 0);
|
|
expect(byBar('B4').legLength).toBeNull();
|
|
expect(byBar('B8').legLength).toBeNull();
|
|
});
|
|
|
|
it('B6 (13646) needs a splice, B1 (under 12000) does not', () => {
|
|
expect(byBar('B6').splice).toBe(true);
|
|
expect(byBar('B1').splice).toBe(false);
|
|
});
|
|
|
|
it('B10 corner shows the depths, the 296 hook, and the lowest level removed', () => {
|
|
const svg = footingCornerSvg(m);
|
|
expect(svg).toContain('B10-2 122.25');
|
|
expect(svg).toContain('B10-1 123.85');
|
|
expect(svg).toContain('l_h 296');
|
|
expect(svg).toContain('단 수 8');
|
|
});
|
|
});
|