프로젝트

일반

사용자정보

개정판 dbf4904d

IDdbf4904db4f540036224c638cbb9c249b0c4369e
상위 de8b8993
하위 6bb36923

함의성이(가) 5년 이상 전에 추가함

issue #000: fix conn line

Change-Id: I992b0dd6fd91772f427fe5cbba6f329a721095fd

차이점 보기:

DTI_PID/DTI_PID/LineNoTracer.py
145 145
                                        Modify find secondary lines with 'while' used sublist for unconnected line
146 146
                    humkyung 2018.05.18 set start line's owner before tracing
147 147
    '''
148
    def execute(self, displayMessage, updateProgress, toler=300):
148
    def execute(self, displayMessage, updateProgress, toler=600):
149 149
        from EngineeringLineItem import QEngineeringLineItem
150 150
        from SymbolSvgItem import SymbolSvgItem
151 151
        from EngineeringRunItem import QEngineeringRunItem
......
172 172
                            startLine = line
173 173
                    if (startLine is not None) and (minDist < toler):
174 174
                        lineno.conns.append(startLine)
175
                        startLine.owner = lineno
176 175

  
177 176
                    if _from and _to and (type(_from) is QEngineeringLineItem or issubclass(type(_from), SymbolSvgItem)) and (type(_to) is QEngineeringLineItem or issubclass(type(_to), SymbolSvgItem)):
178 177
                        _from.owner = lineno
......
195 194
                # find secondary lines
196 195
                lines = self._lines
197 196
                self.find_secondary_lines(lines)
197

  
198
                # double check conn line cuz startLine may need first
199
                for lineno in self._lineNos:
200
                    lineno.conns.clear()
201
                    minDist = None
202
                    startLine = None
203
                    for line in [line for line in self._lines if line.owner is lineno]:
204
                        dist = line.distanceTo((lineno.center().x(), lineno.center().y()))
205
                        if (minDist is None) or (dist < minDist):
206
                            minDist = dist
207
                            startLine = line
208
                    if (startLine is not None) and (minDist < toler):
209
                        lineno.conns.append(startLine)
210

  
198 211
                if updateProgress: updateProgress.emit(maxValue)
199 212

  
200 213
            ### make trim lines

내보내기 Unified diff

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