Clean curve v3 old inp in
This commit is contained in:
@@ -156,35 +156,6 @@ def inp_out_curve(name: str) -> list[str]:
|
||||
return lines
|
||||
|
||||
|
||||
'''def inp_in_curve_v3(section: list[str]) -> ChangeSet:
|
||||
types = {}
|
||||
curves: dict[str, list[dict[str, float]]] = {}
|
||||
|
||||
count = len(section)
|
||||
for i in range(0, count):
|
||||
if section[i].startswith(';'):
|
||||
continue
|
||||
|
||||
tokens = section[i].split()
|
||||
|
||||
# for EPA3
|
||||
if tokens[1] == 'PUMP' or tokens[1] == 'EFFICIENCY' or tokens[1] == 'VOLUME' or tokens[1] == 'HEADLOSS':
|
||||
types[tokens[0]] = tokens[1]
|
||||
continue
|
||||
|
||||
if tokens[0] not in curves:
|
||||
curves[tokens[0]] = []
|
||||
curves[tokens[0]].append({'x': float(tokens[1]), 'y': float(tokens[2])})
|
||||
|
||||
cs = ChangeSet()
|
||||
for id, coords in curves.items():
|
||||
c_type = types[id] if id in types else CURVE_TYPE_PUMP
|
||||
cs.append(g_add_prefix | {'type': 'curve', 'id' : id, 'c_type': c_type, 'coords' : coords})
|
||||
|
||||
#print(descs)
|
||||
return cs'''
|
||||
|
||||
|
||||
def inp_out_curve_v3(name: str) -> list[str]:
|
||||
lines = []
|
||||
types = read_all(name, f"select * from _curve")
|
||||
|
||||
Reference in New Issue
Block a user