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

31 lines
1.6 KiB
Python

import sys; sys.path.insert(0,".")
import json, collections, io, sys
from swdots import dots
B=json.load(open('swpos.json',encoding='utf-8'))
OFFY=328016.3
o=io.open('swfootcmp.txt','w',encoding='utf-8')
def model(marks,axis):
# returns list of (pos along axis, z_d)
r=[]
for m in marks:
for b in B[m]:
bb=b['bb']; r.append((round((bb[axis]+bb[axis+3])/2,1), round((bb[2]+bb[5])/2-OFFY,1), m))
return r
for nm,(x0,x1,cx,axis,marks_) in (('정면도(x 위치)',(6700,14250,10473.9,0,['B1','B2','B3','B7','B8','B9','B10'])),('측면도(y 위치)',(20850,28400,24604.3,1,['B4','B5','B6','B7','B8','B9','B10']))):
D=[d for d in dots(x0,x1,-285300,-282700) if d[2]==22.5]
lev=collections.defaultdict(list)
for d in D: lev[d[1]].append(round(d[0]-cx,1))
o.write(u'== %s : 도면 점 %d개, 높이 레벨 %s\n'%(nm,len(D),sorted((k,len(v)) for k,v in lev.items())))
for y,xs in sorted(lev.items()):
xs=sorted(xs)
# 가장 가까운 모델 (같은 높이 ±60)
cand=[(p,z,m) for p,z,m in model(marks_,axis) if abs(z-y)<80]
ms=sorted(set(p for p,z,m in cand))
o.write(u' y=%.1f 도면 %d개 [%s ... %s] / 모델(±80) %d개 마크 %s\n'%(y,len(xs),xs[:4],xs[-4:],len(ms),sorted(set(m for p,z,m in cand))))
if cand:
import bisect
dd=[min(abs(x-p) for p in ms) for x in xs]
o.write(u' 도면→모델 위치차 최대 %.1f\n'%max(dd))
dd2=[min(abs(x-p) for x in xs) for p in ms]
o.write(u' 모델→도면 위치차 최대 %.1f (모델 %d)\n'%(max(dd2),len(ms)))