feat(abut): 교대 형상·입력 패널과 교각 받침·솔플레이트 개편
- 교대 형상(src/core/abut, 3D 장면, 목록·카메라·맞춤)과 교대 입력 패널 추가 - 교각 받침 기준 카드 제거, 솔플레이트 규칙을 교각별 입력으로 변경 - 받침 ELEVATION·솔플레이트 TABLE을 모델값으로 연결 - 교대 입력값 카드: 형식 행에 시점·종점 표시, 제목을 "A1 입력값 [입력]"으로 변경 - 테스트 614건 통과, 타입 검사 통과 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b1b2ad1ddb
commit
1d31d2f3a9
44 files changed
+2571
-120
No files matched your search
@@ -0,0 +1,55 @@
|
||||
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 } from './helpers';
|
||||
|
||||
// 교좌면 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());
|
||||
const seated = buildPier(withSeat(loadP1(), SEAT));
|
||||
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)]));
|
||||
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());
|
||||
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);
|
||||
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);
|
||||
const issues: Issue[] = [];
|
||||
validatePier(input, m, issues);
|
||||
expect(issues.filter((i) => i.code === 'W10')).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user