- 현장타설 기둥·말뚝 형상(cast-in-place-shape)과 주철근·횡철근·커플러 계산(rebar/cast-in-place, cast-layout) - 다주형 코핑 철근(multicol-coping), 기둥 높이 · 양단부 연장 - 철근표 요약 · 재료 수량 · 3D 뷰 연결과 삽도(cast-rebar-svg) - 검사 기준 갱신과 회귀 테스트, 검증 스크립트 보관 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
27 lines
1.9 KiB
JavaScript
27 lines
1.9 KiB
JavaScript
// Read-only diagnosis: concrete scene vs rebar paths for every pier/foundation combination.
|
|
import { createServer } from 'vite';
|
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
const server = await createServer({ configFile: false, server: { middlewareMode: true, hmr: false, watch: null }, appType: 'custom' });
|
|
try {
|
|
const { loadP1 } = await server.ssrLoadModule('/tests/helpers.ts');
|
|
const { buildPier } = await server.ssrLoadModule('/src/core/geometry.ts');
|
|
const { buildPierScene } = await server.ssrLoadModule('/src/view/scene.ts');
|
|
const { buildRebar3D } = await server.ssrLoadModule('/src/view/rebar3d.ts');
|
|
const { rebarSummary } = await server.ssrLoadModule('/src/core/rebar/summary.ts');
|
|
const result = [];
|
|
for (const [type, columnCount] of [['T형', 1], ['2주형', 2], ['3주형', 3]]) {
|
|
for (const foundationType of ['직접기초', '말뚝기초', '현장타설말뚝']) {
|
|
const model = buildPier({ ...loadP1(), type, columnCount, foundationType });
|
|
const record = { type, foundationType, columns: model.columns.length, footings: model.footings.length, piles: model.piles.length };
|
|
for (const [name, run] of Object.entries({ concrete: () => buildPierScene(model), rebar3d: () => buildRebar3D(model), summary: () => rebarSummary(model) })) {
|
|
try { run(); record[name] = { ok: true }; }
|
|
catch (error) { record[name] = { ok: false, message: error.message, stack: error.stack.split('\n').slice(0, 5) }; }
|
|
}
|
|
result.push(record);
|
|
}
|
|
}
|
|
await mkdir('.verify/cast-in-place-20261105', { recursive: true });
|
|
await writeFile('.verify/cast-in-place-20261105/diagnosis.json', JSON.stringify(result, null, 2));
|
|
console.table(result.map(({ type, foundationType, concrete, rebar3d, summary }) => ({ type, foundationType, concrete: concrete.ok, rebar3d: rebar3d.ok, summary: summary.ok })));
|
|
} finally { await server.close(); }
|