프로젝트

일반

사용자정보

개정판 9105828a

ID9105828aae59913d207eb9199d14286ed7f7343f
상위 f6a710cb
하위 b7470d38, 328ca90a

함의성이(가) 약 2년 전에 추가함

cad

Change-Id: If64b94642a704e85f25981b3ac5ba4e5d4f438c7

차이점 보기:

DTI_PID/DTI_PID/ImportTextFromCADDialog.py
844 844
            self.ui.listViewExcludeLayers.model().append_layers(self._layer_names)
845 845
            mainWnd.progress_bar.setValue(mainWnd.progress_bar.maximum())
846 846

  
847
            if self.ui.checkBoxGenDrawing.checkState():
848
                mainWnd.load_drawing_list()
849

  
847 850
            self._symbol_types.sort()
848 851
            self._layer_names.sort()
849 852

  
DTI_PID/DTI_PID/ImportTextFromCAD_UI.py
2 2

  
3 3
# Form implementation generated from reading ui file './UI/ImportTextFromCAD.ui'
4 4
#
5
# Created by: PyQt5 UI code generator 5.9.2
5
# Created by: PyQt5 UI code generator 5.15.4
6 6
#
7
# WARNING! All changes made in this file will be lost!
7
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8
# run again.  Do not edit this file unless you know what you are doing.
9

  
8 10

  
9 11
from PyQt5 import QtCore, QtGui, QtWidgets
10 12

  
13

  
11 14
class Ui_ImportTextFromCADDialog(object):
12 15
    def setupUi(self, ImportTextFromCADDialog):
13 16
        ImportTextFromCADDialog.setObjectName("ImportTextFromCADDialog")
......
160 163
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
161 164
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
162 165
        self.checkBoxLine = QtWidgets.QCheckBox(ImportTextFromCADDialog)
163
        self.checkBoxLine.setChecked(False)
166
        self.checkBoxLine.setChecked(True)
164 167
        self.checkBoxLine.setObjectName("checkBoxLine")
165 168
        self.horizontalLayout_2.addWidget(self.checkBoxLine)
166 169
        self.checkBoxText = QtWidgets.QCheckBox(ImportTextFromCADDialog)
......
168 171
        self.checkBoxText.setObjectName("checkBoxText")
169 172
        self.horizontalLayout_2.addWidget(self.checkBoxText)
170 173
        self.checkBoxSymbol = QtWidgets.QCheckBox(ImportTextFromCADDialog)
174
        self.checkBoxSymbol.setChecked(True)
171 175
        self.checkBoxSymbol.setObjectName("checkBoxSymbol")
172 176
        self.horizontalLayout_2.addWidget(self.checkBoxSymbol)
173 177
        self.checkBoxLegend = QtWidgets.QCheckBox(ImportTextFromCADDialog)
......
250 254
        self.checkBoxLegend.setText(_translate("ImportTextFromCADDialog", "Legend"))
251 255
        self.label_2.setText(_translate("ImportTextFromCADDialog", "AutoCAD Files : "))
252 256
        self.checkBoxGenDrawing.setText(_translate("ImportTextFromCADDialog", "Gen. Drawing"))
253

  
254 257
import MainWindow_rc
255 258

  
259

  
256 260
if __name__ == "__main__":
257 261
    import sys
258 262
    app = QtWidgets.QApplication(sys.argv)
......
261 265
    ui.setupUi(ImportTextFromCADDialog)
262 266
    ImportTextFromCADDialog.show()
263 267
    sys.exit(app.exec_())
264

  
DTI_PID/DTI_PID/MainWindow.py
784 784
        configs = app_doc_data.getConfigs('Line Detector', 'Length to connect line')
785 785
        toler = int(configs[0].value) if configs else 20
786 786
        count = self.connect_line_to_symbol(5, True)
787
        self.connect_line_to_symbol(toler, False, count)
787
        #self.connect_line_to_symbol(toler, False, count)
788 788

  
789 789
        self.progress_bar.setValue(self.progress_bar.maximum())
790 790
        QApplication.processEvents()
......
812 812
            item.transfer.onRemoved.emit(item)
813 813

  
814 814
        if start:
815
            self.progress_bar.setMaximum((len(lines) + len(symbols)) * 4 + 1)
815
            self.progress_bar.setMaximum((len(lines) + len(symbols)) * 2 + 3)
816 816
            count = 1
817 817
            self.progress_bar.setValue(count)
818 818
            QApplication.processEvents()
......
822 822
            for symbol in symbols:
823 823
                matches = [it for it in symbols if it is not symbol and symbol.is_connectable(it, toler=toler)]
824 824
                for match in matches:
825
                    symbol.connect_if_possible(match, toler=int(toler / 5 * 3))
825
                    symbol.connect_if_possible(match, toler=int(toler))
826 826
                
827 827
                count += 2
828 828
                self.progress_bar.setValue(count)
......
923 923
                    for conn in symbol.connectors:
924 924
                        dist = originPoint.distance(Point(conn.sceneConnectPoint[0], conn.sceneConnectPoint[1]))
925 925
                        if not conn.connectedItem or not issubclass(type(conn.connectedItem), QEngineeringAbstractItem) or \
926
                            [pair for pair in usedItemPairs if symbol in pair and conn.connectedItem in pair] or dist > 3 * toler or dist > minD:
926
                            [pair for pair in usedItemPairs if symbol in pair and conn.connectedItem in pair] or dist > 12 * toler or dist > minD:
927 927
                            continue
928 928

  
929 929
                        minD = dist
......
935 935
                        dist = originPoint.distance(Point(conn.sceneConnectPoint[0], conn.sceneConnectPoint[1]))
936 936
                        if not conn.connectedItem or not issubclass(type(conn.connectedItem), QEngineeringAbstractItem) or \
937 937
                            conn._connected_at != QEngineeringAbstractItem.CONNECTED_AT_BODY  or \
938
                            [pair for pair in usedItemPairs if line in pair and conn.connectedItem in pair] or dist > 3 * toler or dist > minD:
938
                            [pair for pair in usedItemPairs if line in pair and conn.connectedItem in pair] or dist > 12 * toler or dist > minD:
939 939
                            continue
940 940

  
941 941
                        minD = dist
DTI_PID/DTI_PID/UI/ImportTextFromCAD.ui
300 300
          <string>Line</string>
301 301
         </property>
302 302
         <property name="checked">
303
          <bool>false</bool>
303
          <bool>true</bool>
304 304
         </property>
305 305
        </widget>
306 306
       </item>
......
319 319
         <property name="text">
320 320
          <string>Symbol</string>
321 321
         </property>
322
         <property name="checked">
323
          <bool>true</bool>
324
         </property>
322 325
        </widget>
323 326
       </item>
324 327
       <item>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)