Files
Pier_v1/verify/dump/abut-parapet-svg.dump.ts
T
ypshimandClaude Haiku 5.5 5e64a4f2ed feat(abut): 벽체 높이 H_w = 받침 ① 교좌면 ~ 흉벽 상단 연직 (기본 3326)
- 사용자 도면(2026-11-04): 받침 ① 위치에서 받침 ① 교좌면부터 흉벽 상단까지 연직 거리. 모든 교대 기본값 3326 (QA-4 가정 2500 대체)
- 입력 이름 "벽체 높이 · 받침 ① 기준 연직", ② 정면도에 받침 ① 기준선과 H_w 치수
- ③ 흉벽 철근표 대표 단면 = 받침 ① 위치 (P1–P3는 그 단면에서 정확히 계산)
- 테스트: 흉벽 상단 IP1 48.006 / IP3 47.661 등 + 0.826 반영, 교대흉벽철근.md §11 재현은 2500을 넣어 유지, 3326 기본 확인 (P1 3945)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-11-04 17:20:05 +09:00

41 lines
2.8 KiB
TypeScript

// 교대 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 { resolveSlab } from '../../src/core/abut/slab';
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 { abutParapetGeom, abutParapetRebar, slabSpanAt } from '../../src/core/abut/rebar/parapet';
import { abutPlanOutline, abutSkewK } from '../../src/view/abut-scene';
import { abutParapetDowelSvg, abutParapetElevationSvg, abutParapetSectionSvg } from '../../src/view/abut-parapet-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 wings = buildWings(model, members);
const angle = skewAngle(rec.skewDeg);
const footing = abutFootingRebar(abutFootingGeom(model.length, members.shape, angle));
const wg = abutWallGeom(model.length, members, angle);
const wall = abutWallRebar(wg, footing);
const slab = resolveSlab();
const tM = ((wg.xb + members.shape.parapetBackM * 1000) / 2) / 1000;
const span = slabSpanAt(abutPlanOutline(model, members, wings, slab).slab, tM, abutSkewK(model))!;
const ch = (sEnd: number) => (wings.find((w) => w.sEnd === sEnd)?.haunchM ?? 0) * 1000;
const g = abutParapetGeom(wg, members.shape, model.bearings[0].s, { B: model.wing!.slabWidthMm, a: span.a, b: span.b, nearT: members.shape.parapetBackM * 1000 - slab.parapetGapMm, chamferA: ch(0), chamferB: ch(model.length) });
const r = abutParapetRebar(g, wall);
const ns = (svg: string) => svg.replace('<svg ', '<svg xmlns="http://www.w3.org/2000/svg" ');
writeFileSync(`${out}/parapet-section.svg`, ns(abutParapetSectionSvg(g, r)));
writeFileSync(`${out}/parapet-elevation.svg`, ns(abutParapetElevationSvg(g, r)));
writeFileSync(`${out}/parapet-dowel.svg`, ns(abutParapetDowelSvg(g, r)));
});