B08_Quantity 86 · B09_Estimation 111 파일을 old_code/ 로 옮김(지우지 않음). 화면은 메뉴·주소·단계 막대만 남은 빈 틀 둘 — main.py 라우터 13 개는 끊음. B07 이 빌려 쓰던 비탈 길이·면적은 필요한 함수만 B07_DesignDetail_Engine_SlopeGeometry 로 옮겨 적음(면적 적분·노면 면적·측점 묶음은 안 옮김) · 시험 하나를 새로 둠. B07 구조물도 조립(Cad_StandardSheet)은 2026-09-13 에 이미 도면 목록에서 빠져 부르는 곳이 없어 old_code 로 같이 보냄 — 구조물 그림은 되살리지 않음. B06 구조물 몫 조회는 빈 값으로 두어 화면이 그대로 서게 함. B08·B09 를 부르던 시험 25 개도 old_code/resources/tester 로 옮김. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAdA5ThqmtVSsbzjusk1cJ
29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
"""구조물도 식 풀이 — 서버가 부르는 **껍데기**. 계산은 여기 없음.
|
|
|
|
풀이는 화면이 쓰는 `B08_Quantity_Formula.ts` 한 벌을 Node 로 돌림(판정 Ⓐ, 2026-09-13 ·
|
|
명세 13장). 파이썬으로 다시 짜면 반올림이 1원에서 조용히 갈리므로 두 벌을 두지 않음.
|
|
B06 `B06_Section_Server_Calc_Prebuild.py` 와 같은 본(`common_util_node_bundle`).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
from typing import Any
|
|
|
|
from common_util.common_util_node_bundle import run_bundle_json
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
BUNDLE = ROOT / "config" / "formula_node" / "B08_Quantity_Formula_Node.js"
|
|
_NPM_SCRIPT = "build:formula"
|
|
|
|
|
|
def evaluate_sheets(sheets: list[dict[str, Any]]) -> list[list[dict[str, Any]]] | None:
|
|
"""장 여러 벌을 한 번에 풂 — 줄마다 `amount`(반올림 뒤)·`raw`·`error`.
|
|
|
|
Node 가 못 돌면 `None` — 값을 지어내지 않고 부르는 쪽이 「못 풂」으로 드러냄.
|
|
"""
|
|
output = run_bundle_json(BUNDLE, _NPM_SCRIPT, {"sheets": sheets})
|
|
if not isinstance(output, dict) or not isinstance(output.get("sheets"), list):
|
|
return None
|
|
return output["sheets"]
|