feat(abut): 교대 3D에 받침블럭·몰탈패드와 접속슬래브 추가

- 받침마다 블럭 1200 × 1200 (교좌면 ~ z − 50)과 몰탈패드 1000 × 1000 × 50 (spec §4.2, §6.6). 평면은 교대축 방향
- 접속슬래브 450 두께, 브라켓 상면 위, 흉벽 배면에서 5 mm 떨어져 7 m 배면으로, 배면 쪽 4 % 하향 (spec §4.8). 폭은 날개벽 사이 slabWidthMm, 축 중심
- 부재 표시: 받침·받침블럭 토글이 교대 블럭에도 적용, 접속슬래브 토글 추가
- 테스트 추가 (tests/abut-blocks-slab.test.ts). 전체 634건 통과, 타입 검사·빌드 통과. 브라우저 시각 확인은 미실시

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-11-03 15:59:51 +09:00
1 parent 5c2b23211e
commit 8f75c6dc9f
3 files changed
+121 -1

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import * as XLSX from 'xlsx';
import * as THREE from 'three';
import { describe, expect, it } from 'vitest';
import { buildAbut } from '../src/core/abut/geometry';
import { parseAbutments, toAbutInput } from '../src/core/abut/parse';
import { buildMembers } from '../src/core/abut/members';
import { buildWings } from '../src/core/abut/wings';
import { buildAbutGroup } from '../src/view/abut-scene';
const RAG = fileURLToPath(new URL('../../../RAG/운곡교P1입력.xlsx', import.meta.url));
const rec = parseAbutments(XLSX.read(readFileSync(RAG), { type: 'buffer' })).abutments[0];
const input = toAbutInput(rec);
const model = buildAbut(input);
const members = buildMembers(model, { bottomEl: input.foundationBottomEl, pileLengthMm: input.pileLengthMm });
const group = buildAbutGroup(model, members, buildWings(model, members));
const named = (name: string) => group.getObjectByName(name) as THREE.Group | undefined;
describe('교대 3D: 받침블럭과 접속슬래브 (spec §4.2, §4.8)', () => {
it('has a block and a pad for each of the 5 bearings', () => {
expect(named('blocks')?.children).toHaveLength(2 * model.bearings.length);
});
it('draws the 접속슬래브 as one slab over the wing-to-wing width', () => {
const slab = named('slab');
expect(slab?.children).toHaveLength(1);
const box = new THREE.Box3().setFromObject(slab as THREE.Group);
const width = box.max.x - box.min.x;
expect(width).toBeCloseTo((model.wing?.slabWidthMm ?? 0) / 1000, 2);
});
it('the slab reaches 7 m behind the 흉벽 back face and is 450 thick', () => {
const box = new THREE.Box3().setFromObject(named('slab') as THREE.Group);
expect(box.min.z).toBeCloseTo(members.shape.parapetBackM - 0.005 - 7, 2);
expect(box.max.y - box.min.y).toBeGreaterThan(0.45);
});
});