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