Files
Pier_v1/tests/abut-bearing-svg.test.ts
T
ypshimandClaude Opus 5.5 4b02dde153 feat(plan): ② 교대 카드를 3D 창 아래로 옮기고 교량받침 삽도 3개 추가
- 교대 카드를 왼쪽 목록 아래에서 가운데 3D 창 아래(교각 부재 카드 자리)로 옮김. 부재 · 교대 목록에서 고른 부재의 내용을 보여 주고, 머리줄에 부재 이름과 요약을 표시
- 왼쪽 편집 영역 정리: ②의 편집 버튼과 접히는 편집 영역을 없앰. 왼쪽에는 구조물 목록과 부재 · 교대 목록만 남김
- 교량받침 카드: 블럭 배치(분리 고정, 일체 비활성), 상세 보기(받침 ①–⑤), 삽도 3개(평면 · 단면 · 솔플레이트 상세, src/view/abut-bearing-svg.ts), ELEVATION TABLE, 솔플레이트 TABLE, 공통 · 규칙 입력, 검사 줄
- 삽도 테스트 3건 추가. 전체 650건 통과, 타입 검사·빌드 통과. 브라우저 시각 확인은 미실시

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:28:29 +09:00

30 lines
1.4 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 { abutBearingPlanSvg, abutBearingSectionSvg, abutSolplateSvg, type AbutBearingDetail } from '../src/view/abut-bearing-svg';
// 운곡교 A1 받침 ① (교대 받침 표의 값: 블럭 125 = 75 + 50, h3 181, T 30, L 800, T1 38 / T2 22, 회전 −4.42°).
const d: AbutBearingDetail = {
no: 1, blockMm: 1200, padMm: 1000, A: 700, B: 640, L: 800, W: 740,
h1: 75, h2: 50, h3: 181, h4: 30, T1: 38, T2: 22, rotDeg: -4.42, S: -1.91, seatEl: 44.367, z: 44.492,
};
describe('교대 받침 삽도 (시안 ② 교량받침 카드)', () => {
it('평면: block, pad, solplate and bearing sizes, turned by the bearing azimuth', () => {
const svg = abutBearingPlanSvg(d);
expect(svg).toContain('700 × 640');
expect(svg).toContain('솔플 800 × 740 · 패드 1000');
expect(svg).toContain('rotate(4.420 150 130)');
expect(svg.match(/<rect /g)).toHaveLength(4);
});
it('단면: the four layers and E = h1 + h2 + h3 + h4 = 336', () => {
const svg = abutBearingSectionSvg(d);
for (const s of ['h1 75', 'h2 50', 'h3 181', 'h4 30', 'E = 336', '교좌면 44.367', 'z 44.492']) expect(svg).toContain(s);
expect(svg.match(/<rect /g)).toHaveLength(4);
});
it('솔플레이트: L, W, T1 → T2 and the slope', () => {
const svg = abutSolplateSvg(d);
for (const s of ['T1 38', 'T2 22', 'L 800 · W 740', 'S -1.910 %']) expect(svg).toContain(s);
});
});