import sys; sys.path.insert(0,"."); sys.path.insert(0,"pylib") import pickle, collections, swdots, json segs,texts=pickle.load(open('cache_옥성교P1.dxf.pkl','rb')); swdots.segs=segs D=[d for d in swdots.dots(568500,578600,321300,324000) if d[2]==22.5 and d[3]==22.5 and d[1] in (322004.8,323004.8)] dd=collections.defaultdict(list) for d in D: dd[d[1]].append(round(d[0]-573552,1)) for k,v in sorted(dd.items()): print(k,len(v),sorted(v)) B=json.load(open('okpos.json',encoding='utf-8')) for m in ('B11','B12'): zs=collections.Counter((round(b['bb'][2]+309179.8,1),round(b['bb'][5]+309179.8,1),b['dia'],b['shape']) for b in B[m]); print(m,dict(zs)) xs=collections.defaultdict(list) for b in B[m]: xs[round(b['bb'][2]+309179.8,1)].append((round((b['bb'][0]+b['bb'][3])/2,1),round((b['bb'][1]+b['bb'][4])/2,1))) for k,v in xs.items(): print(' ',k,sorted(v)[:20])