Files
Pier_v1/tests/rebar-coping-main.test.ts
T
ypshimandClaude Haiku 5.5 a403ab9641 feat(core): coping main bars C1–C8 (plan C3) and column rebar C4
- Nominal bar diameters (H29 28.6, S32 31.8, …) as used by the documents. With
  them, C7/C8 l_s = 1.3·l_d(28.6, fck 27) = 1717.6, which is the document's 1717.
- C1–C8 (코핑철근.md §5): width layout 127 · 110.5 · 21@125 · 110.5 · 127 with 24
  bars (12 + 12); heights 43.284 / 43.227 / 43.170; top bar lengths 12744 /
  12629.6 / 12515.2; bottom pieces ≈ 7448.
- C4 (기둥철근.md): P1 r 875 and P2 r 843.2; couplers P1 +3/6/9/12 m, P2 +150;
  230 + 230 main pieces and 368 couplers; tie radius 900.45; P3 38 at @300 from
  2.340; P5 19 at @120; P4 8 at @120 from −0.060; P6 8 levels × 4 = 32, length
  ≈ 2071.
- Not yet: C4 interference checks (P4 vs B11, Q-C9), bar lengths of P3/P5/P4
  and coupler shapes, the coping/column drawing checks, and the ③ screen.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-22 11:28:03 +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.227 / 43.170 for the three top rows', () => {
expect(topRowEl(43.284, 1)).toBe(43.284);
expect(topRowEl(43.284, 2)).toBe(43.227);
expect(topRowEl(43.284, 3)).toBe(43.17);
});
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);
});
});