wolfhece 2.2.30__py3-none-any.whl → 2.2.32__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/PyVertexvectors.py +22 -0
- wolfhece/analyze_poly.py +1189 -24
- wolfhece/apps/version.py +1 -1
- wolfhece/pydownloader.py +182 -0
- wolfhece/pypolygons_scen.py +7 -9
- wolfhece/wolf_array.py +147 -64
- {wolfhece-2.2.30.dist-info → wolfhece-2.2.32.dist-info}/METADATA +1 -1
- {wolfhece-2.2.30.dist-info → wolfhece-2.2.32.dist-info}/RECORD +11 -10
- {wolfhece-2.2.30.dist-info → wolfhece-2.2.32.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.30.dist-info → wolfhece-2.2.32.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.30.dist-info → wolfhece-2.2.32.dist-info}/top_level.txt +0 -0
wolfhece/PyVertexvectors.py
CHANGED
@@ -53,6 +53,11 @@ from .drawing_obj import Element_To_Draw
|
|
53
53
|
from .matplotlib_fig import Matplotlib_Figure as MplFig
|
54
54
|
from .PyPalette import wolfpalette
|
55
55
|
|
56
|
+
try:
|
57
|
+
from .pydownloader import download_file, toys_dataset
|
58
|
+
except ImportError as e:
|
59
|
+
raise Exception(_('Error importing pydownloader module'))
|
60
|
+
|
56
61
|
class Triangulation(Element_To_Draw):
|
57
62
|
""" Triangulation based on a listof vertices
|
58
63
|
and triangles enumerated by their vertex indices """
|
@@ -1246,6 +1251,14 @@ class vector:
|
|
1246
1251
|
if fromnumpy is not None:
|
1247
1252
|
self.add_vertices_from_array(fromnumpy)
|
1248
1253
|
|
1254
|
+
def __add__(self, other:"vector") -> "vector":
|
1255
|
+
""" Add two vectors together """
|
1256
|
+
if not isinstance(other, vector):
|
1257
|
+
raise TypeError("Can only add vector to vector")
|
1258
|
+
new_vector = vector(name=self.myname + '_' + other.myname)
|
1259
|
+
new_vector.myvertices = self.myvertices.copy() + other.myvertices.copy()
|
1260
|
+
return new_vector
|
1261
|
+
|
1249
1262
|
def add_value(self, key:str, value:Union[int,float,bool,str]):
|
1250
1263
|
""" Add a value to the properties """
|
1251
1264
|
self.myprop[key] = value
|
@@ -5923,6 +5936,15 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
5923
5936
|
if self.filename!='':
|
5924
5937
|
# lecture du fichier
|
5925
5938
|
|
5939
|
+
# Check if fname is an url
|
5940
|
+
_filename = str(self.filename).strip()
|
5941
|
+
if _filename.startswith('http:') or _filename.startswith('https:'):
|
5942
|
+
try:
|
5943
|
+
self.filename = str(download_file(_filename))
|
5944
|
+
except Exception as e:
|
5945
|
+
logging.error(_('Error while downloading file: %s') % e)
|
5946
|
+
return
|
5947
|
+
|
5926
5948
|
if self.filename.endswith('.dxf'):
|
5927
5949
|
self.is2D=False
|
5928
5950
|
self.import_dxf(self.filename)
|