받침방위각_솔플레이트검토.md §3과 시안(Version 110–113)을 따른다 (사용자 결정 2026-11-06: 시안 적용). 11-03 C안(받침높이 H 고정, h3 = H − T, S 입력)을 대체한다. - S: 교량 전체(A1, P1 … Pn, A2) 거더 짝 받침의 z 차 / 수평거리. 없으면 교각 종단경사 입력 → 다른 열 같은 순번 값(가정, WS03) → 0 %(WS03). 받침별 직접 수정(수정됨) - 평면 L = A + 100, W = B + 100 (받침별 A × B, 기본 700 × 640 가정), h3 181 - T = 열마다 max(22, ⌈22 + L·|S|/2⌉), 열 T 직접 수정 가능(T2 < T_min → WS02). T1은 오르막 쪽(3D 쐐기의 두꺼운 끝도 그쪽), T2 반대쪽 - 거더 하면 고정: 블럭 상면 = z − (T − T_ref), T_ref 30 - 짝 받침은 불러오기·프로젝트 열기 때 교량 전체로 계산해 교각 생성에 넘김 - ② 카드: h3·T_ref·T_min·여유·열 T·종단경사 입력, 표에 짝 받침·S 근거·받침별 S/A/B 수정·검산 W08·검사 - P1 검증(A1과 함께): S −1.908 … −1.902 %, L 800 · W 740 · T 30 · T1 38 · T2 22, 블럭 높이 변화 없음 - 블럭·솔플레이트 테스트는 A1–P1 짝 문맥으로 실행 (짝이 없으면 S 0 · T 22 · 블럭 +8 mm) 교대(QA-15 C안)와 Pier 시트 종단경사 열 읽기는 아직 남음. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
2.5 KiB
TypeScript
59 lines
2.5 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
||
import { buildPier } from '../src/core/geometry';
|
||
import { validatePier } from '../src/core/validate';
|
||
import type { Issue, PierInput } from '../src/core/types';
|
||
import { loadP1, p1Pairs } from './helpers';
|
||
|
||
// Bridge context (A1 ↔ P1 girder pairs) as in the app, so the solplate slope is computed (2026-11-06).
|
||
const P1CTX = { pairs: p1Pairs() };
|
||
|
||
// 교좌면 EL of the P1 sheet (받침 1–10), 2026-11-03.
|
||
const SEAT = [43.411, 43.483, 43.555, 43.626, 43.698, 43.411, 43.483, 43.555, 43.626, 43.698];
|
||
|
||
function withSeat(input: PierInput, seats: number[]): PierInput {
|
||
return { ...input, bearings: input.bearings.map((b) => ({ ...b, seatEl: seats[b.no - 1] })) };
|
||
}
|
||
|
||
describe('교좌면 EL 입력 (2026-11-03)', () => {
|
||
it('the P1 교좌면 EL values reproduce the 두부보 상면 slope: the model does not change', () => {
|
||
const base = buildPier(loadP1(), P1CTX);
|
||
const seated = buildPier(withSeat(loadP1(), SEAT), P1CTX);
|
||
for (const b of base.blocks) {
|
||
const s = seated.blocks.find((x) => x.no === b.no)!;
|
||
expect(s.bottom).toBeCloseTo(b.bottom, 6);
|
||
expect(s.top).toBeCloseTo(b.top, 6);
|
||
}
|
||
});
|
||
|
||
it('an input 교좌면 EL sets the block bottom and so h1 = (EL.X − 50 mm) − 교좌면 EL', () => {
|
||
const m = buildPier(withSeat(loadP1(), [43.4, ...SEAT.slice(1)]), P1CTX);
|
||
const b1 = m.blocks.find((x) => x.no === 1)!;
|
||
expect(b1.bottom).toBeCloseTo(43.4, 6);
|
||
expect((b1.top - b1.bottom) * 1000).toBeCloseTo(111, 6);
|
||
});
|
||
|
||
it('without 교좌면 EL the seatCalc is the slope value (the check reference)', () => {
|
||
const m = buildPier(loadP1(), P1CTX);
|
||
expect(m.blocks.every((b) => Math.abs(b.seatCalc - b.bottom) < 1e-9)).toBe(true);
|
||
});
|
||
|
||
it('warns (W10) when the input 교좌면 EL differs from the slope by more than 5 mm, and keeps the input', () => {
|
||
const input = withSeat(loadP1(), [43.5, ...SEAT.slice(1)]);
|
||
const m = buildPier(input, P1CTX);
|
||
const issues: Issue[] = [];
|
||
validatePier(input, m, issues);
|
||
const w = issues.filter((i) => i.code === 'W10');
|
||
expect(w.length).toBe(1);
|
||
expect(w[0].message).toContain('1번');
|
||
expect(m.blocks.find((x) => x.no === 1)!.bottom).toBeCloseTo(43.5, 6);
|
||
});
|
||
|
||
it('no W10 for the P1 values', () => {
|
||
const input = withSeat(loadP1(), SEAT);
|
||
const m = buildPier(input, P1CTX);
|
||
const issues: Issue[] = [];
|
||
validatePier(input, m, issues);
|
||
expect(issues.filter((i) => i.code === 'W10')).toEqual([]);
|
||
});
|
||
});
|