// 교대 A1 벽체 배근 삽도 2장을 SVG로 저장한다 (PNG 확인: python3 -I ../verify/svg_to_png.py ). 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('