import axipy

from ru_rubtsov_axioma_topo_tools import RunTopo, DlgProgressBar

table_source_name='ВСЕ_ЗОНЫ1'
table_source_name='Зоны_round_new'
table_source_name='зоны'
table_source_name='FunctionalZone'
table_source_name='_0_ВСЕ'
table_source_name='test_angle'
table_source_name='угол_1_градус'
tab_source=table= axipy.da.data_manager.find(table_source_name)
property_litle_area={}

property_litle_area['enable']=False
property_litle_area['area_limit']=0.0367983
property_litle_area['area_limit']=0.00367983

property_litle_area['style']='Pen (2, 2, 16711680) Brush (84, 16711680, 16776960)'
property_topo={}
property_topo['area_limit']=property_litle_area
property_topo['area_intersect']={'enable':False}
property_topo['self_intersect']={'enable':False}
property_topo['area_intersect']={'enable':False}
property_topo['double_points']={'enable':False}

property_topo['gap_area']={'enable':False,'area_limmit':0.0,'style':'Brush (8, 16711680, 16777215)'}

property_topo['angle_limit']={'style':'Symbol (35, 16711680, 12)'}
property_topo['angle_limit']={'angle_limit':3.0}

property_topo['angle_limit']={'enable':True,'angle_limit':3.0,'style':'Symbol (35, 16711680, 12)'}
cls_run=RunTopo(tab_source,property_topo)
dlg = DlgProgressBar(cls_run,axipy.app.mainwindow.qt_object())
cls_run.setClsProgressBar(dlg)
dlg.setTextProcess("Инициализация базы ..")
dlg.setTitle("Проверка топологии")
cls_run.run()
print("End")