- 재료표(B5–B8 9150 = 9350 − 2c, B1–B4 7600 = 7800 − 2c)와 같은 방향 배정으로 맞춤 - 격자 키를 물리 방향으로 정리: sL = L 방향 간격, sW = W 방향 간격 (기존 sAxis → sL, sPerp → sW) - B1–B4: L 격자로 개수, 길이 W − 2c. B5–B8: W 격자로 개수, 길이 L − 2c - B9: 열(L)은 sL, 행(W)은 sW 격자 (물리 격자 일치), 개수 불변 - B11은 L 방향 간격(sL), B12는 W 방향 간격(sW) - 3D 확대기초 철근과 단면 그림의 역할을 교환 (B1–B4 선, B5–B8 점) - 철근표 간격과 규칙 값, 설정 라벨을 방향 기준으로 수정 - 테스트 기대값 갱신 (B1–B4 40, B5–B8 31, B6 13646 분할 경고) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
31 lines
1.5 KiB
TypeScript
31 lines
1.5 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { buildPier } from '../src/core/geometry';
|
||
import { buildRebar3D } from '../src/view/rebar3d';
|
||
import { rebarSummary } from '../src/core/rebar/summary';
|
||
import { loadP1 } from './helpers';
|
||
|
||
const footingRows = (input: Parameters<typeof buildPier>[0]) =>
|
||
rebarSummary(buildPier(input)).rows.filter((r) => r.member === 'footing');
|
||
const count = (rows: ReturnType<typeof footingRows>, name: string) => rows.find((r) => r.name === name)!.count;
|
||
|
||
describe('확대기초 철근은 입력 치수를 따른다 (3단계, 승인 2026-10-23)', () => {
|
||
it('P1 footing rebar is unchanged with the default inputs (B1 40, B5 31, B9 306; 방향 교환 후)', () => {
|
||
const rows = footingRows(loadP1());
|
||
expect(count(rows, 'B1')).toBe(40);
|
||
expect(count(rows, 'B5')).toBe(31);
|
||
expect(count(rows, 'B9')).toBe(306);
|
||
});
|
||
|
||
it('a wider footing (W 9000) and a longer one (L 11000) add bars to B1–B4 and B5–B8', () => {
|
||
const rows = footingRows({ ...loadP1(), footingWidthMm: 9000, footingLengthMm: 11000 });
|
||
expect(count(rows, 'B1')).toBeGreaterThan(40);
|
||
expect(count(rows, 'B5')).toBeGreaterThan(31);
|
||
});
|
||
|
||
it('a different footing height (2200) is computed without error, and the 3D rebar still builds', () => {
|
||
const m = buildPier({ ...loadP1(), footingHeightMm: 2200 });
|
||
expect(rebarSummary(m).rows.length).toBeGreaterThan(0);
|
||
expect(buildRebar3D(m).byName.get('B1')!.length).toBeGreaterThan(0);
|
||
});
|
||
});
|