Geometry: Meshing: Prepare code for next 'mailleurTT' version.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-05-13 14:27:24 +02:00
1 parent db87b1e214
commit ef583fc9bb
7 files changed
+204 -181

No files matched your search

+14 -6
View File
@@ -560,12 +560,20 @@ class Reach(SQLSubModel):
# Import/Export
def import_geometry(self, file_path_name: str):
if file_path_name.endswith(".st"):
return self.import_geometry_st(file_path_name)
elif file_path_name.endswith(".shp"):
return self.import_geometry_shp(file_path_name)
else:
return []
ext = file_path_name.split(".")
if len(ext) > 0:
ext = ext[-1].lower()
if ext in ['st', 'm']:
return self.import_geometry_st(file_path_name)
if ext in ['shp']:
return self.import_geometry_shp(file_path_name)
raise FileFormatError(
file_path_name,
f"Geometry file extention ({ext}) unkown"
)
@timer
def import_geometry_shp(self, file_path_name: str):