diff --git a/scripts/ep_workflow.py b/scripts/ep_workflow.py index 41996aac..4f103af9 100644 --- a/scripts/ep_workflow.py +++ b/scripts/ep_workflow.py @@ -1,3 +1,5 @@ +import glob +import os import sys from pathlib import Path import csv @@ -21,6 +23,11 @@ try: value = argument[1] if option == '-g': gml = value + out_path = (Path(__file__).parent.parent / 'out_files') + files = glob.glob(f'{out_path}/*') + for file in files: + if file != '.gitignore': + os.remove(file) print('[simulation start]') city = GeometryFactory('citygml', gml).city @@ -45,7 +52,7 @@ try: area += ground.perimeter_polygon.area print('exporting:') - out_path = (Path(__file__).parent.parent / 'out_files') + ExportsFactory('obj', city, out_path).export() print(' geometry exported...') # todo: _idf exporter does not catch errors in exporting