Files
Pier_v1/심수석님 검토 파일/검토_운곡교P1/스크립트/plan_bearing_rotation.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

23 lines
1.0 KiB
Python

import ezdxf, sys, math
from collections import defaultdict
sys.stdout.reconfigure(encoding='utf-8')
d=ezdxf.readfile(r'D:\★Pier 자료\심수석님 검토 파일\철근 모델랑 운곡교P1_바이브코딩\1.dxf'); ms=d.modelspace()
cnt=defaultdict(list)
def add(a,b,layer):
L=math.hypot(b[0]-a[0],b[1]-a[1])
if 300<L<1500:
ang=round(math.degrees(math.atan2(b[1]-a[1],b[0]-a[0]))%90,1)
if abs(ang)>0.3 and abs(ang-90)>0.3: cnt[(layer,ang)].append((round((a[0]+b[0])/2),round((a[1]+b[1])/2),round(L)))
for e in ms:
t=e.dxftype()
if t=='LINE':
a,b=e.dxf.start,e.dxf.end
if 12500<min(a.x,b.x) and max(a.x,b.x)<18800 and 25800<min(a.y,b.y) and max(a.y,b.y)<30300: add((a.x,a.y),(b.x,b.y),e.dxf.layer)
elif t=='LWPOLYLINE':
p=[(q[0],q[1]) for q in e.get_points()]
for i in range(len(p)-1):
if all(12500<x<18800 and 25800<y<30300 for x,y in (p[i],p[i+1])): add(p[i],p[i+1],e.dxf.layer)
for k in sorted(cnt):
v=cnt[k]
if len(v)>=2: print(k,len(v),sorted(v)[:4])