Skip to content

Commit 3fa9a48

Browse files
committed
removed functions that were moved before
1 parent 7b693c2 commit 3fa9a48

File tree

1 file changed

+6
-57
lines changed

1 file changed

+6
-57
lines changed

pyNastran/f06/dev/flutter/gui_flutter.py

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
TODO: add default directory so when an f06 is bad, you don't
3+
have to keep changing the directory
4+
"""
15
import os
26
import sys
37
import copy
@@ -63,6 +67,8 @@
6367

6468
# FONT_SIZE = 12
6569
from pyNastran.f06.dev.flutter.utils import (
70+
get_point_removal_str,
71+
point_removal_str_to_point_removal,
6672
get_plot_file, update_ylog_style, load_f06_op2,
6773
get_png_filename,)
6874

@@ -2219,63 +2225,6 @@ def log_error(self, msg: str) -> None:
22192225
print(f'ERROR: {msg}')
22202226

22212227

2222-
def get_point_removal_str(point_removal: list[tuple[float, float]]):
2223-
"""
2224-
>>> point_removal = [[400.0, 410.0], [450.0, 500.0]]
2225-
point_removal_str = get_point_removal_str(point_removal)
2226-
>>> point_removal_str
2227-
'400:410,450:500'
2228-
2229-
>>> point_removal = [[450.0, -1.0]]
2230-
point_removal_str = get_point_removal_str(point_removal)
2231-
>>> point_removal_str
2232-
'450:'
2233-
2234-
>>> point_removal = [[-1.0, 500.0]]
2235-
point_removal_str = get_point_removal_str(point_removal)
2236-
>>> point_removal_str
2237-
':500'
2238-
"""
2239-
out = []
2240-
for mini, maxi in point_removal:
2241-
if mini > 0 and maxi > 0:
2242-
outi = f'{mini:g}:{maxi:g}'
2243-
elif mini > 0:
2244-
outi = f'{mini:g}:'
2245-
elif maxi > 0:
2246-
outi = f'{maxi:g}:'
2247-
else:
2248-
continue
2249-
out.append(outi)
2250-
point_removal_str = ','.join(out)
2251-
return point_removal_str
2252-
2253-
2254-
def point_removal_str_to_point_removal(point_removal_str: str,
2255-
log: SimpleLogger) -> list[tuple[float, float]]:
2256-
point_removal = []
2257-
point_removal_list = point_removal_str.split(',')
2258-
2259-
if point_removal_list == ['']:
2260-
pass
2261-
else:
2262-
try:
2263-
for ipoint, point in enumerate(point_removal_list):
2264-
sline = point.split(':')
2265-
assert len(sline) == 2, f'point_removal[{ipoint}]={sline}; point_removal={str(point_removal_list)}'
2266-
a_str = sline[0].strip()
2267-
b_str = sline[1].strip()
2268-
a = float(a_str) if a_str != '' else -1.0
2269-
b = float(b_str) if b_str != '' else -1.0
2270-
point_float = (a, b)
2271-
point_removal.append(point_float)
2272-
except Exception as e:
2273-
log.error(str(e))
2274-
# print(traceback.print_tb(e))
2275-
print(traceback.print_exception(e))
2276-
return point_removal
2277-
2278-
22792228
def get_selected_items_flat(list_widget: QListWidget) -> list[str]:
22802229
items = list_widget.selectedItems()
22812230
texts = []

0 commit comments

Comments
 (0)