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>
This commit is contained in:
1 parent
66e7d4d90d
commit
079748e5e7
5 files changed
+176
-8
No files matched your search
@@ -0,0 +1,28 @@
|
||||
// 교대 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)));
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
// 삽도 덤프 전용 설정: verify/dump/*.dump.ts만 실행한다 (기본 테스트에는 포함되지 않음).
|
||||
// 사용: npx vitest run --config verify/vitest.dump.config.mjs (출력 폴더는 DUMP_OUT, 기본 verify/dump/out)
|
||||
export default { test: { include: ['verify/dump/**/*.dump.ts'] } };
|
||||
Reference in new issue
Block a user