feat(abut-rebar): 교대 날개벽 배근 삽도 (전면도 · 배면도 · 헌치 · 모서리 평면)

- 전면도 · 배면도: 날개벽 방향 거리 × 높이, 교대 단면 · 저판 · 뒷굽 끝, 연직 배치 치수, 단 수
- 헌치 · 모서리 평면: WR7-1 · 7-2 · 7-3 · WR10 띠별 한 단, WR9 점
- verify/dump: 날개벽 삽도 덤프

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-11-04 18:00:41 +09:00
1 parent e6869d17be
commit d15b237100
3 files changed
+171

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
// 교대 A1 좌 날개벽 배근 삽도 3장을 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 { buildWings } from '../../src/core/abut/wings';
import { abutFootingGeom, abutFootingRebar } from '../../src/core/abut/rebar/footing';
import { skewAngle } from '../../src/core/abut/rebar/skew-layout';
import { abutWingGeom, abutWingRebar } from '../../src/core/abut/rebar/wing';
import { abutWingCornerSvg, abutWingFaceSvg } from '../../src/view/abut-wing-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 footing = abutFootingRebar(abutFootingGeom(model.length, members.shape, skewAngle(rec.skewDeg)));
const wing = buildWings(model, members).find((w) => w.side === (process.env.SIDE ?? 'left'))!;
const g = abutWingGeom(model, members, wing, footing.z.B68);
const r = abutWingRebar(g);
const ns = (svg: string) => svg.replace('<svg ', '<svg xmlns="http://www.w3.org/2000/svg" ');
writeFileSync(`${out}/wing-front.svg`, ns(abutWingFaceSvg(g, r, 'front')));
writeFileSync(`${out}/wing-back.svg`, ns(abutWingFaceSvg(g, r, 'back')));
writeFileSync(`${out}/wing-corner.svg`, ns(abutWingCornerSvg(g, r)));
});