- 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>
17 lines
878 B
Python
17 lines
878 B
Python
import ezdxf, sys, math
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
d=ezdxf.readfile(r'D:\★Pier 자료\심수석님 검토 파일\철근 모델랑 운곡교P1_바이브코딩\1.dxf'); ms=d.modelspace()
|
|
polys=[]
|
|
for e in ms:
|
|
if e.dxftype()=='LWPOLYLINE':
|
|
p=[(a[0],a[1]) for a in e.get_points()]
|
|
if len(p)>=4 and len(p)<=5 and all(12100<x<19000 and 25800<y<30200 for x,y in p):
|
|
xs=[x for x,y in p[:4]]; ys=[y for x,y in p[:4]]
|
|
side=[math.hypot(p[i][0]-p[(i+1)%4][0],p[i][1]-p[(i+1)%4][1]) for i in range(4)]
|
|
ang=math.degrees(math.atan2(p[1][1]-p[0][1],p[1][0]-p[0][0]))
|
|
polys.append((e.dxf.layer,round(sum(xs)/4,1),round(sum(ys)/4,1),[round(s,1) for s in side],round(ang,2)))
|
|
for e in ms:
|
|
if e.dxftype()=='LINE' and False: pass
|
|
for p in sorted(polys,key=lambda r:(r[0],r[1],r[2])): print(p)
|
|
print(len(polys))
|