wolfhece 2.2.29__py3-none-any.whl → 2.2.31__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/PyCrosssections.py +36 -33
- wolfhece/PyDraw.py +13 -1
- wolfhece/PyVertexvectors.py +284 -100
- wolfhece/analyze_poly.py +1032 -24
- wolfhece/apps/version.py +1 -1
- wolfhece/pydownloader.py +182 -0
- wolfhece/pypolygons_scen.py +7 -9
- wolfhece/pyshields.py +166 -105
- wolfhece/wolf_array.py +40 -6
- {wolfhece-2.2.29.dist-info → wolfhece-2.2.31.dist-info}/METADATA +1 -1
- {wolfhece-2.2.29.dist-info → wolfhece-2.2.31.dist-info}/RECORD +14 -13
- {wolfhece-2.2.29.dist-info → wolfhece-2.2.31.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.29.dist-info → wolfhece-2.2.31.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.29.dist-info → wolfhece-2.2.31.dist-info}/top_level.txt +0 -0
wolfhece/PyCrosssections.py
CHANGED
@@ -1759,8 +1759,9 @@ class crosssections(Element_To_Draw):
|
|
1759
1759
|
f=open(myfile,'r')
|
1760
1760
|
lines=f.read().splitlines()
|
1761
1761
|
f.close()
|
1762
|
-
|
1763
|
-
|
1762
|
+
# For other formats (e.g. vecz)
|
1763
|
+
else:
|
1764
|
+
lines=[]
|
1764
1765
|
|
1765
1766
|
self.myprofiles={}
|
1766
1767
|
self.mygenprofiles={}
|
@@ -1880,36 +1881,6 @@ class crosssections(Element_To_Draw):
|
|
1880
1881
|
logging.debug(name)
|
1881
1882
|
|
1882
1883
|
nameprev=name
|
1883
|
-
elif format=='vecz' or format=='zones':
|
1884
|
-
|
1885
|
-
if isinstance(myfile, Zones):
|
1886
|
-
self.filename=myfile.filename
|
1887
|
-
tmpzones=myfile
|
1888
|
-
elif isinstance(myfile, str):
|
1889
|
-
self.filename=myfile
|
1890
|
-
tmpzones=Zones(myfile, find_minmax=False)
|
1891
|
-
|
1892
|
-
curzone:zone
|
1893
|
-
curvec:vector
|
1894
|
-
curzone=tmpzones.myzones[0]
|
1895
|
-
index=0
|
1896
|
-
for curvec in curzone.myvectors:
|
1897
|
-
|
1898
|
-
self.myprofiles[curvec.myname]={}
|
1899
|
-
curdict=self.myprofiles[curvec.myname]
|
1900
|
-
|
1901
|
-
curdict['index']=index
|
1902
|
-
curdict['left']=None
|
1903
|
-
curdict['bed']=None
|
1904
|
-
curdict['right']=None
|
1905
|
-
|
1906
|
-
index+=1
|
1907
|
-
curdict['cs']=profile(name=curvec.myname,parent=self)
|
1908
|
-
cursect:profile
|
1909
|
-
cursect=curdict['cs']
|
1910
|
-
|
1911
|
-
cursect.myvertices = curvec.myvertices
|
1912
|
-
|
1913
1884
|
elif format=='sxy':
|
1914
1885
|
self.format='sxy'
|
1915
1886
|
nbpotsect = int(lines[0])
|
@@ -1982,6 +1953,38 @@ class crosssections(Element_To_Draw):
|
|
1982
1953
|
cursect.bankright=wolfvertex(rbs,rbz)
|
1983
1954
|
curdict['right']=cursect.bankright
|
1984
1955
|
|
1956
|
+
# To make a distinction between cases for vecz
|
1957
|
+
elif len(lines)==0:
|
1958
|
+
if format=='vecz' or format=='zones':
|
1959
|
+
|
1960
|
+
if isinstance(myfile, Zones):
|
1961
|
+
self.filename=myfile.filename
|
1962
|
+
tmpzones=myfile
|
1963
|
+
elif isinstance(myfile, str):
|
1964
|
+
self.filename=myfile
|
1965
|
+
tmpzones=Zones(myfile, find_minmax=False)
|
1966
|
+
|
1967
|
+
curzone:zone
|
1968
|
+
curvec:vector
|
1969
|
+
curzone=tmpzones.myzones[0]
|
1970
|
+
index=0
|
1971
|
+
for curvec in curzone.myvectors:
|
1972
|
+
|
1973
|
+
self.myprofiles[curvec.myname]={}
|
1974
|
+
curdict=self.myprofiles[curvec.myname]
|
1975
|
+
|
1976
|
+
curdict['index']=index
|
1977
|
+
curdict['left']=None
|
1978
|
+
curdict['bed']=None
|
1979
|
+
curdict['right']=None
|
1980
|
+
|
1981
|
+
index+=1
|
1982
|
+
curdict['cs']=profile(name=curvec.myname,parent=self)
|
1983
|
+
cursect:profile
|
1984
|
+
cursect=curdict['cs']
|
1985
|
+
|
1986
|
+
cursect.myvertices = curvec.myvertices
|
1987
|
+
|
1985
1988
|
self.verif_bed()
|
1986
1989
|
self.find_minmax(True)
|
1987
1990
|
self.init_cloud()
|
@@ -2506,7 +2509,7 @@ class crosssections(Element_To_Draw):
|
|
2506
2509
|
self.xmax = 0
|
2507
2510
|
self.ymax = 0
|
2508
2511
|
return
|
2509
|
-
|
2512
|
+
|
2510
2513
|
if update:
|
2511
2514
|
for idx,vect in self.myprofiles.items():
|
2512
2515
|
vect['cs'].find_minmax(only_firstlast = True)
|
wolfhece/PyDraw.py
CHANGED
@@ -4208,6 +4208,15 @@ class WolfMapViewer(wx.Frame):
|
|
4208
4208
|
else:
|
4209
4209
|
return config[ConfigurationKeys.ACTIVE_VECTOR_COLOR]
|
4210
4210
|
|
4211
|
+
@property
|
4212
|
+
def active_vector_square_size(self) -> list[int]:
|
4213
|
+
""" Return the active vector square size from configs """
|
4214
|
+
config = self.get_configuration()
|
4215
|
+
if config is None:
|
4216
|
+
return 0
|
4217
|
+
else:
|
4218
|
+
return config[ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE]
|
4219
|
+
|
4211
4220
|
@property
|
4212
4221
|
def default_dem(self) -> Path:
|
4213
4222
|
""" Return the default DEM file from configs """
|
@@ -15081,8 +15090,10 @@ class WolfMapViewer(wx.Frame):
|
|
15081
15090
|
old = self.active_vector.myprop.color
|
15082
15091
|
self.active_vector.myprop.color = getIfromRGB(self.active_vector_color)
|
15083
15092
|
self.active_vector.plot()
|
15084
|
-
self.active_vector._plot_square_at_vertices()
|
15093
|
+
self.active_vector._plot_square_at_vertices(size = self.active_vector_square_size)
|
15085
15094
|
self.active_vector.myprop.color = old
|
15095
|
+
else:
|
15096
|
+
self.active_vector._plot_square_at_vertices(size = self.active_vector_square_size)
|
15086
15097
|
|
15087
15098
|
if self.active_vector.myprop.plot_indices:
|
15088
15099
|
self.active_vector._plot_all_indices(sx = self.sx, sy=self.sy,
|
@@ -15328,6 +15339,7 @@ class WolfMapViewer(wx.Frame):
|
|
15328
15339
|
self.Active_zone(vect.parentzone)
|
15329
15340
|
|
15330
15341
|
self.mimicme()
|
15342
|
+
self.Paint()
|
15331
15343
|
|
15332
15344
|
def Active_zone(self, zone: zone):
|
15333
15345
|
""" Active une zone et son parent si existant """
|