Files
Pier_v1/tests/abut-summary.test.ts
ypshimandClaude Opus 5.5 bff1502ecf fix(abut): 수축줄눈을 받침 사이 중간에 · 기본 개수 ceil(L/10) − 1 · 3D 선 표시
spec_abut §3 · §4.9 (QA-7 가정)와 맞지 않던 세 가지를 고친다.
- 위치: 등분점(1개면 L/2)이 아니라 가장 가까운 '받침 사이 중간'(= 교좌면 계단 경계). 이전에는 운곡교 교대
  5기 모두 줄눈이 가운데 받침 ③ 블럭을 지났다 (A1: 줄눈 6.099 · 받침 6.037). 이제 A1은 IP3에서 4.905 m
- 개수: 입력이 없으면 ceil(L/10) − 1 (길이에 따라 자동, 이전에는 1 고정). 입력 칸은 비우면 자동
- 3D: 벽체 전면 · 흉벽 전면 · 벽체 배면 · 흉벽 배면에 선으로 표시(저판은 연속이라 없음), '벽체·흉벽' 토글을 따름
- 공통 계산 core/abut/joints.ts를 ② 정면·배면 삽도, 교대 상세 요약, 입력 칸 안내, 3D가 함께 씀
- 테스트: 개수 규칙, A1 위치 = ②·③ 중간 = 계단 경계, 여러 개 · 받침 부족 시 등분, 3D 선 4면

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 16:23:04 +09:00

34 lines
2.0 KiB
TypeScript
Raw Permalink 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 { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import * as XLSX from 'xlsx';
import { describe, expect, it } from 'vitest';
import { abutSummaryRows } from '../src/core/abut/summary';
import { parseAbutments } from '../src/core/abut/parse';
const RAG = fileURLToPath(new URL('../../../RAG/운곡교P1입력.xlsx', import.meta.url));
const rec = parseAbutments(XLSX.read(readFileSync(RAG), { type: 'buffer' })).abutments[0];
const rows = new Map(abutSummaryRows(rec));
describe('교대 상세 (삽도 항목, spec_abut §10.1)', () => {
it('the 삽도 values of A1: 저판 상면 41.995, 벽체 2.372 m, 브라켓 상면 46.843, 흉벽 상단 48.006 (IP1 끝) / 47.661 (IP3 끝)', () => {
expect(rows.get('저판 상면 EL')).toBe('41.995 m');
expect(rows.get('벽체 높이 (구간 ①)')).toBe('2.372 m');
expect(rows.get('브라켓 상면 EL (구간 ①)')).toBe('46.843 m');
expect(rows.get('흉벽 상단 EL (IP1 끝 / IP3 끝)')).toBe('48.006 / 47.661 m');
});
it('the piles, joints, 접속슬래브 width and 받침블럭 height match the spec: 18 piles, tip 19.295, 1 joint, 11253 mm, 125 mm', () => {
expect(rows.get('말뚝 (열 × 본수)')).toBe('3 × 6 = 18 본');
expect(rows.get('말뚝 선단 EL')).toBe('19.295 m');
// 1 joint (ceil(12.197/10) − 1), moved from L/2 (on bearing ③) to the middle between ② and ③ (2026-11-06).
expect(rows.get('수축줄눈 (기본 ceil(L/10) − 1, 받침 사이 중간)')).toMatch(/^1 개 · IP3에서 4\.90[45] m$/);
// 11.2535 m exactly (450 / sin Δ + 20 per wing); rounding to mm gives 11253 or 11254.
expect(Math.abs(parseInt(String(rows.get('접속슬래브 폭')), 10) - 11253)).toBeLessThanOrEqual(1);
expect(rows.get('받침블럭 높이 (패드 포함)')).toBe('125 mm');
});
it('the 계단 경계 from IP3 are 2.395 · 4.905 · 7.415 · 9.924 m', () => {
expect(rows.get('계단 경계 (IP3 쪽에서)')).toBe('2.395 / 4.905 / 7.415 / 9.924 m');
});
});