Files
Pier_v1/Code/교각모델링앱/tools/patches/2026-10-14_patch_gate_global.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

33 lines
1.6 KiB
Python

"""Patch (2026-10-14, Okseong P1 G3): builders receive the global GATE (gate id), so the generic centreline builder
rebar_polylines.py can serve G3 (params footing_rebar) as well as G4 (params coping_rebar).
Backups: backup/2026-10-14_okseong_g3/. Other builders ignore the extra global."""
from pathlib import Path
APP = Path(__file__).resolve().parents[2]
def patch(path, reps):
s = path.read_text(encoding="utf-8")
for a, b in reps:
assert s.count(a) == 1, (path.name, a[:60])
s = s.replace(a, b)
path.write_text(s, encoding="utf-8")
patch(APP / "engine" / "pipeline.py", [(
''' steps.append({"name": f"{g}:{script}", "script": RHINO_DIR / script, "globals": glb})''',
''' steps.append({"name": f"{g}:{script}", "script": RHINO_DIR / script, "globals": dict(glb, GATE=g)})''')])
patch(APP / "engine" / "gates.py", [(
''' steps.append({"name": f"{g}:{script}", "script": RHINO_DIR / script, "globals": glb})''',
''' steps.append({"name": f"{g}:{script}", "script": RHINO_DIR / script, "globals": dict(glb, GATE=g)})''')])
patch(APP / "engine" / "rhino" / "rebar_polylines.py", [
('''Ids: <pier>-R-<mark>-<occ> (pipe) and <pier>-RC-<mark>-<occ> (centreline).
"""''',
'''Ids: <pier>-R-<mark>-<occ> (pipe) and <pier>-RC-<mark>-<occ> (centreline).
Section by gate (2026-10-14, Okseong P1): GATE "G3" -> params footing_rebar, otherwise coping_rebar.
"""'''),
('''SEC = P["coping_rebar"]''',
'''SEC = P["footing_rebar" if globals().get("GATE") == "G3" else "coping_rebar"]'''),
])
print("patched")