- 현장타설 기둥·말뚝 형상(cast-in-place-shape)과 주철근·횡철근·커플러 계산(rebar/cast-in-place, cast-layout) - 다주형 코핑 철근(multicol-coping), 기둥 높이 · 양단부 연장 - 철근표 요약 · 재료 수량 · 3D 뷰 연결과 삽도(cast-rebar-svg) - 검사 기준 갱신과 회귀 테스트, 검증 스크립트 보관 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
46 lines
2.0 KiB
TypeScript
46 lines
2.0 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { buildPier } from '../src/core/geometry';
|
||
import { shearBarsMulti } from '../src/core/rebar/coping';
|
||
import { rebarSummary } from '../src/core/rebar/summary';
|
||
import { loadP1 } from './helpers';
|
||
|
||
// 2주형 and 3주형 on the P1 sheet with a 12 m coping (columns at L/5, 4L/5 and L/5, L/2, 4L/5).
|
||
const two = buildPier({ ...loadP1(), type: '2주형', columnCount: 2, copingLengthMm: 12000 });
|
||
const three = buildPier({ ...loadP1(), type: '3주형', columnCount: 3, copingLengthMm: 12000 });
|
||
const count = (rows: ReturnType<typeof rebarSummary>['rows'], name: string) => rows.find((r) => r.name === name)!.count;
|
||
|
||
describe('다주형 철근 (2주형·3주형, 코핑철근.md §9)', () => {
|
||
it('2주형: H22 @300, six physical pieces per position', () => {
|
||
const rows = rebarSummary(two).rows;
|
||
expect(count(rows, 'C10')).toBe(18 * 6);
|
||
expect(count(rows, 'C9')).toBe(3 * 6);
|
||
expect(count(rows, 'C11')).toBe(3 * 6);
|
||
expect(count(rows, 'C9·C11 사이')).toBe(15 * 6);
|
||
});
|
||
|
||
it('3주형: C10 27 positions and two gaps of three, each with six physical pieces', () => {
|
||
const rows = rebarSummary(three).rows;
|
||
expect(count(rows, 'C10')).toBe(27 * 6);
|
||
expect(count(rows, 'C9·C11 사이')).toBe(6 * 6);
|
||
});
|
||
|
||
it('column bars repeat per column: P1 230 × 2 and 230 × 3', () => {
|
||
expect(count(rebarSummary(two).rows, 'P1')).toBe(460);
|
||
expect(count(rebarSummary(three).rows, 'P1')).toBe(690);
|
||
});
|
||
|
||
it('a multi-column pier gets the RB-M01 note about C14', () => {
|
||
expect(rebarSummary(two).warnings.map((w) => w.code)).toContain('RB-M01');
|
||
});
|
||
|
||
it('the single column (T형) has no between row and no RB-M01', () => {
|
||
const t = rebarSummary(buildPier(loadP1()));
|
||
expect(t.rows.find((r) => r.name === 'C9·C11 사이')).toBeUndefined();
|
||
expect(t.warnings.map((w) => w.code)).not.toContain('RB-M01');
|
||
});
|
||
|
||
it('shear bars for a columns too close to share a Level are refused', () => {
|
||
expect(() => shearBarsMulti(12000, [3000, 3500])).toThrow('겹칩니다');
|
||
});
|
||
});
|