wolfhece 2.0.5__py3-none-any.whl → 2.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wolfhece/GraphNotebook.py +0 -1
- wolfhece/GraphProfile.py +5 -14
- wolfhece/Lidar2002.py +0 -1
- wolfhece/PyCrosssections.py +21 -26
- wolfhece/PyDraw.py +219 -58
- wolfhece/PyGui.py +6 -3
- wolfhece/PyPalette.py +2 -2
- wolfhece/PyParams.py +48 -48
- wolfhece/PyVertex.py +1 -1
- wolfhece/PyVertexvectors.py +40 -4
- wolfhece/Results2DGPU.py +7 -6
- wolfhece/bernoulli/NetworkOpenGL.py +1 -1
- wolfhece/cli.py +7 -0
- wolfhece/flow_SPWMI.py +1 -1
- wolfhece/friction_law.py +6 -6
- wolfhece/gpuview.py +1 -1
- wolfhece/hydrology/PyWatershed.py +9 -10
- wolfhece/lagrangian/emitter.py +1 -1
- wolfhece/lagrangian/example_domain.py +1 -1
- wolfhece/lagrangian/velocity_field.py +4 -4
- wolfhece/libs/WolfDll.dll +0 -0
- wolfhece/libs/WolfDll_CD.dll +0 -0
- wolfhece/libs/WolfOGL.c +28187 -28187
- wolfhece/mesh2d/bc_manager.py +89 -13
- wolfhece/mesh2d/cst_2D_boundary_conditions.py +12 -0
- wolfhece/mesh2d/wolf2dprev.py +1 -2
- wolfhece/pydike.py +1 -1
- wolfhece/pyshields.py +43 -43
- wolfhece/pywalous.py +2 -2
- wolfhece/scenario/config_manager.py +3 -1
- wolfhece/ui/wolf_multiselection_collapsiblepane.py +10 -10
- wolfhece/wolf_array.py +1298 -418
- wolfhece/wolf_texture.py +1 -1
- wolfhece/wolfresults_2D.py +124 -19
- {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/METADATA +1 -1
- {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/RECORD +39 -38
- {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/WHEEL +0 -0
- {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.0.5.dist-info → wolfhece-2.0.6.dist-info}/top_level.txt +0 -0
wolfhece/GraphNotebook.py
CHANGED
@@ -576,7 +576,6 @@ class ManagerInterp(PlotPanel):
|
|
576
576
|
|
577
577
|
#redécoupage du vecteur selon des nouvelles abscisses curvi
|
578
578
|
curvec.myvertices=[]
|
579
|
-
curvec.nbvertices=0
|
580
579
|
for curs in snew:
|
581
580
|
mypt = curls.interpolate(curs)
|
582
581
|
curvec.add_vertex(wolfvertex(mypt.x,mypt.y,mypt.z))
|
wolfhece/GraphProfile.py
CHANGED
@@ -512,11 +512,11 @@ class PlotCSAll(ProfilePanel):
|
|
512
512
|
|
513
513
|
if reset:
|
514
514
|
self.zones = None
|
515
|
-
self.copy_nbvertices = None
|
515
|
+
# self.copy_nbvertices = None
|
516
516
|
self.copy_vertices = None
|
517
517
|
# added
|
518
518
|
self.copy_compare_vertices = None
|
519
|
-
self.copy_compare_nbvertices = None
|
519
|
+
# self.copy_compare_nbvertices = None
|
520
520
|
|
521
521
|
def update_plots(self, update_image=False):
|
522
522
|
#plots
|
@@ -1196,12 +1196,10 @@ class PlotCSAll(ProfilePanel):
|
|
1196
1196
|
self._update_drawings()
|
1197
1197
|
|
1198
1198
|
def _reset_profile_vertices(self):
|
1199
|
-
if self.copy_vertices and self.copy_nbvertices:
|
1199
|
+
if self.copy_vertices: # and self.copy_nbvertices:
|
1200
1200
|
self.mycs.myvertices = self.copy_vertices
|
1201
|
-
self.mycs.nbvertices = self.copy_nbvertices
|
1202
1201
|
# added
|
1203
1202
|
self.compare.myvertices = self.copy_compare_vertices
|
1204
|
-
self.compare.nbvertices = self.copy_compare_nbvertices
|
1205
1203
|
|
1206
1204
|
def update_profile_from_sz(self, event:wx.Event):
|
1207
1205
|
"""
|
@@ -1248,7 +1246,6 @@ class PlotCSAll(ProfilePanel):
|
|
1248
1246
|
|
1249
1247
|
self.mycs.reset_prepare()
|
1250
1248
|
self.mycs.myvertices=vertices
|
1251
|
-
self.mycs.nbvertices = nbv
|
1252
1249
|
|
1253
1250
|
self._update_drawings()
|
1254
1251
|
|
@@ -1353,9 +1350,9 @@ class PlotCSAll(ProfilePanel):
|
|
1353
1350
|
if self.compare:
|
1354
1351
|
# A copy of vertices is stored in memory to conserve the discretization of the initial profile.
|
1355
1352
|
self.copy_vertices = copy.deepcopy(self.mycs.myvertices)
|
1356
|
-
self.copy_nbvertices = copy.deepcopy(self.mycs.nbvertices)
|
1353
|
+
# self.copy_nbvertices = copy.deepcopy(self.mycs.nbvertices)
|
1357
1354
|
self.copy_compare_vertices = copy.deepcopy(self.compare.myvertices)
|
1358
|
-
self.copy_compare_nbvertices = copy.deepcopy(self.compare.nbvertices)
|
1355
|
+
# self.copy_compare_nbvertices = copy.deepcopy(self.compare.nbvertices)
|
1359
1356
|
|
1360
1357
|
# Resetting the crossections characteristics after modifications from the table (cpgrid)
|
1361
1358
|
self.mycs.reset_prepare()
|
@@ -1401,9 +1398,7 @@ class PlotCSAll(ProfilePanel):
|
|
1401
1398
|
length_compare = self.compare.asshapely_ls()
|
1402
1399
|
# Harmonized properties
|
1403
1400
|
cs_vertices = []
|
1404
|
-
cs_nb = 0
|
1405
1401
|
compare_vertices = []
|
1406
|
-
compare_nb = 0
|
1407
1402
|
|
1408
1403
|
# process
|
1409
1404
|
for i in new_sz:
|
@@ -1415,14 +1410,10 @@ class PlotCSAll(ProfilePanel):
|
|
1415
1410
|
curvert_compare = wolfvertex(coords_compare.x, coords_compare.y, coords_compare.z)
|
1416
1411
|
cs_vertices.append(curvert_cs)
|
1417
1412
|
compare_vertices.append(curvert_compare)
|
1418
|
-
cs_nb += 1
|
1419
|
-
compare_nb += 1
|
1420
1413
|
|
1421
1414
|
# Update of the 2 profiles characteristics
|
1422
1415
|
self.mycs.myvertices= cs_vertices
|
1423
|
-
self.mycs.nbvertices = cs_nb
|
1424
1416
|
self.compare.myvertices= compare_vertices
|
1425
|
-
self.compare.nbvertices = compare_nb
|
1426
1417
|
|
1427
1418
|
class windowsgrid(wx.Frame):
|
1428
1419
|
"""
|
wolfhece/Lidar2002.py
CHANGED
wolfhece/PyCrosssections.py
CHANGED
@@ -18,6 +18,7 @@ import wx
|
|
18
18
|
from typing import Union, Literal
|
19
19
|
|
20
20
|
from .PyTranslate import _
|
21
|
+
from .drawing_obj import Element_To_Draw
|
21
22
|
from .PyVertexvectors import vector,zone,Zones
|
22
23
|
from .PyVertex import wolfvertex,cloud_vertices, getIfromRGB
|
23
24
|
from .lazviewer.laz_viewer import xyz_laz_grids, myviewer
|
@@ -425,7 +426,6 @@ class profile(vector):
|
|
425
426
|
if sz.shape[1]==2 and xy1.shape==(2,) and xy2.shape==(2,):
|
426
427
|
if not np.array_equal(xy1,xy2):
|
427
428
|
self.myvertices=[]
|
428
|
-
self.nbvertices = 0
|
429
429
|
|
430
430
|
dx, dy = xy2[0]-xy1[0], xy2[1]-xy1[1]
|
431
431
|
norm = np.linalg.norm([dx,dy])
|
@@ -1159,8 +1159,6 @@ class profile(vector):
|
|
1159
1159
|
# Deep copies
|
1160
1160
|
# 1. Vertices
|
1161
1161
|
copied_profile.myvertices = copy.deepcopy(self.myvertices)
|
1162
|
-
# 2. Number of vertices
|
1163
|
-
copied_profile.nbvertices = copy.deepcopy(self.nbvertices)
|
1164
1162
|
# 3. The river banks
|
1165
1163
|
copied_profile.bankleft = copy.deepcopy(self.bankleft)
|
1166
1164
|
copied_profile.bankright = copy.deepcopy(self.bankright)
|
@@ -1670,7 +1668,7 @@ class profile(vector):
|
|
1670
1668
|
|
1671
1669
|
|
1672
1670
|
|
1673
|
-
class crosssections():
|
1671
|
+
class crosssections(Element_To_Draw):
|
1674
1672
|
"""
|
1675
1673
|
Gestion de sections en travers pour différents formats
|
1676
1674
|
- SPW 2000 --> format ='2000'
|
@@ -1705,7 +1703,12 @@ class crosssections():
|
|
1705
1703
|
myfile,
|
1706
1704
|
format:typing.Literal['2000','2022','vecz','sxy']='2022',
|
1707
1705
|
dirlaz:typing.Union[str, xyz_laz_grids] =r'D:\OneDrive\OneDrive - Universite de Liege\Crues\2021-07 Vesdre\CSC - Convention - ARNE\Data\LAZ_Vesdre\2023',
|
1708
|
-
mapviewer = None
|
1706
|
+
mapviewer = None,
|
1707
|
+
idx='',
|
1708
|
+
plotted=True) -> None:
|
1709
|
+
|
1710
|
+
|
1711
|
+
super().__init__(idx=idx, plotted= plotted, mapviewer=mapviewer, need_for_wx=False)
|
1709
1712
|
|
1710
1713
|
self.filename=myfile
|
1711
1714
|
self.myzones=None
|
@@ -1740,8 +1743,6 @@ class crosssections():
|
|
1740
1743
|
self.sorted = {}
|
1741
1744
|
self.plotted = False
|
1742
1745
|
|
1743
|
-
self.mapviewer = mapviewer
|
1744
|
-
|
1745
1746
|
if format=='2000':
|
1746
1747
|
self.format='2000'
|
1747
1748
|
lines.pop(0)
|
@@ -1872,7 +1873,6 @@ class crosssections():
|
|
1872
1873
|
cursect=curdict['cs']
|
1873
1874
|
|
1874
1875
|
cursect.myvertices = curvec.myvertices
|
1875
|
-
cursect.nbvertices = curvec.nbvertices
|
1876
1876
|
|
1877
1877
|
elif format=='sxy':
|
1878
1878
|
self.format='sxy'
|
@@ -1984,7 +1984,6 @@ class crosssections():
|
|
1984
1984
|
|
1985
1985
|
cursect = curdict['cs'] = profile(name=curvec.myname,parent=self)
|
1986
1986
|
cursect.myvertices = curvec.myvertices
|
1987
|
-
cursect.nbvertices = curvec.nbvertices
|
1988
1987
|
|
1989
1988
|
def get_linked_arrays(self):
|
1990
1989
|
"""
|
@@ -2064,17 +2063,14 @@ class crosssections():
|
|
2064
2063
|
|
2065
2064
|
newvec = vector(name='left',is2D=False,parentzone=newzone)
|
2066
2065
|
newvec.myvertices=left
|
2067
|
-
newvec.nbvertices=len(left)
|
2068
2066
|
newzone.add_vector(newvec)
|
2069
2067
|
|
2070
2068
|
newvec = vector(name='bed',is2D=False,parentzone=newzone)
|
2071
2069
|
newvec.myvertices=bed
|
2072
|
-
newvec.nbvertices=len(bed)
|
2073
2070
|
newzone.add_vector(newvec)
|
2074
2071
|
|
2075
2072
|
newvec = vector(name='right',is2D=False,parentzone=newzone)
|
2076
2073
|
newvec.myvertices=right
|
2077
|
-
newvec.nbvertices=len(right)
|
2078
2074
|
newzone.add_vector(newvec)
|
2079
2075
|
|
2080
2076
|
def link_external_zones(self,mylink:Zones):
|
@@ -2275,7 +2271,7 @@ class crosssections():
|
|
2275
2271
|
|
2276
2272
|
gltf.save(fn)
|
2277
2273
|
|
2278
|
-
def set_zones(self,forceupdate=False):
|
2274
|
+
def set_zones(self, forceupdate:bool=False):
|
2279
2275
|
if forceupdate:
|
2280
2276
|
self.myzone=None
|
2281
2277
|
self.myzones=None
|
@@ -2292,6 +2288,8 @@ class crosssections():
|
|
2292
2288
|
self.myzone.add_vector(curprof)
|
2293
2289
|
curprof.parentzone=self.myzone
|
2294
2290
|
|
2291
|
+
self._prep_listogl()
|
2292
|
+
|
2295
2293
|
def showstructure(self, parent=None, forceupdate=False):
|
2296
2294
|
self.set_zones()
|
2297
2295
|
self.myzones.showstructure(parent, forceupdate)
|
@@ -2344,12 +2342,6 @@ class crosssections():
|
|
2344
2342
|
|
2345
2343
|
self.set_zones(True)
|
2346
2344
|
|
2347
|
-
def check_plot(self):
|
2348
|
-
self.plotted = True
|
2349
|
-
|
2350
|
-
def uncheck_plot(self,unload=True):
|
2351
|
-
self.plotted = False
|
2352
|
-
|
2353
2345
|
def saveas(self,filename=None):
|
2354
2346
|
self.forcesuper=False
|
2355
2347
|
|
@@ -2467,7 +2459,7 @@ class crosssections():
|
|
2467
2459
|
|
2468
2460
|
return len(mysorted)
|
2469
2461
|
|
2470
|
-
def find_minmax(self,update=False):
|
2462
|
+
def find_minmax(self, update:bool=False):
|
2471
2463
|
if update:
|
2472
2464
|
for idx,vect in self.myprofiles.items():
|
2473
2465
|
vect['cs'].find_minmax()
|
@@ -2477,11 +2469,14 @@ class crosssections():
|
|
2477
2469
|
self.xmax=max(vect['cs'].xmax for idx,vect in self.myprofiles.items())
|
2478
2470
|
self.ymax=max(vect['cs'].ymax for idx,vect in self.myprofiles.items())
|
2479
2471
|
|
2480
|
-
def plot(self):
|
2472
|
+
def plot(self, sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None):
|
2473
|
+
""" Plotting cross-sections """
|
2481
2474
|
self.set_zones()
|
2482
|
-
self.myzones.plot()
|
2483
|
-
|
2484
|
-
|
2475
|
+
self.myzones.plot(sx, sy, xmin, ymin, xmax, ymax, size)
|
2476
|
+
|
2477
|
+
def _prep_listogl(self):
|
2478
|
+
""" Prepare list of GL objects """
|
2479
|
+
self.myzones.prep_listogl()
|
2485
2480
|
|
2486
2481
|
def saveas_wolfvec(self,filename:str):
|
2487
2482
|
|
@@ -3000,8 +2995,8 @@ class Interpolators():
|
|
3000
2995
|
"""
|
3001
2996
|
Constructeur de la classe Interpolators
|
3002
2997
|
|
3003
|
-
|
3004
|
-
|
2998
|
+
:param banks: Zones contenant les vecteurs supports
|
2999
|
+
:param cs: objet 'crosssections' contenant les sections en travers --> voir PyCrosssections
|
3005
3000
|
"""
|
3006
3001
|
|
3007
3002
|
self.mybanks = [curv for curzone in banks.myzones for curv in curzone.myvectors]
|