- B9 (확대기초철근 (1).md §9): H16 with the 135° stirrup hook, on the odd grid (i_W = 1, 5, …), 16 rows, 20 per row (even rows start at i_L 1, odd at 3), 320 bars, length l_v 1750 + 2 × 189 ≈ 2128. - The rebar summary now lists B9; the alert about B9 is gone. Positions and hooks are the document's proposed rules (Q-B18, Q-B19), noted on the row. - Tests: the document's B9 values; P1 summary has 320 and only the splice alert. - Not verified in a browser. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { buildPier } from '../src/core/geometry';
|
||
import { rebarSummary } from '../src/core/rebar/summary';
|
||
import { loadP1 } from './helpers';
|
||
|
||
const { rows, warnings } = rebarSummary(buildPier(loadP1()));
|
||
const count = (name: string) => rows.find((r) => r.name === name)!.count;
|
||
|
||
describe('③ 철근표 요약 (P1)', () => {
|
||
it('bearing blocks: S1 and S2 80 bars each', () => {
|
||
expect(count('S1')).toBe(80);
|
||
expect(count('S2')).toBe(80);
|
||
});
|
||
|
||
it('coping: C1–C8 12 each, C9 18, C10 9, C11 18, C12 5 rows, C13 2 rows, C14 38, C15 11, C16 22', () => {
|
||
for (const n of ['C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8']) expect(count(n)).toBe(12);
|
||
expect(count('C9')).toBe(18);
|
||
expect(count('C10')).toBe(9);
|
||
expect(count('C11')).toBe(18);
|
||
expect(count('C12')).toBe(5);
|
||
expect(count('C13')).toBe(2);
|
||
expect(count('C14')).toBe(38);
|
||
expect(count('C15')).toBe(11);
|
||
expect(count('C16')).toBe(22);
|
||
});
|
||
|
||
it('column: P1 230, P2 230, couplers 368, P3 38, P5 19, P4 8, P6 32', () => {
|
||
expect(count('P1')).toBe(230);
|
||
expect(count('P2')).toBe(230);
|
||
expect(count('커플러')).toBe(368);
|
||
expect(count('P3')).toBe(38);
|
||
expect(count('P5')).toBe(19);
|
||
expect(count('P4')).toBe(8);
|
||
expect(count('P6')).toBe(32);
|
||
});
|
||
|
||
it('footing: B1–B4 31 each, B5–B8 40 each, B10-1 18, B10-2 18, B11 60, B12 47', () => {
|
||
for (const n of ['B1', 'B2', 'B3', 'B4']) expect(count(n)).toBe(31);
|
||
for (const n of ['B5', 'B6', 'B7', 'B8']) expect(count(n)).toBe(40);
|
||
expect(count('B10-1')).toBe(18);
|
||
expect(count('B10-2')).toBe(18);
|
||
expect(count('B11')).toBe(60);
|
||
expect(count('B12')).toBe(47);
|
||
});
|
||
|
||
it('B9: 320 bars; warnings: B2 needs a splice (13646 > 12000)', () => {
|
||
expect(count('B9')).toBe(320);
|
||
expect(warnings.map((w) => w.code)).toEqual(['RB-F08']);
|
||
expect(rows.find((r) => r.name === 'B2')!.length!).toBeGreaterThan(12000);
|
||
});
|
||
});
|