- 단마다 양끝이 안으로 들어가는 양을 2d에서 d로 변경 - 상면 단 길이 12744 / 12686.8 / 12629.6 (기존 12744 / 12629.6 / 12515.2) - 3D 상면 주철근의 굽힘 시작점도 같은 값을 쓴다 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
46 lines
2.0 KiB
TypeScript
46 lines
2.0 KiB
TypeScript
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 / 12686.8 / 12629.6 (path + 2 × 472 hook, 가로 단 간격 d = 28.6)', () => {
|
||
expect(topBarLength(12000, 1)).toBeCloseTo(12744, 0);
|
||
expect(topBarLength(12000, 2)).toBeCloseTo(12686.8, 1);
|
||
expect(topBarLength(12000, 3)).toBeCloseTo(12629.6, 1);
|
||
});
|
||
|
||
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);
|
||
});
|
||
});
|