프로젝트

일반

사용자정보

개정판 f4f46071

IDf4f460718352c8433a249809123661f62f80b461
상위 7545b464
하위 81e2f8c4, 2115592c

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

issue #1201 Two_Phase 컬럼 2개 추가에 따른 Report 수정

Change-Id: I486a2517765244d01fcdffe16b84f3936c94c96d

차이점 보기:

HYTOS/HYTOS/MainWindow.py
1889 1889
                                        col_no += 1
1890 1890
                                        ws.cell(row_no, col_no, row[7])         # Quality
1891 1891
                                        col_no += 1
1892
                                        ws.cell(row_no, col_no, row[8])         # Density
1892
                                        ws.cell(row_no, col_no, row[8])         # Mean. Density
1893 1893
                                        col_no += 1
1894
                                        ws.cell(row_no, col_no, row[9])         # V.Density
1894
                                        ws.cell(row_no, col_no, row[9])         # Homo. Density
1895 1895
                                        col_no += 1
1896
                                        ws.cell(row_no, col_no, row[10])        # Mean.Vel
1896
                                        ws.cell(row_no, col_no, row[10])        # V.Density
1897 1897
                                        col_no += 1
1898
                                        ws.cell(row_no, col_no, row[11])        # Max.Vel
1898
                                        ws.cell(row_no, col_no, row[11])        # Mean.Vel
1899 1899
                                        col_no += 1
1900
                                        ws.cell(row_no, col_no, row[12])        # Ero.Vel
1900
                                        ws.cell(row_no, col_no, row[12])        # Homo.Vel
1901 1901
                                        col_no += 1
1902
                                        ws.cell(row_no, col_no, row[13])        # X
1902
                                        ws.cell(row_no, col_no, row[13])        # Max.Vel
1903 1903
                                        col_no += 1
1904
                                        ws.cell(row_no, col_no, row[14])        # Y
1904
                                        ws.cell(row_no, col_no, row[14])        # Ero.Vel
1905 1905
                                        col_no += 1
1906
                                        ws.cell(row_no, col_no, str(row[15]) if row[15] else '')    # Regime
1906
                                        ws.cell(row_no, col_no, row[15])        # Pattern X
1907 1907
                                        col_no += 1
1908
                                        ws.cell(row_no, col_no, row[16])        # Friction
1908
                                        ws.cell(row_no, col_no, row[16])        # Pattern Y
1909 1909
                                        col_no += 1
1910
                                        ws.cell(row_no, col_no, row[17])        # Gravity
1910
                                        ws.cell(row_no, col_no, str(row[17]) if row[17] else '')    # Regime
1911 1911
                                        col_no += 1
1912
                                        ws.cell(row_no, col_no, row[18])        # Moment
1912
                                        ws.cell(row_no, col_no, row[18])        # Friction
1913 1913
                                        col_no += 1
1914
                                        ws.cell(row_no, col_no, row[19])        # Total
1914
                                        ws.cell(row_no, col_no, row[19])        # Gravity
1915
                                        col_no += 1
1916
                                        ws.cell(row_no, col_no, row[20])        # Moment
1917
                                        col_no += 1
1918
                                        ws.cell(row_no, col_no, row[21])        # Total
1915 1919

  
1916 1920
                                        # load_regime
1917 1921
                                        length = row[2]
1918 1922
                                        if length is not None:
1919
                                            x = float(row[13])
1920
                                            y = float(row[14])
1923
                                            x = float(row[15])
1924
                                            y = float(row[16])
1921 1925

  
1922 1926
                                            angle = float(row[3])
1923 1927
                                            if angle == 0:
1924 1928
                                                # Horizontal
1925
                                                left = 57 + (546 / (7 + 5)) * (math.log10(x) + 5)
1926
                                                top = 651 - (649 / (5 + 9)) * (math.log10(y) + 9)
1929
                                                origin_x = 57
1930
                                                origin_y = 652
1931

  
1932
                                                image_min_x = 57
1933
                                                image_min_y = 2
1934
                                                image_max_x = 603
1935
                                                image_max_y = 651
1936
                                                left = origin_x + ((image_max_x - image_min_x) / (7 - (-5))) * (
1937
                                                            math.log10(x) - (-5))
1938
                                                top = origin_y - ((image_max_y - image_min_y) / (5 - (-9))) * (
1939
                                                            math.log10(y) - (-9))
1940

  
1927 1941
                                                horizontal.draw_regime(left, top, 8)
1942
                                                # horizontal.draw_regime(origin_x, origin_y, 8) # 0, 0 위치 확인 방법
1928 1943
                                            elif angle > 0:
1929 1944
                                                # Vertical Upward
1930
                                                left = 59 + (538 / (7 - (-2))) * (math.log10(x) - (-2))
1931
                                                top = 681 - (653 / (8 - (-5))) * (math.log10(y) - (-5))
1945
                                                origin_x = 59
1946
                                                origin_y = 681
1947

  
1948
                                                image_min_x = 60
1949
                                                image_min_y = 29
1950
                                                image_max_x = 596
1951
                                                image_max_y = 681
1952
                                                left = origin_x + ((image_max_x - image_min_x) / (7 - (-2))) * (
1953
                                                            math.log10(x) - (-2))
1954
                                                top = origin_y - ((image_max_y - image_min_y) / (8 - (-5))) * (
1955
                                                            math.log10(y) - (-5))
1956

  
1932 1957
                                                vertical_upward.draw_regime(left, top, 8)
1958
                                                # vertical_upward.draw_regime(origin_x, origin_y, 8) # 0, 0 위치 확인 방법
1933 1959
                                            elif angle < 0:
1934 1960
                                                # Vertical Downward
1935
                                                left = 55 + (517 / (20 - 0)) * (x - 0)
1936
                                                top = 656 - (635 / (24 - 2)) * (y - 2)
1961
                                                origin_x = 55
1962
                                                origin_y = 656
1963

  
1964
                                                image_min_x = 55
1965
                                                image_min_y = 21
1966
                                                image_max_x = 572
1967
                                                image_max_y = 656
1968
                                                left = origin_x + ((image_max_x - image_min_x) / (20 - 0)) * (x - 0)
1969
                                                top = origin_y - ((image_max_y - image_min_y) / (24 - 0)) * (y - 0)
1970

  
1937 1971
                                                vertical_downward.draw_regime(left, top, 8)
1972
                                                # vertical_downward.draw_regime(origin_x, origin_y, 8) # 0, 0 위치 확인 방법
1973

  
1938 1974
                                        row_no += 1
1939 1975

  
1940 1976
                                    with NamedTemporaryFile() as f:
......
1944 1980
                                    horizontal_flow_image = openpyxl.drawing.image.Image(horizontal_image_path)
1945 1981
                                    horizontal_flow_image.width *= 0.6
1946 1982
                                    horizontal_flow_image.height *= 0.6
1947
                                    ws.add_image(horizontal_flow_image, 'L3')
1983
                                    ws.add_image(horizontal_flow_image, 'L4')
1948 1984

  
1949 1985
                                    with NamedTemporaryFile() as f:
1950 1986
                                        vertical_upward_image_path = f.name + '.png'
......
1954 1990
                                        vertical_upward_image_path)
1955 1991
                                    vertical_upward_flow_image.width *= 0.6
1956 1992
                                    vertical_upward_flow_image.height *= 0.6
1957
                                    ws.add_image(vertical_upward_flow_image, 'R3')
1993
                                    ws.add_image(vertical_upward_flow_image, 'S3')
1958 1994

  
1959 1995
                                    with NamedTemporaryFile() as f:
1960 1996
                                        vertical_downward_image_path = f.name + '.png'
......
1964 2000
                                        vertical_downward_image_path)
1965 2001
                                    vertical_downward_flow_image.width *= 0.6
1966 2002
                                    vertical_downward_flow_image.height *= 0.6
1967
                                    ws.add_image(vertical_downward_flow_image, 'Z3')
2003
                                    ws.add_image(vertical_downward_flow_image, 'AA3')
1968 2004

  
1969 2005
                    active_sheet = wb.get_sheet_by_name('Page (1)')
1970 2006
                    if active_sheet:
HYTOS/HYTOS/PressureVariation.py
186 186
                    angle = float(self.ui.tableWidget.item(row, 4).text())
187 187
                    if angle == 0:
188 188
                        # Horizontal
189
                        left = 32 + (204 / (7 + 5)) * (math.log10(x) + 5)
190
                        top = 270 - (242 / (5 + 9)) * (math.log10(y) + 9)
189
                        origin_x = 32
190
                        origin_y = 270
191

  
192
                        image_min_x = 26
193
                        image_min_y = 6
194
                        image_max_x = 230
195
                        image_max_y = 249
196
                        left = origin_x + ((image_max_x - image_min_x) / (7 - (-5))) * (math.log10(x) - (-5))
197
                        top = origin_y - ((image_max_y - image_min_y) / (5 - (-9))) * (math.log10(y) - (-9))
191 198

  
192 199
                        label = QtWidgets.QLabel(self.ui.groupBox_4)
193 200
                        label.setText('■')
194 201
                        label.setStyleSheet('QLabel {color: blue;}')
195 202
                        label.setGeometry(QtCore.QRect(left, top, 8, 8))
203
                        # label.setGeometry(QtCore.QRect(origin_x, origin_y, 8, 8)) # 0, 0 위치 확인 방법
196 204
                    elif angle > 0:
197 205
                        # Vertical Upward
198
                        left = 35 + (209 / (7 - (-2))) * (math.log10(x) - (-2))
199
                        top = 269 - (237 / (8 - (-5))) * (math.log10(y) - (-5))
206
                        origin_x = 35
207
                        origin_y = 269
208

  
209
                        image_min_x = 29
210
                        image_min_y = 11
211
                        image_max_x = 238
212
                        image_max_y = 249
213
                        left = origin_x + ((image_max_x - image_min_x) / (7 - (-2))) * (math.log10(x) - (-2))
214
                        top = origin_y - ((image_max_y - image_min_y) / (8 - (-5))) * (math.log10(y) - (-5))
200 215

  
201 216
                        label = QtWidgets.QLabel(self.ui.groupBox_3)
202 217
                        label.setText('■')
203 218
                        label.setStyleSheet('QLabel {color: blue;}')
204 219
                        label.setGeometry(QtCore.QRect(left, top, 8, 8))
220
                        # label.setGeometry(QtCore.QRect(origin_x, origin_y, 8, 8)) # 0, 0 위치 확인 방법
205 221
                    elif angle < 0:
206 222
                        # Vertical Downward
207
                        left = 33 + (198 / (20 - 0)) * (x - 0)
208
                        top = 269 - (241 / (24 - 2)) * (y - 2)
223
                        origin_x = 33
224
                        origin_y = 269
225

  
226
                        image_min_x = 28
227
                        image_min_y = 7
228
                        image_max_x = 224
229
                        image_max_y = 247
230
                        left = origin_x + ((image_max_x - image_min_x) / (20 - 0)) * (x - 0)
231
                        top = origin_y - ((image_max_y - image_min_y) / (24 - 0)) * (y - 0)
209 232

  
210 233
                        label = QtWidgets.QLabel(self.ui.groupBox_5)
211 234
                        label.setText('■')
212 235
                        label.setStyleSheet('QLabel {color: blue;}')
213 236
                        label.setGeometry(QtCore.QRect(left, top, 8, 8))
237
                        # label.setGeometry(QtCore.QRect(origin_x, origin_y, 8, 8)) # 0, 0 위치 확인 방법
214 238
        except Exception as ex:
215 239
            from App import App
216 240
            from AppDocData import MessageType
......
242 266
                data[4] = round(row[4], 3) if row[4] is not None else None  # k
243 267
                data[5] = round(row[5], 3) if row[5] is not None else None  # pressure
244 268
                data[6] = round(row[6], 3) if row[6] is not None else None  # void
245
                data[7] = round(row[7], 3) if row[7] is not None else None  # quality
269
                data[7] = round(row[7], 3) if row[7] is not None else None  # quality6
246 270
                data[8] = round(row[8], 3) if row[8] is not None else None  # density
247 271
                data[9] = round(row[9], 3) if row[9] is not None else None  # homo_den 새로 추가됨
248 272
                data[10] = round(row[10], 3) if row[10] is not None else None  # v_den Index 9 -> 10로 변경

내보내기 Unified diff

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