diff --git a/bathymetry/config.ini b/bathymetry/config.ini index 700e20b..414061b 100644 --- a/bathymetry/config.ini +++ b/bathymetry/config.ini @@ -12,22 +12,13 @@ root = 0_data bathy = MNT_COTIER_BAIE_SJL_TANDEM_20m_WGS84_NM_ZNEG.glz artha = artha_coords.csv base_scad = base.scad -points = points.csv blocs = bloc0.csv,bloc1.csv [scad] root = 1_scad -bathy = bathy.scad -bloc0 = bloc0.scad -bloc1 = bloc1.scad -rubble = rub.scad [stl] root = 2_stl -bathy = bathy.stl -bloc0 = bloc0.stl -bloc1 = bloc1.stl -rubble = rub.stl [pandas] root = 3_pd diff --git a/bathymetry/generate/__main__.py b/bathymetry/generate/__main__.py index eca203a..b4432fc 100644 --- a/bathymetry/generate/__main__.py +++ b/bathymetry/generate/__main__.py @@ -117,7 +117,7 @@ with open(folders['data'].joinpath(config['data']['base_scad'])) as bsf: for (name, data) in data_dict.items(): log.info(f'Generating {name}') log.info('\tGenerating SCAD file') - scad_file = folders['scad'].joinpath(config['scad'][name]) + scad_file = folders['scad'].joinpath(f'{name}.scad') with open(scad_file, 'w') as osf: osf.write(base_scad.format( np.array2string( @@ -128,7 +128,7 @@ for (name, data) in data_dict.items(): )) log.info('\tGenerating STL file') subprocess.run(('openscad', scad_file, '-o', - folders['stl'].joinpath(config['stl'][name])), + folders['stl'].joinpath(f'{name}.stl')), check=True, capture_output=True)