@@ -66,12 +66,12 @@ def mesh_area_names(self) -> List[str]:
66
66
List[str]
67
67
A list of the 2D mesh area names (str) within the RAS geometry if 2D areas exist.
68
68
"""
69
- if "/Geometry/2D Flow Areas" not in self :
69
+ if self . FLOW_AREA_2D_PATH not in self :
70
70
return list ()
71
71
return list (
72
72
[
73
73
convert_ras_hdf_string (n )
74
- for n in self ["/Geometry/2D Flow Areas /Attributes" ][()]["Name" ]
74
+ for n in self [f" { self . FLOW_AREA_2D_PATH } /Attributes" ][()]["Name" ]
75
75
]
76
76
)
77
77
@@ -87,7 +87,7 @@ def mesh_areas(self) -> GeoDataFrame:
87
87
if not mesh_area_names :
88
88
return GeoDataFrame ()
89
89
mesh_area_polygons = [
90
- Polygon (self [f"/Geometry/2D Flow Areas /{ n } /Perimeter" ][()])
90
+ Polygon (self [f"{ self . FLOW_AREA_2D_PATH } /{ n } /Perimeter" ][()])
91
91
for n in mesh_area_names
92
92
]
93
93
return GeoDataFrame (
@@ -112,13 +112,13 @@ def mesh_cell_polygons(self) -> GeoDataFrame:
112
112
113
113
cell_dict = {"mesh_name" : [], "cell_id" : [], "geometry" : []}
114
114
for i , mesh_name in enumerate (mesh_area_names ):
115
- cell_cnt = self ["/Geometry/2D Flow Areas /Cell Info" ][()][i ][1 ]
115
+ cell_cnt = self [f" { self . FLOW_AREA_2D_PATH } /Cell Info" ][()][i ][1 ]
116
116
cell_ids = list (range (cell_cnt ))
117
117
cell_face_info = self [
118
- f"/Geometry/2D Flow Areas /{ mesh_name } /Cells Face and Orientation Info"
118
+ f"{ self . FLOW_AREA_2D_PATH } /{ mesh_name } /Cells Face and Orientation Info"
119
119
][()]
120
120
cell_face_values = self [
121
- f"/Geometry/2D Flow Areas /{ mesh_name } /Cells Face and Orientation Values"
121
+ f"{ self . FLOW_AREA_2D_PATH } /{ mesh_name } /Cells Face and Orientation Values"
122
122
][()][:, 0 ]
123
123
face_id_lists = list (
124
124
np .vectorize (
@@ -169,8 +169,8 @@ def mesh_cell_points(self) -> GeoDataFrame:
169
169
return GeoDataFrame ()
170
170
pnt_dict = {"mesh_name" : [], "cell_id" : [], "geometry" : []}
171
171
for i , mesh_name in enumerate (mesh_area_names ):
172
- starting_row , count = self ["/Geometry/2D Flow Areas /Cell Info" ][()][i ]
173
- cell_pnt_coords = self ["/Geometry/2D Flow Areas /Cell Points" ][()][
172
+ starting_row , count = self [f" { self . FLOW_AREA_2D_PATH } /Cell Info" ][()][i ]
173
+ cell_pnt_coords = self [f" { self . FLOW_AREA_2D_PATH } /Cell Points" ][()][
174
174
starting_row : starting_row + count
175
175
]
176
176
pnt_dict ["mesh_name" ] += [mesh_name ] * cell_pnt_coords .shape [0 ]
@@ -196,16 +196,16 @@ def mesh_cell_faces(self) -> GeoDataFrame:
196
196
face_dict = {"mesh_name" : [], "face_id" : [], "geometry" : []}
197
197
for mesh_name in mesh_area_names :
198
198
facepoints_index = self [
199
- f"/Geometry/2D Flow Areas /{ mesh_name } /Faces FacePoint Indexes"
199
+ f"{ self . FLOW_AREA_2D_PATH } /{ mesh_name } /Faces FacePoint Indexes"
200
200
][()]
201
201
facepoints_coordinates = self [
202
- f"/Geometry/2D Flow Areas /{ mesh_name } /FacePoints Coordinate"
202
+ f"{ self . FLOW_AREA_2D_PATH } /{ mesh_name } /FacePoints Coordinate"
203
203
][()]
204
204
faces_perimeter_info = self [
205
- f"/Geometry/2D Flow Areas /{ mesh_name } /Faces Perimeter Info"
205
+ f"{ self . FLOW_AREA_2D_PATH } /{ mesh_name } /Faces Perimeter Info"
206
206
][()]
207
207
faces_perimeter_values = self [
208
- f"/Geometry/2D Flow Areas /{ mesh_name } /Faces Perimeter Values"
208
+ f"{ self . FLOW_AREA_2D_PATH } /{ mesh_name } /Faces Perimeter Values"
209
209
][()]
210
210
face_id = - 1
211
211
for pnt_a_index , pnt_b_index in facepoints_index :
0 commit comments