- 받침 기준 카드, 도면 불러오기(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>
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { buildPier } from '../src/core/geometry';
|
|
import { bearingSectionSvg } from '../src/view/bearing-section-svg';
|
|
import { solplateDetailSvg } from '../src/view/solplate-svg';
|
|
import { loadP1 } from './helpers';
|
|
|
|
const model = buildPier(loadP1());
|
|
const integrated = buildPier({ ...loadP1(), bearingLayout: '일체' });
|
|
|
|
describe('교량받침 상세 단면 (승인 2026-10-26, C안 2026-11-03)', () => {
|
|
it('labels EL.X at the mortar top and the block height h1 for each bearing', () => {
|
|
const svg = bearingSectionSvg(model, 0);
|
|
expect(svg).toContain('EL.X');
|
|
expect(svg).toContain('h1 150');
|
|
});
|
|
|
|
it('일체 draws one stepped outline (a polygon) for the pair', () => {
|
|
expect(bearingSectionSvg(integrated, 0)).toContain('<polygon');
|
|
});
|
|
|
|
it('an unknown pair gives an empty drawing', () => {
|
|
expect(bearingSectionSvg(model, 99)).toBe('');
|
|
});
|
|
});
|
|
|
|
describe('솔플레이트 상세 (승인 2026-10-26, C안 2026-11-03)', () => {
|
|
it('shows L, W, T1 and T2 of the pier plan', () => {
|
|
const block = model.blocks.find((b) => b.no === 1)!;
|
|
const svg = solplateDetailSvg(block);
|
|
expect(svg).toContain('L 1000');
|
|
expect(svg).toContain('W 1100');
|
|
expect(svg).toContain('T1 27.5');
|
|
expect(svg).toContain('T2 22.5');
|
|
});
|
|
});
|