- Drawing check (spec §6.3): an integrated 2500 × 1200 block gives 18@125 = 2250
along (ends 50 + 75) and 7@125 = 875 across (ends 162.5).
- C3 coping rebar, from RAG/코핑철근.md (2026-10-22 final):
- C10: 9 bars @300 at 4800–7200 (k_max 4, beyond the Level edge).
- C9 / C11: 18 bars each @250 outward, ends at 300 and 11700 (end gap 300).
- Refuses a coping too short for C9 (RB-K01).
- Side bars C12 5 rows / C13 2 rows at the 42.538 break; C14 38 bars;
C15 11 bars, C16 22 bars.
- spec §6.4 is older than 코핑철근.md (C10/C9/C11 layout, C12 row count, C14
dimensions). This follows the final document; spec §6.4 needs an update.
- Not yet: C1–C8 main bars (shape and lengths), the C12/C13 bar lengths and
shapes, the drawing check of the coping sheet, and the ③ screen.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { c14Total, COPING_END_GAP, sideRows, shearBars, STEP_BAR_COUNTS } from '../src/core/rebar/coping';
|
||
|
||
// P1 coping: L 12000, one column at the centre (T형).
|
||
const L = 12000;
|
||
|
||
describe('코핑 철근 (코핑철근.md, plan C3)', () => {
|
||
it('end gap is cover + e_add = 300', () => {
|
||
expect(COPING_END_GAP).toBe(300);
|
||
});
|
||
|
||
it('C10: 9 bars @300 from 4800 to 7200 (k_max 4, beyond the Level edge at 4950 / 7050)', () => {
|
||
const { c10 } = shearBars(L);
|
||
expect(c10).toHaveLength(9);
|
||
expect(c10[0]).toBe(4800);
|
||
expect(c10[c10.length - 1]).toBe(7200);
|
||
expect(c10[1] - c10[0]).toBe(300);
|
||
});
|
||
|
||
it('C9 and C11: 18 bars each @250 outward, first at 4550 / 7450, last at 300 / 11700', () => {
|
||
const b = shearBars(L);
|
||
expect(b.c9).toHaveLength(18);
|
||
expect(b.c11).toHaveLength(18);
|
||
expect(b.c9[b.c9.length - 1]).toBe(4550);
|
||
expect(b.c9[0]).toBe(300);
|
||
expect(b.c11[0]).toBe(7450);
|
||
expect(b.c11[b.c11.length - 1]).toBe(11700);
|
||
expect(b.endGap).toBe(300);
|
||
});
|
||
|
||
it('total shear bars per face: 9 + 18 + 18 = 45 positions', () => {
|
||
const b = shearBars(L);
|
||
expect(b.c10.length + b.c9.length + b.c11.length).toBe(45);
|
||
});
|
||
|
||
it('a coping too short for C9 is refused (RB-K01)', () => {
|
||
expect(() => shearBars(2200)).toThrow('RB-K01');
|
||
});
|
||
|
||
it('C12 has 5 rows below the break at 42.538, C13 has 2 rows at and above it', () => {
|
||
const r = sideRows(41.288, 42.538);
|
||
expect(r.c12).toEqual([41.288, 41.538, 41.788, 42.038, 42.288]);
|
||
expect(r.c13).toEqual([42.538, 42.788]);
|
||
});
|
||
|
||
it('C14: 38 bars = 2 × 11 upper + 5 + 6 + 3 + 2 lower', () => {
|
||
expect(c14Total()).toBe(38);
|
||
});
|
||
|
||
it('C15 11 bars, C16 22 bars', () => {
|
||
expect(STEP_BAR_COUNTS).toEqual({ C15: 11, C16: 22 });
|
||
});
|
||
});
|