feat(core): B9 shear bars of the footing (plan C5)

- 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>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-22 11:34:56 +09:00
1 parent 3af8729e9f
commit 73bff19aba
4 files changed
+35 -6

No files matched your search

+9 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
import { assemblyBars, bottomBars, crossBars, grid, layers, legB2, sideBars } from '../src/core/rebar/footing';
import { assemblyBars, bottomBars, crossBars, grid, layers, legB2, shearB9, sideBars } from '../src/core/rebar/footing';
// P1 footing: L 10400 × W 8150 × H 2000.
const L = 10400;
@@ -67,4 +67,12 @@ describe('확대기초 철근 (확대기초철근 (1).md, plan C5)', () => {
expect(b12.count).toBe(47);
expect(b12.length).toBeCloseTo(10613, 0);
});
it('B9 shear: 16 rows, 20 per row, 320 in all, length ≈ 2128 (l_v 1750 + 2 × 189)', () => {
const b9 = shearB9(L, W, H);
expect(b9.rows).toBe(16);
expect(b9.perRow.every((c) => c === 20)).toBe(true);
expect(b9.count).toBe(320);
expect(b9.length).toBeCloseTo(2128, 0);
});
});
+3 -2
View File
@@ -43,8 +43,9 @@ describe('③ 철근표 요약 (P1)', () => {
expect(count('B12')).toBe(47);
});
it('warnings: B2 needs a splice (13646 > 12000), and B9 is not computed yet', () => {
expect(warnings.map((w) => w.code)).toEqual(expect.arrayContaining(['RB-F08', 'RB-F09']));
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);
});
});