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

36 lines
3.3 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.
"""옥성 C9·C11·C13 오각형 스터럽 c=630 겹침(수정8) 기록: '수정 내역' R-25 + 이미지(형상 일람 시트 하단). 백업(양쪽) → Pier_T → 원본 복사 → SHA 확인."""
import copy, datetime, hashlib, shutil, sys
from pathlib import Path
import openpyxl
from openpyxl.drawing.image import Image as XLImage
from openpyxl.styles import Font, PatternFill
ROOT = Path(r"D:\★Pier 자료\프로그램\Pier_T"); REV = ROOT / "검토파일"; ORIG = Path(r"D:\★Pier 자료\심수석님 검토 파일"); NAME = "4개교_공통사항_종합.xlsx"
stamp = datetime.date.today().strftime("%Y%m%d")
for d in (REV, ORIG):
shutil.copy2(d / NAME, d / ("4개교_공통사항_종합_백업_%s_옥성갈고리C15C17.xlsx" % stamp))
wb = openpyxl.load_workbook(REV / NAME); ws, sh = wb["수정 내역"], wb["형상 일람(모델)"]
if any(r[0].value == "R-25" for r in ws.iter_rows(min_row=4)):
sys.exit("이미 있음")
def append_like(sheet, values, like_row):
r = sheet.max_row + 1
for j, v in enumerate(values, 1):
c = sheet.cell(row=r, column=j, value=v); s = sheet.cell(row=like_row, column=j)
c.font = copy.copy(s.font); c.fill = copy.copy(s.fill); c.border = copy.copy(s.border); c.alignment = copy.copy(s.alignment); c.number_format = s.number_format
sheet.auto_filter.ref = "A3:%s%d" % (openpyxl.utils.get_column_letter(sheet.max_column), r)
return r
r = append_like(ws, ["R-25", "옥성교", "코핑 타이 C15·C17 — 도면 양끝 갈고리 반영 (C17 은 j550 겹침 2조각)",
"C15 24본, C17 24본 (P1-CP)", "모델: 양끝이 갈고리 없는 직선. 도면: 양끝 갈고리 r80, 호 길이 188, 꼬리 140 (C17 은 j550 포함)",
"직선 양끝에 갈고리 추가(호 188=134.65°, 꼬리 140), 방향은 단면 중심 쪽(z 일정 평면). C17 은 가운데에서 550 겹치는 2조각. 길이 증가: C15 +656, C17 +1,206(656+550)",
48, "사용자 지시 2026-10-27: C15·C17 형상 수정(도면 맞춤), 이미지 캡처 엑셀 기재",
"옥성교P1_G5_수정9_20261027.3dm (수정8 기반)",
"재료표 L 역산: C15 7,632 = a평균 6,976 + 2×(188+140) 일치, C17 13,001 = 11,795 + 656 + 550 일치. 모델 직선 평균은 도면 a 보다 약 44 짧음(C17 모델 12,956 ↔ 표 13,001). 이미지: 수정후_캡처\옥성교_타이C15C17_갈고리_전후.png",
"갈고리 방향(단면 중심 쪽, 평면 z 일정)은 가정 — 도면 평면·단면에서 확인 필요. C17 j550 위치는 가운데로 가정. 겹침부 파이프는 같은 선상 중복"], 4)
ws.cell(row=r, column=1).fill = PatternFill("solid", fgColor="FFFFF2CC")
row = max(i.anchor._from.row + int(i.height / 20) for i in sh._images) + 6
sh.cell(row=row, column=1, value="옥성 C9·C11·C13 오각형 스터럽 c=630 겹침 — 전후 (R-25)").font = Font(bold=True, size=12)
im = XLImage(str(REV / "수정후_캡처" / "옥성교_타이C15C17_갈고리_전후.png")); w0, h0 = im.width, im.height
im.width, im.height = 1000, int(1000 * h0 / w0); sh.add_image(im, "A%d" % (row + 1))
wb.save(REV / NAME); shutil.copy2(REV / NAME, ORIG / NAME)
sha = lambda p: hashlib.sha256(Path(p).read_bytes()).hexdigest()
print("sha equal:", sha(REV / NAME) == sha(ORIG / NAME), sha(REV / NAME)[:16], len(sh._images))