Files
Pier_v1/tests/bearing-table.test.ts
T
ypshimandClaude Haiku 5.5 b1b2ad1ddb feat(bearing): 교량받침 ELEVATION TABLE과 솔플레이트 TABLE을 모델값으로 추가
- 모델값만 사용 (도면값 없음). A·B 열은 제거
- ELEVATION: EL.X(엑셀 z), h1 블록, h2 몰탈, h3 받침, h4 솔플(T), E, C1–C6,
  S1·S2 (블록 철근의 본수·길이, 전열 행에 일체 쌍 표시)
- 솔플레이트: S, L, W, T, T1, T2 (소수 한 자리), 검산 T1−T2 ≈ L·|S|/100
- 계산은 core/bearing-table.ts 순수 함수, 테스트 포함

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-11-03 11:22:45 +09:00

58 lines
2.3 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 { buildPier } from '../src/core/geometry';
import { elevationRows, solplateRows } from '../src/core/bearing-table';
import { loadP1 } from './helpers';
const model = buildPier(loadP1());
const integrated = buildPier({ ...loadP1(), bearingLayout: '일체' });
describe('교량받침 ELEVATION TABLE (모델값, 2026-11-03)', () => {
const rows = elevationRows(model);
it('one row per bearing; EL.X is the Excel z (mortar top)', () => {
expect(rows.length).toBe(10);
expect(rows[0].elx).toBeCloseTo(43.561, 3);
expect(rows[5].elx).toBeCloseTo(43.611, 3);
});
it('front block 100 mm, back block 150 mm; mortar 50; bearing 186; solplate 25; E = sum', () => {
expect(rows[0]).toMatchObject({ h1: 100, h2: 50, h3: 186, h4: 25, E: 361 });
expect(rows[5]).toMatchObject({ h1: 150, h2: 50, h3: 186, h4: 25, E: 411 });
});
it('C1 is 600 for a 분리 bearing; C6 is the 1200 block depth; C4 and C5 are 600 each', () => {
expect(rows.every((r) => r.C1 === 600)).toBe(true);
expect(rows.every((r) => r.C6 === 1200)).toBe(true);
expect(rows[0]).toMatchObject({ C4: 600, C5: 600 });
});
it('C2 and C3 sit on the front row only: C2 is the bearing distance along 교축, C3 = C2 + 1200', () => {
expect(rows[0].C2).toBeGreaterThan(1000);
expect(rows[0].C3).toBe(rows[0].C2! + 1200);
expect(rows[5].C2).toBeNull();
expect(rows[5].C3).toBeNull();
});
it('S1 and S2 come from the block rebar: 8 bars of 2500 each on a 분리 block', () => {
expect(rows[0].S1).toEqual({ count: 8, length: 2500 });
expect(rows[0].S2).toEqual({ count: 8, length: 2500 });
});
it('일체: the pair block gives C3 = 2500 on the front row and the bars on the front row only', () => {
const ir = elevationRows(integrated);
expect(ir[0].C3).toBe(2500);
expect(ir[5].S1).toBeNull();
expect(ir[0].S1).not.toBeNull();
});
});
describe('솔플레이트 TABLE (모델값, 2026-11-03)', () => {
it('10 rows with S −0.5, L 1000, W 1100, T 25, T1 27.5, T2 22.5; the check holds', () => {
const rows = solplateRows(model);
expect(rows.length).toBe(10);
expect(rows[0]).toMatchObject({ S: -0.5, L: 1000, W: 1100, T: 25, T1: 27.5, T2: 22.5, ok: true });
expect(rows[0].checkLhs).toBeCloseTo(5, 9);
expect(rows[0].checkRhs).toBeCloseTo(5, 9);
});
});