Files
Pier_v1/tests/column-model.test.ts
ypshimandClaude Haiku 5.5 2acb427bab feat(rebar): 상면 주철근 단 간격(세로) 입력 100 mm, 가로는 2d 고정
- 세로 단 간격은 입력(기본 100, 범위 80–120)으로 상면 C1–C6, C14 상면, 기둥 C3 높이에 쓴다
- 가로 단 간격은 2d(H29, 57.2 mm)로 고정 (코핑철근.md의 s_lay 하나를 둘로 나눔)
- P1 기준 값 갱신: 상면 높이 43.284 / 43.184 / 43.084, C14 상면 43.208 / 43.108, P1 위 끝 zTop1 14776

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-26 15:42:40 +09:00

39 lines
1.7 KiB
TypeScript
Raw Permalink 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 { columnInputFor, columnRebar } from '../src/core/rebar/column';
import { loadP1 } from './helpers';
describe('기둥 철근 높이는 모델에서 (Hc · h_cop, 승인 2026-10-23)', () => {
it('P1: Hc 12703 and h_cop 2644 come out of the model, as in 기둥철근.md', () => {
const input = columnInputFor(buildPier(loadP1()));
expect(input.Hc).toBeCloseTo(12703, 0);
expect(input.hcop).toBeCloseTo(2644, 0);
const col = columnRebar(input);
expect(col.zTop2).toBeCloseTo(14539, 0);
expect(col.zTop1).toBeCloseTo(14776, 0);
});
it('taper h2 = 3000: Level underside 39.411, Hc 11203, P2 top 13039 (= Level underside + l_d)', () => {
const m = buildPier({ ...loadP1(), copingH2Mm: 3000 });
const input = columnInputFor(m);
expect(input.Hc).toBeCloseTo(11203, 0);
// h_cop = step top (43.555) − Level underside (39.411): the coping at the column gets taller with h2.
expect(input.hcop).toBeCloseTo(4144, 0);
const col = columnRebar(input);
expect(col.zTop2).toBeCloseTo(13039, 0);
// The P1 top is anchored to the step top (and C3), so it does not move with h2.
expect(col.zTop1).toBeCloseTo(14776, 0);
});
it('P3 and P6 end at the coping middle level: P1 e_top 1322; taper 3000 gives e_top 2072, P3 37 ties, P6 32 bars', () => {
const p1 = columnInputFor(buildPier(loadP1()));
expect(p1.eTop).toBeCloseTo(1322, 0);
const high = columnInputFor(buildPier({ ...loadP1(), copingH2Mm: 3000 }));
expect(high.eTop).toBeCloseTo(2072, 0);
const col = columnRebar(high);
expect(col.zTopT).toBeCloseTo(13275, 0);
expect(col.p3Count).toBe(37);
expect(col.p6Count).toBe(32);
});
});