Files
Pier_v1/verify/dump/abut-wall-svg.dump.ts
T
ypshimandClaude Haiku 5.5 079748e5e7 feat(abut-rebar): 교대 벽체 배근 삽도 (교대축 직각 단면 · 계단 단면)
- 배근 규칙 경로로 그림: 구간 1 단면 (W1–W7 · W9 · W10, 단 치수), 계단 단면 (W1 · W5 · W9 · W10 · W11 · W8, 구간 높이)
- 번호 풍선 · 선택 강조 · 선택만 보기는 저판 삽도와 같은 함수 (공용으로 export)
- verify/dump: 삽도 SVG 덤프 전용 설정 (기본 테스트에 포함 안 됨)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-11-04 16:27:57 +09:00

29 lines
1.8 KiB
TypeScript

// 교대 A1 벽체 배근 삽도 2장을 SVG로 저장한다 (PNG 확인: python3 -I ../verify/svg_to_png.py <svg> <png>).
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import * as XLSX from 'xlsx';
import { 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 { abutFootingGeom, abutFootingRebar } from '../../src/core/abut/rebar/footing';
import { skewAngle } from '../../src/core/abut/rebar/skew-layout';
import { abutWallGeom, abutWallRebar } from '../../src/core/abut/rebar/wall';
import { abutWallElevationSvg, abutWallSectionSvg } from '../../src/view/abut-wall-rebar-svg';
it('dump 교대 A1 벽체 삽도', () => {
const out = process.env.DUMP_OUT ?? fileURLToPath(new URL('./out', import.meta.url));
mkdirSync(out, { recursive: true });
const xlsx = fileURLToPath(new URL('../../../../RAG/운곡교P1입력.xlsx', import.meta.url));
const rec = parseAbutments(XLSX.read(readFileSync(xlsx), { type: 'buffer' })).abutments[0];
const model = buildAbut(toAbutInput(rec));
const members = buildMembers(model, { bottomEl: rec.foundationBottomEl, pileLengthMm: rec.pileLengthMm });
const angle = skewAngle(rec.skewDeg);
const footing = abutFootingRebar(abutFootingGeom(model.length, members.shape, angle));
const g = abutWallGeom(model.length, members, angle);
const r = abutWallRebar(g, footing);
const ns = (svg: string) => svg.replace('<svg ', '<svg xmlns="http://www.w3.org/2000/svg" ');
writeFileSync(`${out}/wall-section.svg`, ns(abutWallSectionSvg(g, r)));
writeFileSync(`${out}/wall-elevation.svg`, ns(abutWallElevationSvg(g, r)));
});