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() X0,X1,Y0,Y1=26000,36500,9000,22200 rows=defaultdict(list) for e in ms: if e.dxftype()=='CIRCLE' and e.dxf.radius==27: c=e.dxf.center if X0800: H.append((round(a.y,1),round(min(a.x,b.x),1),round(max(a.x,b.x),1))) if abs(a.x-b.x)<0.6 and abs(a.y-b.y)>800: V.append((round(a.x,1),round(min(a.y,b.y),1),round(max(a.y,b.y),1))) print('H',sorted(set(H),reverse=True)[:12]) print('V',sorted(set(V))[:12])