Files
Pier_v1/tests/bearing-plan-svg.test.ts
T
ypshimandClaude Haiku 5.5 36b26209df feat(bearing): 솔플레이트 규칙을 교각별 입력으로 바꾸고 도면 불러오기 제거 (C안)
- 받침 기준 카드, 도면 불러오기(xlsx·csv·dxf), 도면 참조 표·오버레이 제거
- 교각마다 솔플레이트 규칙 입력: 받침높이 H(솔플레이트 포함) 211, 교직 L 1000,
  교축 W 1100, 종단 기울기 S −0.5 % (기본값, 가정 표시)
- 중심 두께 T = ⌈22 + L·|S|/200⌉ 로 계산해 얇은 쪽 T2가 22 mm 이상이 되게 함
  (기본값 T 25, T2 22.5, h3 = H − T = 186)
- geometry·scene·SVG는 교각 규칙에서 만든 같은 솔플레이트 계획을 모든 받침에 사용

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

29 lines
1.2 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { buildPier } from '../src/core/geometry';
import { bearingPlanSvg } from '../src/view/bearing-plan-svg';
import { loadP1 } from './helpers';
const separate = buildPier(loadP1());
const integrated = buildPier({ ...loadP1(), bearingLayout: '일체' });
describe('교량받침 상세 평면 (승인 2026-10-26)', () => {
it('shows C4 and C5 from the bearing to the block edges along the 교축 (600 each)', () => {
const svg = bearingPlanSvg(separate, 0);
expect(svg).toContain('C4 600');
expect(svg).toContain('C5 600');
});
it('분리 draws two 1200 outlines; 일체 draws one 2500 outline (block outline only)', () => {
expect((bearingPlanSvg(separate, 0).match(/width="1200" height="1200"/g) ?? []).length).toBe(2);
expect(bearingPlanSvg(integrated, 0)).toContain('width="2500" height="1200"');
});
it('draws the solplate of each bearing from the pier plan (L 1000 across, W 1100 along)', () => {
expect((bearingPlanSvg(separate, 0).match(/width="1000" height="1100"/g) ?? []).length).toBe(2);
});
it('an unknown pair index gives an empty drawing', () => {
expect(bearingPlanSvg(separate, 99)).toBe('');
});
});