프로젝트

일반

사용자정보

개정판 af3f3166

IDaf3f316677d164e9bb0a949d4304757114eb7b1b
상위 c1d03a50
하위 55ee6103, 43a14de4

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

cad

Change-Id: Idc81e75295784f0b0c4643e161b546ef348a9286

차이점 보기:

DTI_PID/DTI_PID/ImportTextFromCADDialog.py
290 290
        self.id2_bbox = None
291 291
        self.scales = None
292 292
        self.offsets = None
293
        self.areas = None
293 294

  
294 295
        self.isAccepted = False
295 296
 
......
1034 1035
                         (os.path.splitext(f)[1].upper() == '.XML')]
1035 1036

  
1036 1037
        self.text_scale = self.ui.doubleSpinBoxScale.value()
1038
        self.areas = app_doc_data.getAreaList()
1037 1039

  
1038 1040
        """get exclude layers mapping"""
1039 1041
        exclude_layers = []
......
1515 1517
            item.size = (_width, _height)
1516 1518
            item.angle = angle
1517 1519

  
1518
            app_doc_data = AppDocData.instance()
1519
            for area in app_doc_data.getAreaList():
1520
            for area in self.areas:
1520 1521
                if area.contains([loc[0], loc[1]]):
1521 1522
                    item.area = area.name
1522 1523
                    break
DTI_PID/DTI_PID/LineDetector.py
497 497

  
498 498
    def connectLineToSymbol(self, line, symbol, toler):
499 499
        try:
500
            '''
500 501
            start_pt = list(line.start_point())
501 502
            distStart = [(self.distanceTo(start_pt, (connector.center()[0], connector.center()[1])),
502 503
                          (connector.center()[0], connector.center()[1])) for connector in
......
512 513
            # there is no connectors
513 514
            if not (distStart and distEnd):
514 515
                return
516
            '''
515 517

  
516 518
            res = line.connect_if_possible(symbol, toler)
517 519
            if res:
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py
505 505
                rhs = [item.dir().x(), item.dir().y()]
506 506
                dot = sum([lhs[i] * rhs[i] for i in range(len(lhs))])
507 507
                angle = math.degrees(math.acos(dot / length))
508
                if (abs(angle) < 10) or (abs(angle - 180) < 10):
508
                if (abs(angle) < 10) or (abs(angle - 180) < 10) or len(item.parent.connectors) == 1:
509 509
                    _center = item.center()
510 510
                    dx = [start_pt[0] - _center[0], end_pt[0] - _center[0]]
511 511
                    dy = [start_pt[1] - _center[1], end_pt[1] - _center[1]]

내보내기 Unified diff

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