개정판 d1566ccd
dev issue #581: Line 검출 로직 변경(다른 Property 전부 포함), CodeTable UI 및 관련 DB Table 이름 카멜표기법으로 수정
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
677 | 677 |
configs = docData.getConfigs('Line No', 'Delimiter') |
678 | 678 |
delimiter = configs[0].value if 1 == len(configs) else '-' |
679 | 679 |
lineNoconfigs = docData.getConfigs('Line No', 'Configuration') |
680 |
sizeDataList = docData.getNomialPipeSizeData(True) |
|
681 |
fluidCodeList = docData.getFluidCodeData(True) |
|
680 |
# |
|
681 |
linePropertyData = {} |
|
682 |
linePropertyData['NominalDiameter'] = docData.getNomialPipeSizeData(True) |
|
683 |
linePropertyData['FluidCode'] = docData.getCodeTable('FluidCode', True) |
|
684 |
linePropertyData['UnitNumber'] = docData.getCodeTable('UnitNumber', True) |
|
685 |
linePropertyData['PnIDNumber'] = docData.getCodeTable('PnIDNumber', True) |
|
686 |
linePropertyData['PipingMaterialsClass'] = docData.getCodeTable('PipingMaterialsClass', True) |
|
687 |
linePropertyData['InsulationPurpose'] = docData.getCodeTable('InsulationPurpose', True) |
|
688 |
# |
|
682 | 689 |
configs = docData.getConfigs('Line No Tag Rule', 'Tag Seq No') |
683 | 690 |
tagSeqNoPattern = configs[0].value if 1 == len(configs) else None |
684 | 691 | |
... | ... | |
690 | 697 |
height = textInfo.getH() |
691 | 698 |
angle = round(math.radians(textInfo.getAngle()), 2) |
692 | 699 |
text = textInfo.getText() |
693 |
item = TextItemFactory.instance().createTextItem(text, delimiter, lineNoconfigs, sizeDataList, fluidCodeList, tagSeqNoPattern)
|
|
700 |
item = TextItemFactory.instance().createTextItem(text, delimiter, lineNoconfigs, linePropertyData, tagSeqNoPattern)
|
|
694 | 701 |
if item is not None: |
695 | 702 |
item.loc = (x, y) |
696 | 703 |
item.size = (width, height) |
... | ... | |
792 | 799 |
Jeongwoo 2018.06.18 Update Scene after all item added |
793 | 800 |
Add connect on unknown item |
794 | 801 |
Add [transfer] for using pyqtSignal |
802 |
kyouho 2018.07.12 Add line property logic |
|
795 | 803 |
''' |
796 | 804 |
def loadRecognitionResultFromXml(self, xmlPath): |
797 | 805 |
from xml.etree.ElementTree import Element, SubElement, dump, ElementTree, parse |
... | ... | |
837 | 845 |
configs = docData.getConfigs('Line No', 'Delimiter') |
838 | 846 |
delimiter = configs[0].value if 1 == len(configs) else '-' |
839 | 847 |
lineNoconfigs = docData.getConfigs('Line No', 'Configuration') |
840 |
sizeDataList = docData.getNomialPipeSizeData(True) |
|
841 |
fluidCodeList = docData.getFluidCodeData(True) |
|
848 |
# |
|
849 |
linePropertyData = {} |
|
850 |
linePropertyData['NominalDiameter'] = docData.getNomialPipeSizeData(True) |
|
851 |
linePropertyData['FluidCode'] = docData.getCodeTable('FluidCode', True) |
|
852 |
linePropertyData['UnitNumber'] = docData.getCodeTable('UnitNumber', True) |
|
853 |
linePropertyData['PnIDNumber'] = docData.getCodeTable('PnIDNumber', True) |
|
854 |
linePropertyData['PipingMaterialsClass'] = docData.getCodeTable('PipingMaterialsClass', True) |
|
855 |
linePropertyData['InsulationPurpose'] = docData.getCodeTable('InsulationPurpose', True) |
|
856 |
# |
|
842 | 857 |
configs = docData.getConfigs('Line No Tag Rule', 'Tag Seq No') |
843 | 858 |
tagSeqNoPattern = configs[0].value if 1 == len(configs) else None |
844 | 859 | |
... | ... | |
854 | 869 | |
855 | 870 |
name = text.find('NAME').text |
856 | 871 |
if name == 'TEXT': |
857 |
item = TextItemFactory.instance().createTextItem(value, delimiter, lineNoconfigs, sizeDataList, fluidCodeList, tagSeqNoPattern)
|
|
872 |
item = TextItemFactory.instance().createTextItem(value, delimiter, lineNoconfigs, linePropertyData, tagSeqNoPattern)
|
|
858 | 873 |
if item is not None: |
859 | 874 |
item.loc = (x, y) |
860 | 875 |
item.size = (width, height) |
내보내기 Unified diff