- 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>
64 lines
2.1 KiB
TypeScript
64 lines
2.1 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { columnRebar } from '../src/core/rebar/column';
|
||
|
||
const c = columnRebar();
|
||
|
||
describe('기둥 철근 C4 (기둥철근.md, plan C4)', () => {
|
||
it('P1 radius 875, P2 radius 843.2 (touching; centre gap = d_P1)', () => {
|
||
expect(c.r1).toBe(875);
|
||
expect(c.r2).toBe(843.2);
|
||
expect(c.angleStepDeg).toBeCloseTo(360 / 46, 9);
|
||
});
|
||
|
||
it('heights: P1 top 15147, P2 top ≈ 14539 (l_d of S32 at fck 27, 1836.9 ≈ the document 1836)', () => {
|
||
expect(c.zTop1).toBe(15147);
|
||
expect(Math.abs(c.zTop2 - 14539)).toBeLessThan(1);
|
||
});
|
||
|
||
it('couplers P1 at +3 / 6 / 9 / 12 m, P2 at +150 above each', () => {
|
||
expect(c.couplerP1).toEqual([3000, 6000, 9000, 12000]);
|
||
expect(c.couplerP2).toEqual([3150, 6150, 9150, 12150]);
|
||
});
|
||
|
||
it('main bar pieces 230 + 230, couplers 4 × 46 × 2 = 368', () => {
|
||
expect(c.mainP1).toBe(230);
|
||
expect(c.mainP2).toBe(230);
|
||
expect(c.couplers).toBe(368);
|
||
});
|
||
|
||
it('tie radius 900.45, circumference ≈ 5657.7', () => {
|
||
expect(c.tieRadius).toBe(900.45);
|
||
expect(c.tieCircumference).toBeCloseTo(5657.7, 1);
|
||
});
|
||
|
||
it('P3: l_e = 2340, 38 ties from 2.340 at @300 (top 13.440)', () => {
|
||
expect(c.zTopT).toBe(13724);
|
||
expect(c.lE).toBe(2340);
|
||
expect(c.p3Count).toBe(38);
|
||
expect(c.p3[0]).toBe(2340);
|
||
expect(c.p3[c.p3.length - 1]).toBe(13440);
|
||
});
|
||
|
||
it('P5: 19 ties @120 from 2.220 down to 0.060', () => {
|
||
expect(c.p5Count).toBe(19);
|
||
expect(c.p5[0]).toBe(2220);
|
||
expect(c.p5[c.p5.length - 1]).toBe(60);
|
||
});
|
||
|
||
it('P4: 8 ties @120 from −0.060 to −0.900 (none removed in the example)', () => {
|
||
expect(c.p4Count).toBe(8);
|
||
expect(c.p4[0]).toBe(-60);
|
||
expect(c.p4[c.p4.length - 1]).toBe(-900);
|
||
});
|
||
|
||
it('P4 semicircle ≈ 2828.9', () => {
|
||
expect(c.p4SemicircleLength).toBeCloseTo(2828.9, 0);
|
||
});
|
||
|
||
it('P6: 8 levels from −0.060 to 12.540, 4 bars each = 32, length ≈ 2071', () => {
|
||
expect(c.p6Levels).toEqual([-60, 1740, 3540, 5340, 7140, 8940, 10740, 12540]);
|
||
expect(c.p6Count).toBe(32);
|
||
expect(c.p6Length).toBeCloseTo(2071, 0);
|
||
});
|
||
});
|