Files
Pier_v1/Code/검토수정/스크립트/make_b1b4_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

43 lines
3.1 KiB
Python

"""산외교 기초 B1·B4: 재료표(SD500, 형식 I, B 없음) ↔ 형상 상세(SD500 I=직선 / SD400 I=ㄷ자) ↔ 모델 비교 증거 이미지.
입력: 산외 1_색구분_재료표·형상.png, jobs/cap/out/b14_B1|B4.png. 출력: 검토파일/수정후_캡처/산외교_B1B4_재료표형상_대조.png"""
from pathlib import Path
from PIL import Image, ImageDraw, ImageFont
ROOT = Path(r"D:\★Pier 자료\프로그램\Pier_T")
SRC = Image.open(ROOT / "검토파일" / "검토_산외교P1" / "1_색구분_재료표·형상.png").convert("RGB")
CAP = Path(r"C:\Users\User\AppData\Local\PierApp\jobs\cap\out")
F = lambda s, b=False: ImageFont.truetype(r"C:\Windows\Fonts\malgunbd.ttf" if b else r"C:\Windows\Fonts\malgun.ttf", s)
S = 1.6
crop = lambda x0, y0, x1, y1: SRC.crop((int(x0 * S), int(y0 * S), int(x1 * S), int(y1 * S)))
_h = crop(75, 757, 860, 772); _r = crop(75, 868, 860, 897)
tbl = Image.new("RGB", (_h.width, _h.height + _r.height + 6), (30, 30, 30)); tbl.paste(_h, (0, 0)); tbl.paste(_r, (0, _h.height + 6))
leg500 = crop(1745, 280, 1965, 430)
leg400 = crop(1127, 280, 1327, 430)
mb1 = Image.open(CAP / "b14_B1.png").convert("RGB")
mb4 = Image.open(CAP / "b14_B4.png").convert("RGB")
W = 1500
out = Image.new("RGB", (W, 1130), (255, 255, 255))
d = ImageDraw.Draw(out)
d.rectangle([0, 0, W, 96], fill=(40, 40, 40))
d.text((14, 8), "산외교 기초 B1·B4 — 재료표 · 형상 상세 · 모델 대조 (결과: 직선, 일치 / 수정 없음)", font=F(30, True), fill=(255, 255, 255))
d.text((14, 54), "B1·B4 는 SD500 재료표 → SD500 형상 상세의 형식 I(직선, a 만 있음). ㄷ자(a+b 다리) 형식 I 은 SD400 상세이며 B1·B4 에는 해당 없음", font=F(22), fill=(255, 255, 255))
y = 108
def put(im, x, y, w, title, col):
im = im.resize((w, int(im.height * w / im.width)))
d.text((x, y), title, font=F(22, True), fill=col)
out.paste(im, (x, y + 30))
return im.height + 30
h1 = put(tbl, 10, y, 980, "① 재료표 (SD500): B1·B4 형식 I, H16, 31본, A=7,300, B 칸 비어 있음, 길이 7,300", (30, 120, 60))
h2 = put(leg500, 1000, y, 230, "② SD500 I=직선", (30, 120, 60))
h3 = put(leg400, 1245, y, 245, "③ SD400 I=ㄷ자", (170, 40, 30))
y2 = y + max(h1, h2, h3) + 24
d.text((10, y2), "④ 모델 (수정5): 상면 직선 철근 1본 = 7,300, 다리(b) 없음 → ①②와 일치", font=F(22, True), fill=(30, 120, 60))
for i, (m, t) in enumerate(((mb1, "B1 (Right 뷰)"), (mb4, "B4 (Front 뷰)"))):
im = m.resize((730, int(m.height * 730 / m.width)))
out.paste(im, (10 + i * 745, y2 + 36))
d.text((20 + i * 745, y2 + 42), t, font=F(22, True), fill=(255, 255, 255))
d.text((10, y2 + 36 + im.height + 8), "※ 사용자 의견(2026-10-27): B1·B4 가 ㄷ자철근이라는 지적 → 도면 상세 대조 결과 SD400 상세와 혼동 가능. ㄷ자라면 b 값이 도면에 없어 도면 확인 필요", font=F(20), fill=(20, 20, 20))
out = out.crop((0, 0, W, y2 + 36 + im.height + 44))
p = ROOT / "검토파일" / "수정후_캡처" / "산외교_B1B4_재료표형상_대조.png"
out.save(p)
print(p, out.size)