- 설계 계산 tilted · tilt_pct(파이썬 · TS 짝) — 물넘이 범위 노면 = 경사각도로 지대 낮은 쪽 한 경사 · 측구 없음 · 중심점 = 계획고(콘크리트 윗면) · 노면 끝에서 사면이 이어짐(짧으면 성토) - 서버 tilt_ranges · tilt_args · stored_tilt — 기본 설계 · [저장] 재계산 · 포장 범위 맞춤 · 저장분 재계산이 같은 값(옛 ford_paved 갈음) - 횡단 그림 — 포장층 = 노면공 포장 형상(appendPavementOverlay)을 노견까지 · 물넘이 표식 · 월류 높이선 = 노면 + 높이 같은 각도 · 옛 파임 · 노면 걷기 그림 걷음 - 3D 노면 파기 걷음(설계 노면이 곧 윗면) · 코리도 빌드 판 94 - 시험 test_287 · 286_1 · 횡단 설계 거울(기울임 갈래) · 물넘이 명세 시험 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TteK8mfYZetk5P3bEZkyVZ
63 lines
2.5 KiB
JavaScript
63 lines
2.5 KiB
JavaScript
/* 286 물넘이포장 종횡단 헬퍼 — 진짜 TS 를 Node 로 돌려 표준출력 JSON 한 벌로.
|
|
* 입력 = argv[2] JSON 파일 { pipes, structures, types }.
|
|
*/
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
const ts = require(path.join(__dirname, "..", "..", "config", "node_modules", "typescript"));
|
|
|
|
const ROOT = path.join(__dirname, "..", "..");
|
|
|
|
function loadTs(file, stubs = {}) {
|
|
const js = ts.transpileModule(fs.readFileSync(file, "utf8"), {
|
|
compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 },
|
|
}).outputText;
|
|
const box = { exports: {} };
|
|
const localRequire = (request) => {
|
|
if (stubs[request]) return stubs[request];
|
|
throw new Error(`stub 없음: ${request}`);
|
|
};
|
|
new Function("exports", "module", "require", js)(box.exports, box, localRequire);
|
|
return box.exports;
|
|
}
|
|
|
|
const input = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
|
const station = loadTs(path.join(ROOT, "common_util", "common_util_structure_station.ts"));
|
|
|
|
const ford = loadTs(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Ford_Pavement.ts"), {
|
|
"./B06_Section_UI_Cross_Wall_Hatch": { appendChuteBand() {} },
|
|
"./B06_Section_UI_Cross_Design_Surface": { appendPavementOverlay() {} },
|
|
});
|
|
// 286-3 도수로 · 돌붙임 길이 — 유출(좌 · 우가 높음) 성토사면 1:1.5(5 m 내려감 · 사면 길이 √(7.5²+5²) ≈ 9.01)
|
|
const sets = loadTs(path.join(ROOT, "common_util", "common_util_culvert_sets.ts"));
|
|
const slopeDesign = {
|
|
design_elevation_m: 100,
|
|
cross_slope_pct: 2,
|
|
section_mode: "left_cut",
|
|
road_edges: {
|
|
left: { offset_m: 2.5, elevation_m: 100 },
|
|
right: { offset_m: -2.5, elevation_m: 100 },
|
|
},
|
|
design_line: [
|
|
{ offset_m: 10, elevation_m: 95 },
|
|
{ offset_m: 2.5, elevation_m: 100 },
|
|
{ offset_m: -2.5, elevation_m: 100 },
|
|
{ offset_m: -6, elevation_m: 104 },
|
|
],
|
|
};
|
|
const chuteOf = (extra) =>
|
|
sets.chute(
|
|
{ ford_chute_1_structure: "돌붙임", ford_chute_1_thickness: 30, ...extra },
|
|
"ford_chute",
|
|
);
|
|
|
|
const out = {
|
|
chuteNoLength: chuteOf({}),
|
|
chuteLength: chuteOf({ ford_chute_1_length_m: 3 }),
|
|
lineNoLength: ford.fordChuteLine(slopeDesign, chuteOf({})),
|
|
lineLength: ford.fordChuteLine(slopeDesign, chuteOf({ ford_chute_1_length_m: 3 })),
|
|
lineTooLong: ford.fordChuteLine(slopeDesign, chuteOf({ ford_chute_1_length_m: 50 })),
|
|
fordMarks: station.pipeStationMarks({ chainage_m: 230, facility: "ford_pavement" }),
|
|
planted: station.plantedChainages(input.pipes, input.structures, input.types),
|
|
};
|
|
process.stdout.write(JSON.stringify(out));
|