Files
Pier_v1/tests/footing-rebar-inputs.test.ts
T
ypshimandClaude Haiku 5.5 99db6a1f52 Revert "feat(rebar): B1–B4와 B5–B8 방향 교환 (B1–B4는 W 방향, B5–B8은 L 방향)"
이 교환은 9,350 방향이 L이라는 가정에서 적용됐으나, 단면 삽도(B5–B8 선, 교각축 직각 단면)와 재료표가 원래 배치(B1–B4 L 방향, B5–B8 W 방향)와 맞는 것으로 확인되어 되돌림.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-27 09:48:05 +09:00

31 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 31, B5 40, B9 306)', () => {
const rows = footingRows(loadP1());
expect(count(rows, 'B1')).toBe(31);
expect(count(rows, 'B5')).toBe(40);
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(31);
expect(count(rows, 'B5')).toBeGreaterThan(40);
});
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);
});
});