프로젝트

일반

사용자정보

개정판 cd0dc864

IDcd0dc8640b2ffbe258487b7c80a7253252d1c3b7
상위 a49fb2c8
하위 a5b0df7c

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

issue #563: spec break angle positioning added

Change-Id: Id6e90d29cdf895171908353e1522ad989c8de64f

차이점 보기:

DTI_PID/DTI_PID/LineNoTracer.py
749 749

  
750 750
                                if stream_res[0] and stream_res[1]:
751 751
                                    texts = [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringTextItem and item.owner is None]
752
                                    
752
                                    positioning = False
753

  
753 754
                                    for attr, value, value2 in spec[2:]:
754 755
                                        up_texts = [text for text in texts if text.text() == value]
755 756
                                        down_texts = [text for text in texts if text.text() == value2]
......
778 779
                                                        up_down_find[index].owner = stream_line[index]
779 780
                                                        break
780 781

  
781
                                            # set spec break position between
782
                                            new_x = round((up_down_find[0].center().x() + up_down_find[1].center().x()) / 2)
783
                                            new_y = round((up_down_find[0].center().y() + up_down_find[1].center().y()) / 2)
784
                                            spec_break.loc = [new_x - spec_break.symbolOrigin[0], new_y - spec_break.symbolOrigin[1]]
785
                                            spec_break.origin = [new_x, new_y]
786
                                            spec_break.angle = up_down_find[0].angle
782
                                            if not positioning:
783
                                                # set spec break position between
784
                                                positioning = True
785
                                                new_x = round((up_down_find[0].center().x() + up_down_find[1].center().x()) / 2)
786
                                                new_y = round((up_down_find[0].center().y() + up_down_find[1].center().y()) / 2)
787
                                                spec_break.loc = [new_x - spec_break.symbolOrigin[0], new_y - spec_break.symbolOrigin[1]]
788
                                                spec_break.origin = [new_x, new_y]
789
                                                if abs(up_down_find[0].center().x() - up_down_find[1].center().x()) < abs(up_down_find[0].center().y() - up_down_find[1].center().y()):
790
                                                    spec_break.angle = 1.57
791
                                                else:
792
                                                    spec_break.angle = 3.14
787 793
                                        
788 794
                                spec_break_items.append(spec_break)
789 795

  

내보내기 Unified diff

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