Support inp out v3
This commit is contained in:
@@ -12,8 +12,8 @@ from .s7_valves import inp_out_valve
|
||||
from .s8_tags import inp_out_tag
|
||||
from .s9_demands import inp_out_demand
|
||||
from .s10_status import inp_out_status
|
||||
from .s11_patterns import inp_out_pattern
|
||||
from .s12_curves import inp_out_curve
|
||||
from .s11_patterns import inp_out_pattern, inp_out_pattern_v3
|
||||
from .s12_curves import inp_out_curve, inp_out_curve_v3
|
||||
from .s13_controls import inp_out_control
|
||||
from .s14_rules import inp_out_rule
|
||||
from .s15_energy import inp_out_energy
|
||||
@@ -25,6 +25,7 @@ from .s20_mixing import inp_out_mixing
|
||||
from .s21_times import inp_out_time
|
||||
from .s22_report import inp_out_report
|
||||
from .s23_options import inp_out_option
|
||||
from .s23_options_v3 import inp_out_option_v3
|
||||
from .s24_coordinates import inp_out_coord
|
||||
from .s25_vertices import inp_out_vertex
|
||||
from .s26_labels import inp_out_label
|
||||
@@ -87,10 +88,16 @@ def dump_inp(project: str, inp: str, version: str = '3'):
|
||||
file.write('\n'.join(inp_out_status(project)))
|
||||
|
||||
elif name == PATTERNS:
|
||||
file.write('\n'.join(inp_out_pattern(project)))
|
||||
if version == '3':
|
||||
file.write('\n'.join(inp_out_pattern_v3(project)))
|
||||
else:
|
||||
file.write('\n'.join(inp_out_pattern(project)))
|
||||
|
||||
elif name == CURVES:
|
||||
file.write('\n'.join(inp_out_curve(project)))
|
||||
if version == '3':
|
||||
file.write('\n'.join(inp_out_curve_v3(project)))
|
||||
else:
|
||||
file.write('\n'.join(inp_out_curve(project)))
|
||||
|
||||
elif name == CONTROLS:
|
||||
file.write('\n'.join(inp_out_control(project)))
|
||||
@@ -123,7 +130,10 @@ def dump_inp(project: str, inp: str, version: str = '3'):
|
||||
file.write('\n'.join(inp_out_report(project)))
|
||||
|
||||
elif name == OPTIONS:
|
||||
file.write('\n'.join(inp_out_option(project)))
|
||||
if version == '3':
|
||||
file.write('\n'.join(inp_out_option_v3(project)))
|
||||
else:
|
||||
file.write('\n'.join(inp_out_option(project)))
|
||||
|
||||
elif name == COORDINATES:
|
||||
file.write('\n'.join(inp_out_coord(project)))
|
||||
@@ -198,10 +208,16 @@ def export_inp(project: str, version: str = '3') -> ChangeSet:
|
||||
inp += '\n'.join(inp_out_status(project))
|
||||
|
||||
elif name == PATTERNS:
|
||||
inp += '\n'.join(inp_out_pattern(project))
|
||||
if version == '3':
|
||||
inp += '\n'.join(inp_out_pattern_v3(project))
|
||||
else:
|
||||
inp += '\n'.join(inp_out_pattern(project))
|
||||
|
||||
elif name == CURVES:
|
||||
inp += '\n'.join(inp_out_curve(project))
|
||||
if version == '3':
|
||||
inp += '\n'.join(inp_out_curve_v3(project))
|
||||
else:
|
||||
inp += '\n'.join(inp_out_curve(project))
|
||||
|
||||
elif name == CONTROLS:
|
||||
inp += '\n'.join(inp_out_control(project))
|
||||
@@ -234,7 +250,10 @@ def export_inp(project: str, version: str = '3') -> ChangeSet:
|
||||
inp += '\n'.join(inp_out_report(project))
|
||||
|
||||
elif name == OPTIONS:
|
||||
inp += '\n'.join(inp_out_option(project))
|
||||
if version == '3':
|
||||
inp += '\n'.join(inp_out_option_v3(project))
|
||||
else:
|
||||
inp += '\n'.join(inp_out_option(project))
|
||||
|
||||
elif name == COORDINATES:
|
||||
inp += '\n'.join(inp_out_coord(project))
|
||||
|
||||
Reference in New Issue
Block a user