feat(rebar): add downward 90° hooks (135 mm) to P6 crossties in 3D rebar model

This commit is contained in:
ypshim committed 2026-10-22 17:45:22 +09:00
1 parent 4aa8dbb3cb
commit a2317caf6c
15 files changed
+740 -133

No files matched your search

+24 -12
View File
@@ -52,32 +52,44 @@ describe('확대기초 철근 (확대기초철근 (1).md, plan C5)', () => {
});
it('B10-1 18 bars ≈ 10748, B10-2 18 bars ≈ 8494', () => {
const [b101, b102] = sideBars(L, W);
const [b101, b102] = sideBars(L, W, H);
expect(b101.count).toBe(18);
expect(b101.length).toBeCloseTo(10748, 0);
expect(b102.count).toBe(18);
expect(b102.length).toBeCloseTo(8494, 0);
});
it('B11 60 bars (20 / 20 / 20) ≈ 8359, B12 47 bars (16 / 15 / 16) ≈ 10613', () => {
const [b11, b12] = assemblyBars(L, W);
expect(b11.count).toBe(60);
// The document rounds the 90° hook to 246 mm; the formula gives 246.45, so B11 is 1.2 mm longer.
expect(Math.abs(b11.length - 8359)).toBeLessThan(1.5);
expect(b12.count).toBe(47);
expect(b12.length).toBeCloseTo(10613, 0);
it('B10 levels from the height: H 2000 → m 8 (9 levels), H 2200 → m 9 (10 levels), as in the document', () => {
expect(b10Levels(2000)).toBe(9);
expect(b10Levels(2200)).toBe(10);
expect(assemblyJs(2000)).toEqual([2, 4, 6]);
expect(assemblyJs(2200)).toEqual([2, 4, 6, 8]);
});
it('B9 shear: 16 rows, 20 per row, 320 in all, length ≈ 2128 (l_v 1750 + 2 × 189)', () => {
const b9 = shearB9(L, W, H);
it('B11 60 bars (20 / 20 / 20) ≈ 8359, B12 47 bars (16 / 15 / 16) ≈ 10613', () => {
const [b11, b12] = assemblyBars(L, W, H);
expect(b11.count).toBe(60);
expect(b11.length).toBeCloseTo(8359, 0);
expect(b12.count).toBe(47);
expect(b12.length).toBeCloseTo(10612.5, 1); // the document prints ≈ 10613
});
it('B9 shear: 16 rows, 20 per row on the grid, 320 in all, length ≈ 2128 (l_v 1750 + 2 × 189)', () => {
const b9 = shearB9(L, W, H, []);
expect(b9.rows).toBe(16);
expect(b9.perRow.every((c) => c === 20)).toBe(true);
expect(b9.count).toBe(320);
expect(b9.length).toBeCloseTo(2128, 0);
});
it('B9 column zone: bars whose centre is within D/2 + d/2 of a column axis are left out (P1: 14 bars)', () => {
const b9 = shearB9(L, W, H, [0], 2000);
expect(b9.count).toBe(306);
for (const b of b9.bars) expect(Math.hypot(b.x, b.n)).toBeGreaterThan(1000 + 7.95);
});
});
import { assemblyHeights, legOffsets } from '../src/core/rebar/footing';
import { assemblyHeights, assemblyJs, b10Levels, legOffsets } from '../src/core/rebar/footing';
describe('확대기초 배근도 재현 (확대기초철근 (1).md §13)', () => {
it('leg offsets: B1 +25.4, B3 +22.25, B5 +28.6, B7 +23.85', () => {
@@ -89,7 +101,7 @@ describe('확대기초 배근도 재현 (확대기초철근 (1).md §13)', () =>
});
it('B11 at 550 / 950 / 1350 and B12 at 569.1 / 969.1 / 1369.1', () => {
const h = assemblyHeights();
const h = assemblyHeights(H);
expect(h.B11).toEqual([550, 950, 1350]);
expect(h.B12.map((z) => Math.round(z * 10) / 10)).toEqual([569.1, 969.1, 1369.1]);
});