Files
Pier_v1/tests/rebar-coping-main.test.ts
T
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

46 lines
1.9 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 { developmentLength, hookLength, NOMINAL_DIAMETER, spliceLength } from '../src/core/rebar/common';
import { bottomPiece, topBarLength, topRowEl, widthLayout } from '../src/core/rebar/coping-main';
describe('C1–C8 상·하면 주철근 (코핑철근.md §5, plan C3)', () => {
it('nominal diameters: H29 28.6, S32 31.8 (documents use these, not the round numbers)', () => {
expect(NOMINAL_DIAMETER.H29).toBe(28.6);
expect(NOMINAL_DIAMETER.S32).toBe(31.8);
});
it('width layout for B 3100: edge 127, ends 110.5, 21@125, 24 bars (12 + 12)', () => {
const w = widthLayout(3100);
expect(w.yE).toBe(127);
expect(w.S).toBe(2846);
expect(w.n).toBe(21);
expect(w.g).toBe(110.5);
expect(w.count).toBe(24);
expect(w.cyclePerKind).toBe(12);
expect(w.text).toBe('127 · 110.5 · 21@125 · 110.5 · 127');
});
it('heights: 43.284 / 43.184 / 43.084 for the three top rows (상면 단 간격 100)', () => {
expect(topRowEl(43.284, 1)).toBe(43.284);
expect(topRowEl(43.284, 2)).toBe(43.184);
expect(topRowEl(43.284, 3)).toBe(43.084);
});
it('top bar lengths 12744 / 12629.6 / 12515.2 (path + 2 × 472 hook)', () => {
expect(topBarLength(12000, 1)).toBeCloseTo(12744, 0);
expect(topBarLength(12000, 2)).toBeCloseTo(12629.6, 0);
expect(topBarLength(12000, 3)).toBeCloseTo(12515.2, 0);
});
it('bottom piece ≈ 7448 with l_s = 1717.6 (1.3 × l_d of H29 at fck 27) — the document shows 1717', () => {
const b = bottomPiece();
expect(b.path).toBeCloseTo(12235.6, 6);
expect(b.ls).toBeCloseTo(1717.6, 0);
expect(b.piece).toBeCloseTo(7448, 0);
});
it('hook 472 (16.5 × 28.6) and splice from the same formula as C1', () => {
expect(hookLength('main90', NOMINAL_DIAMETER.H29)).toBeCloseTo(472, 0);
expect(spliceLength(NOMINAL_DIAMETER.H29, 400, 27)).toBeCloseTo(1.3 * developmentLength(NOMINAL_DIAMETER.H29, 400, 27), 9);
});
});