Files
Pier_v1/Code/review_pipeline/ra_build_images.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

77 lines
8.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import sys, os, json
SCR = r"C:\Users\User\AppData\Local\Temp\claude\D--Rhino-MCP-rhino-mcp-main\f46b47bc-9105-4079-9b62-fcbee31b26ae\scratchpad"
sys.path.insert(0, SCR)
sys.path.insert(0, SCR + r"\pylib")
from PIL import Image
import compose_new as C
CR = SCR + r"\ra_crops"
SH = SCR + r"\shots"
OUT = r"D:\★Pier 자료\심수석님 검토 파일\Ramp-A교P1\도면↔모델_불일치_시각자료"
os.makedirs(OUT, exist_ok=True)
def stack(names, out):
ims = [Image.open(CR + "\\" + n + ".png").convert("RGB") for n in names]
w = max(i.width for i in ims)
m = Image.new("RGB", (w, sum(i.height for i in ims)), (34, 40, 49))
y = 0
for i in ims:
m.paste(i, (0, y)); y += i.height
m.save(CR + "\\" + out + ".png")
def cr(n): return CR + "\\" + n + ".png"
def sh(n): return SH + "\\" + n + ".png"
stack(["row_head", "row_C7", "row_C8", "row_C9", "row_C10", "row_C11", "row_C12", "row_C13", "row_C14"], "tab_C7")
stack(["row_head", "row_C1", "row_C2", "row_C3", "row_C4", "row_C5"], "tab_C1")
stack(["row_head4r", "row_P1", "row_P1-1"], "tab_P1")
stack(["row_head4", "row_P2", "row_P2-1", "row_P3", "row_P3-1"], "tab_P2")
items = []
items.append(dict(code="M-1", title="C7~C14 끝 겹침 c(450/350)·j 290 이 모델 형상에 없음", subtitle="철근상세: C7·C9·C11 a·b·c 450, C8·C10·C12 a·b·c 450·d, C13·C14 a·b·c 350 (j 290) ↔ 모델 폐합·루프 형상은 c·j 없음", color=C.ORANGE,
panels=[dict(label="도면 철근상세 C7 · C13 · 재료표 C7~C14", color=C.BLUE, maxh=480,
images=[dict(path=cr("cell_C7"), cap="C7: c 450"), dict(path=cr("cell_C13"), cap="C13: c 350"), dict(path=cr("tab_C7"))]),
dict(label="모델 (라이노) C7 스터럽 1본 (측면) · C13 루프 1본 (평면)", color=C.ORANGE, maxh=480,
images=[dict(path=sh("R1a"), cap="C7 모델: 폐합 직사각형 (c 450 없음)"), dict(path=sh("R1b"), cap="C13 모델: 루프 (c 350 없음)")])],
rows=[("차이", "재료표 L 에는 끝 겹침 c(2곳)·j 가 포함(C7 L 7.480 = 2×1.673 + 2×1.617 + 2×0.450)되고 모델 설계길이(user string)도 포함하지만, 중심선 형상은 그만큼 짧음 (C7 형상 평균 대비 약 0.9 m)."),
("조치", "c·j 를 모델 형상에 넣을지, 가산 길이로만 둘지 판단 필요 (옥성교 M-2 와 같은 유형).")]))
items.append(dict(code="M-2", title="C7~C12 스터럽 폭 a = 모델 + 48 (가산)", subtitle="철근상세 a 1.673 (C7·C9·C11) / 0.673 (C8·C10·C12) ↔ 모델 1.625 / 0.625", color=C.ORANGE,
panels=[dict(label="도면 철근상세 C7 · C8", color=C.BLUE, maxh=480, images=[dict(path=cr("cell_C7")), dict(path=cr("cell_C8"))]),
dict(label="모델 (라이노) C8 (좌·우 2조각) 측면", color=C.ORANGE, maxh=520, images=[dict(path=sh("R2"), cap="C8 모델: 폭 0.625 (한 조각)")])],
rows=[("차이", "도면 a 는 모델 작도 폭 + 48 (1.625 → 1.673, 0.625 → 0.673). 재료표 a 값은 가산 포함, 모델은 작도값."),
("조치", "가산 48 의 적용 범위(폭·길이)를 확인 (운곡교 M-5 · 산외교 M-3 과 같은 유형).")]))
items.append(dict(code="M-3", title="C8~C14 도면 단일값·범위 ↔ 모델 철근별 변화, 총길이 차이", subtitle="재료표 L 은 대표값 1개 ↔ 모델 철근마다 높이·길이가 다름 (C8 모델 4.065~6.729, 재료표 6.071)", color=C.ORANGE,
panels=[dict(label="도면 철근상세 C8 (b 2.301 단일) · C12 · C13 (a 5.898~2.006 var.) · 재료표", color=C.BLUE, maxh=440,
images=[dict(path=cr("cell_C8")), dict(path=cr("cell_C12")), dict(path=cr("cell_C13"))]),
dict(label="모델 (라이노) 정면도 방향 · C8 · C12 (코핑 하면을 따라 높이 변화)", color=C.ORANGE, maxh=420,
images=[dict(path=sh("R3a"), cap="C8 20쌍"), dict(path=sh("R3b"), cap="C12 20쌍")])],
rows=[("차이", "총길이 모델-재료표(m): C7 -5.33, C8 -37.68, C9 -0.32, C10 -10.08, C11 -5.33, C12 +17.04, C13 -8.99, C14 +0.88. 도면 총계 5758.450 ↔ 모델 5708.545 m (-49.9)."),
("도면 쪽", "철근상세는 b 단일값(C8 2.301, C10 2.660, C12 1.248) 또는 범위(C7 2.301~0.933, C13 a 5.898~2.006 var.)만 적고 개별 값 없음."),
("조치", "철근별 개별 길이가 의도인지 확인. C12 는 모델이 재료표보다 길음(평균 5.759 ↔ 5.333).")]))
items.append(dict(code="M-4", title="C1~C5 일부 철근 다리 b·c 가 도면 단일값보다 약간 짧음", subtitle="철근상세 C1 b 858 · c 841 (9본 동일) ↔ 모델 C1 b·c 828~858 (4본 짧음, 최대 17 mm)", color=C.ORANGE,
panels=[dict(label="도면 철근상세 C1 · 재료표 C1~C5", color=C.BLUE, maxh=440, images=[dict(path=cr("cell_C1"), cap="C1: a 6.918 · b 858 · c 841"), dict(path=cr("tab_C1"))]),
dict(label="모델 (라이노) 정면도 방향 · C1", color=C.ORANGE, maxh=420,
images=[dict(path=sh("R4a"), cap="y+1000 (끝 짧은 철근)"), dict(path=sh("R4b"), cap="y+0 (도면 치수)")])],
rows=[("차이", "C1 9본 중 4본(2본 b·c 828/841→, 2본 837/853)과 C4 2본, C2·C3 일부가 3~17 mm 짧음. 설계길이는 재료표와 같음(8.617)."),
("조치", "경미한 차이 — 코핑 형상에 맞춘 조정인지 확인.")]))
items.append(dict(code="M-5", title="커플러 수량 P1 54 · P1-1 61 (115개) 모델에 없음", subtitle="철근상세 시트 커플러 수량 표 ↔ 모델 P1·P1-1 은 커플러 없이 연속(P1 은 연결 간격 40 만 길이에 반영)", color=C.ORANGE,
panels=[dict(label="도면 커플러 수량 표 · 재료표 P1 · P1-1", color=C.BLUE, maxh=420, images=[dict(path=cr("coupler_qty")), dict(path=cr("tab_P1"))]),
dict(label="모델 (라이노) 기둥 P1 + 말뚝 P1-1 · P1-2 (정면)", color=C.ORANGE, maxh=620, images=[dict(path=sh("R5"))])],
rows=[("차이", "표의 커플러 115개(P1 H35 54 + P1-1 H35 61)가 모델에 없음. P1 설계길이 16.260 + 커플러 0.040 = 16.300 (재료표 L), P1-1 8.750."),
("조치", "커플러 위치·개수를 모델에 반영할지 판단 (산외교 M-6 과 같은 유형).")]))
items.append(dict(code="M-6", title="굽힘 내면지름 H25·H19 KDS 3.5db 미달", subtitle="KDS 24 14 21 표 4.5-1: 내면지름 ≥ 3.5db · 도면에는 내면반지름 표기 없음", color=C.DYEL,
panels=[dict(label="모델 (라이노) C7 스터럽 모서리 확대", color=C.DYEL, maxh=560, images=[dict(path=sh("R6"), cap="C7 (H19) 굽힘: 중심선 R 42.8 → 내면지름 66.5")])],
rows=[("계산", "H25 (C3): R 56.2 → 87.0 < 3.5×25.4 = 88.9 (1.9 mm 부족). H19 (C7~C16): R 42.8 → 66.5 < 66.85 (0.35 부족). H29 (C1·C2·C4·C5) 101.8 ≥ 100.1 충족, H16 32.1 ≥ 2db 31.8 충족."),
("조치", "모델 R 을 KDS 기준으로 키울지 결정 (기준↔모델).")]))
items.append(dict(code="M-7", title="P2·P3 계열 갈고리·겹침 정의 도면 기준 불명", subtitle="P3 c 141·d 100, P3-1 c 165·d 150, P2 j 650×2, P2-1 j 880×2 ↔ 모델 갈고리 끝 92/176, 반링 이음 위치 가정", color=C.GREY,
panels=[dict(label="도면 철근상세 P3 · P3-1 · P2 · 재료표 P2~P3-1", color=C.BLUE, maxh=440, images=[dict(path=cr("cell_P3")), dict(path=cr("cell_P3-1")), dict(path=cr("cell_P2"))]),
dict(label="모델 (라이노) 평면 · 기둥 띠철근 P2·P3", color=C.GREY, maxh=520, images=[dict(path=sh("R7"))])],
rows=[("내용", "P3 모델 (200 / 1.832 / 150) ↔ 도면 a 200 · b 1.832 · c 141 · d 100 (끝 길이 정의 불일치 가능), P3-1 c 165 ↔ 모델 150. P2·P2-1 겹침 j 와 반링 이음 각도는 도면 기준 없음 (모델은 반링 2조각 = 1본 환산)."),
("조치", "갈고리 끝 길이·이음 각도 기준 확인 (설계자).")]))
names = {"M-1": "M-1_C7-C14_겹침c_j", "M-2": "M-2_스터럽폭_가산48", "M-3": "M-3_C8-C14_단일값_총길이", "M-4": "M-4_C1-C5_다리경미", "M-5": "M-5_커플러115", "M-6": "M-6_굽힘내면지름", "M-7": "M-7_P2P3_갈고리겹침"}
res = {}
for it in items:
it["out"] = OUT + "\\" + names[it["code"]] + ".png"
res[it["code"]] = it["out"]
print(it["code"], C.make(it))
json.dump(res, open(SCR + r"\ra_images.json", "w", encoding="utf-8"), ensure_ascii=False)