- 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>
28 lines
1.4 KiB
Python
28 lines
1.4 KiB
Python
import ezdxf, sys
|
|
from collections import defaultdict
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
d=ezdxf.readfile(r'D:\★Pier 자료\심수석님 검토 파일\철근 모델랑 운곡교P1_바이브코딩\1.dxf'); ms=d.modelspace()
|
|
name=sys.argv[1]; x0,x1,y0,y1=map(float,sys.argv[2:6])
|
|
print('=====',name)
|
|
conc=defaultdict(list)
|
|
cir=defaultdict(list); H=defaultdict(list); V=defaultdict(list)
|
|
for e in ms:
|
|
t=e.dxftype()
|
|
if t=='CIRCLE' and e.dxf.radius==27:
|
|
c=e.dxf.center
|
|
if x0<c.x<x1 and y0<c.y<y1: cir[round(c.y,1)].append(round(c.x,1))
|
|
elif t=='LINE' and e.dxf.layer in('CS-RBAR-MAJR','CS-CONC-MAJR'):
|
|
a,b=e.dxf.start,e.dxf.end
|
|
if x0<min(a.x,b.x) and max(a.x,b.x)<x1 and y0<min(a.y,b.y) and max(a.y,b.y)<y1:
|
|
if abs(a.y-b.y)<0.6: H[(e.dxf.layer[3:7],round(a.y,1))].append((round(min(a.x,b.x),1),round(max(a.x,b.x),1)))
|
|
elif abs(a.x-b.x)<0.6: V[(e.dxf.layer[3:7],round(a.x,1))].append((round(min(a.y,b.y),1),round(max(a.y,b.y),1)))
|
|
print('circle rows (y: n, x-min..x-max):')
|
|
for y in sorted(cir,reverse=True):
|
|
xs=sorted(cir[y]); print(' y',y,'n',len(xs),xs[0],'..',xs[-1])
|
|
print('H lines:')
|
|
for k in sorted(H,reverse=True):
|
|
if k[0]=='CONC' or sum(b-a for a,b in H[k])>500: print(' ',k,sorted(H[k])[:2],len(H[k]))
|
|
print('V lines (count by x):')
|
|
for k in sorted(V):
|
|
if k[0]=='CONC' or sum(b-a for a,b in V[k])>300: print(' ',k,sorted(V[k])[:2],len(V[k]))
|