프로젝트

일반

사용자정보

개정판 4211450a

ID4211450ab3ff20e9b5a173da950ee062b697d332
상위 46483342
하위 5403f008

김연진이(가) 약 5년 전에 추가함

issue #1059 : 계산 결과 리포트

Change-Id: I282f035a8afc5a4ee9e09685b07e37f02499c605

차이점 보기:

HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py
55 55
            self._stream_no_text = None
56 56

  
57 57
            self._fittings = None
58
            self._geometry = None
58
            self._mixed_geometry = None
59
            self._mixed_calculation_result = None
59 60

  
60 61
            self.transfer = Transfer()
61 62
            self.setZValue(QEngineeringStreamlineItem.ZVALUE)
......
82 83
        self._fittings = value
83 84

  
84 85
    @property
85
    def geometry(self):
86
    def mixed_geometry(self):
86 87
        """ return fittings """
87
        return self._geometry
88
        return self._mixed_geometry
88 89

  
89
    @geometry.setter
90
    def geometry(self, value):
90
    @mixed_geometry.setter
91
    def mixed_geometry(self, value):
91 92
        """ set fittings with given value """
92
        self._geometry = value
93
        self._mixed_geometry = value
94

  
95
    @property
96
    def mixed_calculation_result(self):
97
        return self._mixed_calculation_result
98

  
99
    @mixed_calculation_result.setter
100
    def mixed_calculation_result(self, value):
101
        self._mixed_calculation_result = value
93 102

  
94 103
    @property
95 104
    def stream_no(self):
......
247 256
        self._pt = None
248 257
        self.isCreated = False
249 258

  
250
    def set_geometry(self):
259
    def set_mixed_geometry(self):
251 260
        from AppDocData import AppDocData
252 261

  
253
        geometry = []
262
        mixed_geometry = []
254 263

  
255 264
        app_doc_data = AppDocData.instance()
256 265
        geometry_input = app_doc_data.get_geometry_input(self.uid)
257 266
        for row in geometry_input:
258
            geometry.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9]))
267
            mixed_geometry.append((row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9]))
259 268

  
260
        self.geometry = geometry
269
        self.mixed_geometry = mixed_geometry
261 270

  
262 271
    def set_fittings(self):
263 272
        from AppDocData import AppDocData
......
907 916
                        res.append((sql, tuple(param)))
908 917

  
909 918
            # save geometry to database
910
            if self.geometry:
911
                for row in self.geometry:
919
            if self.mixed_geometry:
920
                for row in self.mixed_geometry:
912 921
                    cols = ['UID', 'Components_UID', 'Element', 'Nominal_Pipe_Size', 'Schedule_No', 'Inside_Pipe_Size',
913 922
                            'Roughness', 'Length', 'Angle', 'RPD', 'D1_D2', 'k']
914 923
                    values = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?']
......
959 968
            item.build_connectors(connectorItems, pointsUids)
960 969
            item.build_path()
961 970
            item.set_fittings()
962
            item.set_geometry()
971
            item.set_mixed_geometry()
963 972
            item.update()
964 973

  
965 974
        except Exception as ex:

내보내기 Unified diff

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