Files
Pier_v1/Code/교각모델링앱/tools/infer_footing_rebar.py
T
ahnyongjooandClaude Sonnet 5.5 964a841de1 chore(rebar): Pier_T_rebar 작업 폴더 초기 구성 및 외부 의존 파일 통합
- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환
- Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용
- pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관)
- worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md)
- D:\Rhino-MCP 경로 참조를 새 위치로 치환

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 11:20:18 +09:00

24 lines
1.5 KiB
Python

"""Infer the footing rebar layers B1-B10 from the footing size (2026-10-19, read-only trial). The rules were read off the template pier (운곡교 P1):
bars run (footing - 200) long; the dense layers (B2/B4, B6/B8) have the two end bars, one bar 200 (X-position axis) / 175 (Y) inside, then a 125 grid;
the sparse layers (B3, B7, B1, B5) the same with a 250 grid; B9 ties sit on a 250 grid (checkerboard, half of the points); B10 hoops grow with the footing.
The result is checked against (a) the template params (P1: must reproduce) and (b) the bar counts of the pier's own rebar schedule (independent evidence).
usage: python tools/infer_footing_rebar.py <size_x> <size_y> -> prints the layers; with --check <params.json> compares with that file's footing_rebar"""
import json
import sys
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from engine.footing_rule import dense, infer, sparse # noqa: E402,F401
if __name__ == "__main__":
sx, sy = float(sys.argv[1]), float(sys.argv[2])
r = infer(sx, sy)
print({k: (len(v) if isinstance(v, list) else v) for k, v in r.items()})
if "--check" in sys.argv:
ref = json.load(open(sys.argv[sys.argv.index("--check") + 1], encoding="utf-8"))["footing_rebar"]
for k in ("bottom_Y1", "bottom_X2", "bottom_Y3", "bottom_X4", "top_Y", "top_X"):
print(k, "equal" if [round(x, 1) for x in r[k]] == [round(x, 1) for x in ref["layers"][k]["pos"]] else "DIFF")