wolfhece 2.0.49__py3-none-any.whl → 2.0.51__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/PyDraw.py CHANGED
@@ -6943,7 +6943,11 @@ class WolfMapViewer(wx.Frame):
6943
6943
  if r == wx.ID_YES:
6944
6944
  self.active_vector.close_force()
6945
6945
 
6946
- self.active_vector.parentzone.plot(prep = True)
6946
+ # force to prepare OpenGL to accelerate the plot
6947
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6948
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6949
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6950
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6947
6951
 
6948
6952
  elif self.action == 'modify vertices':
6949
6953
 
@@ -6951,7 +6955,10 @@ class WolfMapViewer(wx.Frame):
6951
6955
  self.end_action(_('End of vertices modification'))
6952
6956
 
6953
6957
  # force to prepare OpenGL to accelerate the plot
6954
- self.active_vector.parentzone.plot(prep = True)
6958
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6959
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6960
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6961
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6955
6962
  self.active_zones.find_minmax(True)
6956
6963
 
6957
6964
  self.active_vertex = None
@@ -6960,7 +6967,10 @@ class WolfMapViewer(wx.Frame):
6960
6967
  self.end_action(_('End of vertices insertion'))
6961
6968
 
6962
6969
  # force to prepare OpenGL to accelerate the plot
6963
- self.active_vector.parentzone.plot(prep = True)
6970
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6971
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6972
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6973
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6964
6974
  self.active_zones.find_minmax(True)
6965
6975
 
6966
6976
  self.active_vertex = None
@@ -6973,7 +6983,10 @@ class WolfMapViewer(wx.Frame):
6973
6983
  self.active_zones.find_minmax(True)
6974
6984
 
6975
6985
  # force to prepare OpenGL to accelerate the plot
6976
- self.active_vector.parentzone.plot(prep = True)
6986
+ # Le test not(self in self.linkedList) permet de ne pas créer le liste OpenGL en cas de multi-viewers
6987
+ # car une liste OpenGL ne sera pas tracée sur les autres fenêtres
6988
+ # C'est donc plus lent mais plus sûr pour que l'affichage dynamique soit correct
6989
+ self.active_vector.parentzone.plot(prep = not(self in self.linkedList))
6977
6990
 
6978
6991
  self.active_vertex = None
6979
6992
 
wolfhece/PyGui.py CHANGED
@@ -871,14 +871,14 @@ class Wolf2DModel(GenMapManager):
871
871
  fname = self.filenamegen + curextent
872
872
  if exists(fname):
873
873
  fname += '.txt'
874
- fhead.write_txt_header(fname,wolftype)
874
+ fhead.write_txt_header(fname, wolftype, forceupdate=True)
875
875
 
876
876
  mb = self.files_MB_array['Initial Conditions']
877
877
  for curextent,text,wolftype in mb:
878
878
  fname = self.filenamegen + curextent
879
879
  if exists(fname):
880
880
  fname += '.txt'
881
- mbhead.write_txt_header(fname,wolftype)
881
+ mbhead.write_txt_header(fname, wolftype, forceupdate=True)
882
882
 
883
883
  fname = self.filenamegen + '.lst'
884
884
  if not exists(fname):
@@ -130,6 +130,9 @@ class Triangulation(Element_To_Draw):
130
130
  buffer = gltf.buffers[bufferView.buffer]
131
131
  data = gltf.get_data_from_buffer_uri(buffer.uri)
132
132
 
133
+ logging.info(_('Importing GLTF file : {}').format(fn))
134
+ logging.info(_('Number of vertices : {}').format(accessor.count))
135
+
133
136
  # pull each vertex from the binary buffer and convert it into a tuple of python floats
134
137
  points = np.zeros([accessor.count, 3], order='F', dtype=np.float64)
135
138
  for i in range(accessor.count):
@@ -139,6 +142,9 @@ class Triangulation(Element_To_Draw):
139
142
 
140
143
  points[i, :] = np.asarray([v[0], -v[2], v[1]])
141
144
 
145
+ if np.mod(i,100000)==0:
146
+ logging.info(_('Reading vertex {}').format(i))
147
+
142
148
  accessor = gltf.accessors[primitive.indices]
143
149
 
144
150
  bufferView = gltf.bufferViews[accessor.bufferView]
@@ -153,6 +159,7 @@ class Triangulation(Element_To_Draw):
153
159
  size=12
154
160
  format='<LLL'
155
161
 
162
+ logging.info(_('Number of triangles : {}').format(int(accessor.count/3)))
156
163
  for i in range(int(accessor.count/3)):
157
164
 
158
165
  index = bufferView.byteOffset + accessor.byteOffset + i*size # the location in the buffer of this vertex
@@ -160,6 +167,9 @@ class Triangulation(Element_To_Draw):
160
167
  v = struct.unpack(format, d) # convert from base64 to three floats
161
168
  triangles.append(list(v))
162
169
 
170
+ if np.mod(i,100000)==0:
171
+ logging.info(_('Reading triangle {}').format(i))
172
+
163
173
  # On souhaite obtenir une triangulation du type :
164
174
  # - liste de coordonnées des sommets des triangles
165
175
  # - par triangle, liste de 3 indices, un pour chaque sommet
@@ -167,7 +177,9 @@ class Triangulation(Element_To_Draw):
167
177
  # Si le fichier GLTF vient de Blender, il y aura des informations de normales ...
168
178
  # Il est donc préférable de filtrer les points pour ne garder que des valeurs uniques
169
179
  # On ne souhaite pas gérer le GLTF dans toute sa généralité mais uniquement la triangulation de base
180
+ logging.info(_('Sorting information ...'))
170
181
  xyz_u,indices = np.unique(np.array(points),return_inverse=True,axis=0)
182
+ logging.info(_('Creating triangles ...'))
171
183
  triangles = [[indices[curtri[0]],indices[curtri[1]],indices[curtri[2]]] for curtri in list(triangles)]
172
184
 
173
185
  self.pts = xyz_u
@@ -1543,7 +1555,7 @@ class vector:
1543
1555
  return
1544
1556
 
1545
1557
  if self.myprop.imagevisible:
1546
-
1558
+
1547
1559
  if self.myprop.textureimage is None:
1548
1560
  self.myprop.load_unload_image()
1549
1561
 
wolfhece/apps/version.py CHANGED
@@ -5,7 +5,7 @@ class WolfVersion():
5
5
 
6
6
  self.major = 2
7
7
  self.minor = 0
8
- self.patch = 49
8
+ self.patch = 51
9
9
 
10
10
  def __str__(self):
11
11
 
wolfhece/wolf_array.py CHANGED
@@ -2015,7 +2015,7 @@ class Ops_Array(wx.Frame):
2015
2015
  if self.mapviewer is not None:
2016
2016
  if self.mapviewer.linked:
2017
2017
  if self.mapviewer.link_shareopsvect:
2018
- if self.myzones.parent in self.mapviewer.linkedList:
2018
+ if self.myzones.get_mapviewer() in self.mapviewer.linkedList:
2019
2019
  self.myzones.showstructure()
2020
2020
  return
2021
2021
 
@@ -2469,6 +2469,10 @@ class SelectionData():
2469
2469
  if len(curlist) == 0:
2470
2470
  return ''
2471
2471
 
2472
+ if curlist == 'all':
2473
+ txt += 'all\n'
2474
+ return txt
2475
+
2472
2476
  for cur in curlist:
2473
2477
  txt += str(cur[0]) + '\t' + str(cur[1]) + '\n'
2474
2478
 
@@ -4547,25 +4551,37 @@ class WolfArray(Element_To_Draw, header_wolf):
4547
4551
 
4548
4552
  fromarray: WolfArray
4549
4553
 
4554
+ # Récupération des bornes de la matrice source dans la matrice de destination
4550
4555
  i1, j1 = self.get_ij_from_xy(fromarray.origx, fromarray.origy)
4551
4556
  i2, j2 = self.get_ij_from_xy(fromarray.origx + fromarray.nbx * fromarray.dx,
4552
4557
  fromarray.origy + fromarray.nby * fromarray.dy)
4553
4558
 
4559
+ # Limitation des bornes à la matrice de destination
4554
4560
  i1 = max(0, i1)
4555
4561
  j1 = max(0, j1)
4556
4562
  i2 = min(self.nbx, i2)
4557
4563
  j2 = min(self.nby, j2)
4558
4564
 
4565
+ # Conversion des bornes utiles en coordonnées
4559
4566
  x1, y1 = self.get_xy_from_ij(i1, j1)
4560
4567
  x2, y2 = self.get_xy_from_ij(i2, j2)
4561
4568
 
4562
- i3, j3 = self.get_ij_from_xy(x1, y1)
4563
- i4, j4 = self.get_ij_from_xy(x2, y2)
4569
+ # Récupération des bornes utiles dans la matrice source
4570
+ i3, j3 = fromarray.get_ij_from_xy(x1, y1)
4571
+ i4, j4 = fromarray.get_ij_from_xy(x2, y2)
4564
4572
 
4573
+ # Sélection des valeurs non masquées
4574
+ # Attention : le résultat est en indices relatifs à [i3,j3] --> demande une conversion en indices absolus pour retrouver les valeurs dans la matrice complète
4565
4575
  usefulij = np.where(np.logical_not(fromarray.array.mask[i3:i4, j3:j4]))
4566
- usefulij[0][:] += i1
4567
- usefulij[1][:] += j1
4568
- self.array.data[usefulij] = fromarray.array.data[usefulij]
4576
+
4577
+ i5, j5 = self.get_ij_from_xy(x1, y1)
4578
+
4579
+ # Décalage des indices pour la matrice de destination
4580
+ usefulij_dest = (usefulij[0] + i5, usefulij[1] + j5)
4581
+ usefulij[0][:] += i3
4582
+ usefulij[1][:] += j3
4583
+
4584
+ self.array.data[usefulij_dest] = fromarray.array.data[usefulij]
4569
4585
 
4570
4586
  self.mask_data(self.nullvalue)
4571
4587
  self.reset_plot()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wolfhece
3
- Version: 2.0.49
3
+ Version: 2.0.51
4
4
  Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
5
5
  License: AGPL-v3 License
6
6
  Project-URL: Homepage, https://uee.uliege.be/hece
@@ -6,8 +6,8 @@ wolfhece/ManageParams.py,sha256=Wgt5Zh7QBtyiwTAltPHunSLqt4XuVuRH76GTUrXabS4,219
6
6
  wolfhece/Model1D.py,sha256=-cMz-ePSYzrKVVDidiDOz6cojEZ3y6u9gIb7RPwT6Y8,476593
7
7
  wolfhece/PyConfig.py,sha256=oGSL1WsLM9uinlNP4zGBLK3uHPmBfduUi7R-VtWuRFA,8034
8
8
  wolfhece/PyCrosssections.py,sha256=f4dNYRUGZKePruaaBiTcn5vlrw8TFTj9XwTDrdiF_uU,112450
9
- wolfhece/PyDraw.py,sha256=Zz2pcBUGA7s3FURP-4CPdoBqENtSrf-RLH1o-xZ6qrA,343578
10
- wolfhece/PyGui.py,sha256=LZtmQuEa0p-67iYyvLHJRK8uBs1zKmA3UqDzejWogy8,59795
9
+ wolfhece/PyDraw.py,sha256=nUHEMpTG0zJvBJYOnreTvAISeP7cLsx14Qyrv-y32OY,344956
10
+ wolfhece/PyGui.py,sha256=-LTnUVkRsqJw41DPN0jvhBOmDyygw6GgdGsno78cI_o,59833
11
11
  wolfhece/PyGuiHydrology.py,sha256=wKhR-KthPRyzJ887NmsozmUpm2CIQIwO3IbYORCYjrE,7290
12
12
  wolfhece/PyHydrographs.py,sha256=GKK8U0byI45H9O_e4LAOOi7Aw0Tg7Q0Lx322stPg5IQ,3453
13
13
  wolfhece/PyPalette.py,sha256=SYKYx_vxF_FVuceLhcIqFQsivGD6EoO_Xu-EGN9Ivko,22252
@@ -15,7 +15,7 @@ wolfhece/PyParams.py,sha256=-0cax_Db6kFTe46BAgT24Ga2Xyp2Dm3gpuI-5uUSMxw,84758
15
15
  wolfhece/PyPictures.py,sha256=-mJB0JL2YYiEK3D7_ssDkvYiMWK4ve9kXhozQXNeSx8,2216
16
16
  wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
17
17
  wolfhece/PyVertex.py,sha256=OFo8VFxTSViWSTzv2paHeJ9O5BkFUyamXrRPFamlWoU,39630
18
- wolfhece/PyVertexvectors.py,sha256=T3k8gIZA5Z89hfgJaV90sNeUbc31Shw3ZiOlmcTwl4g,217423
18
+ wolfhece/PyVertexvectors.py,sha256=fnUsCYZHL9WPweW_fBkq16MiyxWb6Kklwupwd5Y25qs,217974
19
19
  wolfhece/PyWMS.py,sha256=t6jVZpTxTNSLJxABk8A79cEMWTKoRM_S_SXRipsHLzw,4493
20
20
  wolfhece/RatingCurve.py,sha256=YSQvSvdMHE6hSlWVBF5Oe0-Fh3waNMpOdmcymaCCTis,21706
21
21
  wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
@@ -48,7 +48,7 @@ wolfhece/rain_SPWMI.py,sha256=YqsF-yFro3y_a6MfVRFfr-Rxi7NR1gl_i8VX7scmzes,13548
48
48
  wolfhece/test_Results2DGPU.py,sha256=NOJ_hFXrcLSQXS1dtsqXRQltqIZtDSHMz_EgAJ2_FHU,307
49
49
  wolfhece/textpillow.py,sha256=zEfLrKhfCDyMaVuQOUjHqz6MGKeQ4aewMxOsWi5-wKI,13832
50
50
  wolfhece/tools_mpl.py,sha256=q8Yc4aukPPiUcEzREvZRM_em67XqXaahdoaNt0DETfE,266
51
- wolfhece/wolf_array.py,sha256=ZdiL2UngJ3gpxu0in36bXqDXAFkNXfXgoNKlYshe5qI,288379
51
+ wolfhece/wolf_array.py,sha256=E6u0d6kABsegIZxPUZjtWS88lOrVc2d-lyW0uJgj6qo,289157
52
52
  wolfhece/wolf_hist.py,sha256=JpRXvzJLUP-RkSkvth3DQWglgTMFI2ZEUDb4RYOfeeI,3284
53
53
  wolfhece/wolf_texture.py,sha256=llQ7aV8scWXIkhpri9XjaPejzoBJsGfsln2ZnlRbFkU,16270
54
54
  wolfhece/wolf_tiles.py,sha256=F2JsJHdAP8fIffNJdG_J26bonCIRtIwMmxKFqdSCRDA,10088
@@ -66,7 +66,7 @@ wolfhece/apps/check_install.py,sha256=jrKR-njqnpIh6ZJqvP6KbDUPVCfwTNQj4glQhcyzs9
66
66
  wolfhece/apps/curvedigitizer.py,sha256=avWERHuVxPnJBOD_ibczwW_XG4vAenqWS8W1zjhBox8,4898
67
67
  wolfhece/apps/isocurrent.py,sha256=4XnNWPa8mYUK7V4zdDRFrHFIXNG2AN2og3TqWKKcqjY,3811
68
68
  wolfhece/apps/splashscreen.py,sha256=m9hMTqzhSUcTudApyNNjoAK9e2u5vgEkJVV79xmfM1s,2118
69
- wolfhece/apps/version.py,sha256=tejIrO28wyVtzgDMOfulj8-lCo6fAuZLVAHNwyLgfLM,388
69
+ wolfhece/apps/version.py,sha256=4x0IKF2qm1W3uxFB9BRzNjYqm8k_SyM9RGJ3UyHNjJo,388
70
70
  wolfhece/apps/wolf.py,sha256=gqfm-ZaUJqNsfCzmdtemSeqLw-GVdSVix-evg5WArJI,293
71
71
  wolfhece/apps/wolf2D.py,sha256=gWD9ee2-1pw_nUxjgRaJMuSe4kUT-RWhOeoTt_Lh1mM,267
72
72
  wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
@@ -256,8 +256,8 @@ wolfhece/sounds/sonsw2.wav,sha256=pFLVt6By0_EPQNt_3KfEZ9a1uSuYTgQSX1I_Zurv9Rc,11
256
256
  wolfhece/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
257
257
  wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=yGbU_JsF56jsmms0gh7mxa7tbNQ_SxqhpAZxhm-mTy4,14860
258
258
  wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=wCxGRnE3kzEkWlWA6-3X8ADOFux_B0a5QWJ2GnXTgJw,4709
259
- wolfhece-2.0.49.dist-info/METADATA,sha256=yvh37UvJwhh4d8FQvjpMLs2A9VYIMcuQRNmD02fszi8,2233
260
- wolfhece-2.0.49.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
261
- wolfhece-2.0.49.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
262
- wolfhece-2.0.49.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
263
- wolfhece-2.0.49.dist-info/RECORD,,
259
+ wolfhece-2.0.51.dist-info/METADATA,sha256=oDXRv7-KNrA4hjLZ-afljqgeZeZkzCwyCoUwXNtl-Cc,2233
260
+ wolfhece-2.0.51.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
261
+ wolfhece-2.0.51.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
262
+ wolfhece-2.0.51.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
263
+ wolfhece-2.0.51.dist-info/RECORD,,