spec §3·§4.4(2026-11-06 개정)와 3주형형상배근.md §2.2(2주형 DWG 실측)를 따른다. - 기둥 사이 하면: Level 끝에서 헌치 수평 1500 동안 500 올라가 평탄, 다음 기둥 앞에서 내려옴 (이전 Level + 300, 헌치 300 × 300 대체) - 다주형 Level 폭 기본값 = D + 200 (입력값이 있으면 입력 우선). T형은 2100 유지 - 오목 평탄부가 없으면 RB-M01 오류 - 3주형 테스트는 오목형이 성립하는 20 m 코핑으로 바꿈 (P1 길이 12 m는 RB-M01) - 2주형 DWG 치수(L 24200, D 3000) 하면 꺾임점 테스트 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
2.3 KiB
TypeScript
48 lines
2.3 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주형 on the P1 sheet with a 12 m coping (columns at L/5, 4L/5). 3주형 needs 20 m (columns 4 / 10 / 16): with 12 m the
|
||
// columns are 3600 apart and leave no flat 오목 part between the 1500 haunches (RB-M01).
|
||
const two = buildPier({ ...loadP1(), type: '2주형', columnCount: 2, copingLengthMm: 12000 });
|
||
const three = buildPier({ ...loadP1(), type: '3주형', columnCount: 3, copingLengthMm: 20000 });
|
||
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 eleven, each with six physical pieces', () => {
|
||
const rows = rebarSummary(three).rows;
|
||
// Per column 9 positions (±4 @300); between groups 8.8 − 5.2 = 3.6 m → floor(3600 / 300) = 12 bays → 11 positions.
|
||
expect(count(rows, 'C10')).toBe(27 * 6);
|
||
expect(count(rows, 'C9·C11 사이')).toBe(22 * 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('겹칩니다');
|
||
});
|
||
});
|