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

27 lines
2.4 KiB
Python

"""옥성교 C9·C11·C13 오각형 스터럽 겹침(c=630) 전후 비교 이미지: 도면 그림 | 수정 전(수정7) | 수정 후(수정8). 입력: jobs/cap/out/ok7pent_*, ok8pent_*"""
from pathlib import Path
from PIL import Image, ImageDraw, ImageFont
ROOT = Path(r"D:\★Pier 자료\프로그램\Pier_T"); CAP = Path(r"C:\Users\User\AppData\Local\PierApp\jobs\cap\out")
SRC = Image.open(ROOT / "검토파일" / "검토_옥성교P1" / "1_색구분_재료표·철근상세.png").convert("RGB").crop((1374, 552, 1554, 682))
F = lambda s, b=False: ImageFont.truetype(r"C:\Windows\Fonts\%s.ttf" % ("malgunbd" if b else "malgun"), s)
W, H = 560, 560
def fit(im, w, h):
im = im.copy(); im.thumbnail((w, h)); c = Image.new("RGB", (w, h), (255, 255, 255)); c.paste(im, ((w - im.width) // 2, (h - im.height) // 2)); return c
rows = []
for m in ("C9", "C11", "C13"):
b = Image.open(CAP / ("ok7pent_%s.png" % m)).convert("RGB"); a = Image.open(CAP / ("ok8pent_%s.png" % m)).convert("RGB")
b = b.crop((520, 40, 1000, 800)); a = a.crop((520, 40, 1000, 800))
rows.append((m, fit(SRC.resize((SRC.width * 3, SRC.height * 3)), W, H), fit(b, W, H), fit(a, W, H)))
out = Image.new("RGB", (W * 3 + 40, 150 + len(rows) * (H + 60)), (255, 255, 255)); d = ImageDraw.Draw(out)
d.rectangle([0, 0, out.width, 110], fill=(40, 40, 40))
d.text((16, 10), "옥성교 코핑 오각형 스터럽 C9·C11·C13 — 겹침 c=630 반영 전·후 (Rhino 캡처, 철근 1본)", font=F(30, True), fill=(255, 255, 255))
d.text((16, 58), "도면: 긴 세로 변 위쪽에서 아래로 c=630 만큼 두 끝이 겹침 / 모델: 닫힌 링(겹침 없음) → 2조각(빨강·파랑)이 630 겹침. 길이 = 링 + 630", font=F(22), fill=(255, 255, 255))
y = 130
for m, g, b, a in rows:
for i, (t, im, col) in enumerate((("도면 철근상세 (%s)" % m, g, (138, 90, 0)), ("수정 전 — 끝이 맞닿은 닫힌 링", b, (170, 40, 30)), ("수정 후 — 세로 변 위에서 630 겹침", a, (30, 120, 60)))):
x = 10 + i * (W + 10)
d.rectangle([x, y, x + W, y + 44], fill=col); d.text((x + 8, y + 6), t, font=F(24, True), fill=(255, 255, 255))
out.paste(im, (x, y + 48)); d.rectangle([x, y + 48, x + W, y + 48 + H], outline=(120, 120, 120), width=2)
y += H + 60
p = ROOT / "검토파일" / "수정후_캡처" / "옥성교_오각형스터럽_C9C11C13_겹침_전후.png"; out.save(p); print(p, out.size)