wolfhece 2.1.97__py3-none-any.whl → 2.1.98__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/PyConfig.py +5 -8
- wolfhece/PyDraw.py +109 -22
- wolfhece/PyVertexvectors.py +5 -8
- wolfhece/apps/version.py +1 -1
- wolfhece/wolf_array.py +19 -0
- {wolfhece-2.1.97.dist-info → wolfhece-2.1.98.dist-info}/METADATA +1 -1
- {wolfhece-2.1.97.dist-info → wolfhece-2.1.98.dist-info}/RECORD +10 -10
- {wolfhece-2.1.97.dist-info → wolfhece-2.1.98.dist-info}/WHEEL +0 -0
- {wolfhece-2.1.97.dist-info → wolfhece-2.1.98.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.1.97.dist-info → wolfhece-2.1.98.dist-info}/top_level.txt +0 -0
    
        wolfhece/PyConfig.py
    CHANGED
    
    | @@ -32,8 +32,7 @@ class ConfigurationKeys(Enum): | |
| 32 32 | 
             
                ASSEMBLY_IMAGES = "AssemblyImages"
         | 
| 33 33 |  | 
| 34 34 | 
             
            class WolfConfiguration:
         | 
| 35 | 
            -
                """ Holds the PyWolf configuration | 
| 36 | 
            -
                """
         | 
| 35 | 
            +
                """ Holds the PyWolf configuration """
         | 
| 37 36 |  | 
| 38 37 | 
             
                def __init__(self, path=None):
         | 
| 39 38 | 
             
                    # We make sure we use a standard location
         | 
| @@ -86,7 +85,6 @@ class WolfConfiguration: | |
| 86 85 | 
             
                        ConfigurationKeys.ASSEMBLY_IMAGES.value: int
         | 
| 87 86 | 
             
                    }
         | 
| 88 87 |  | 
| 89 | 
            -
             | 
| 90 88 | 
             
                    self._check_config()
         | 
| 91 89 |  | 
| 92 90 | 
             
                def _check_config(self):
         | 
| @@ -131,7 +129,7 @@ class GlobalOptionsDialog(wx.Dialog): | |
| 131 129 | 
             
                    super(GlobalOptionsDialog, self).__init__(*args, **kw)
         | 
| 132 130 |  | 
| 133 131 | 
             
                    self.InitUI()
         | 
| 134 | 
            -
                    self.SetSize(( | 
| 132 | 
            +
                    self.SetSize((600, 400))
         | 
| 135 133 | 
             
                    self.SetTitle(_("Global options"))
         | 
| 136 134 |  | 
| 137 135 | 
             
                def push_configuration(self, configuration):
         | 
| @@ -196,9 +194,8 @@ class GlobalOptionsDialog(wx.Dialog): | |
| 196 194 | 
             
                    self.cfg_ticks_size = wx.TextCtrl(pnl, value='500.',style = wx.TE_CENTRE )
         | 
| 197 195 |  | 
| 198 196 | 
             
                    hboxticks.Add(self.label_ticks_size, 1, wx.EXPAND)
         | 
| 199 | 
            -
                    hboxticks.Add(self.cfg_ticks_size, 1, wx.EXPAND)
         | 
| 200 | 
            -
             | 
| 201 | 
            -
                    sbs.Add(hboxticks, 1, wx.EXPAND)
         | 
| 197 | 
            +
                    hboxticks.Add(self.cfg_ticks_size, 1, wx.EXPAND, 5)
         | 
| 198 | 
            +
                    sbs.Add(hboxticks, 1, wx.EXPAND,5)
         | 
| 202 199 |  | 
| 203 200 | 
             
                    self.cfg_ticks_bounds = wx.CheckBox(pnl, label=_('Add bounds to ticks'))
         | 
| 204 201 | 
             
                    self.cfg_ticks_bounds.SetToolTip(_('If not checked, the extreme values of the ticks will not be displayed'))
         | 
| @@ -218,7 +215,7 @@ class GlobalOptionsDialog(wx.Dialog): | |
| 218 215 | 
             
                    self.cfg_assembly_images.SetToolTip(_('Choose the assembly mode for images -- horizontal, vertical or square'))
         | 
| 219 216 |  | 
| 220 217 | 
             
                    locsizer.Add(self.label_assembly_images, 1, wx.EXPAND, 2)
         | 
| 221 | 
            -
                    locsizer.Add(self.cfg_assembly_images, 1, wx.EXPAND)
         | 
| 218 | 
            +
                    locsizer.Add(self.cfg_assembly_images, 1, wx.EXPAND,5)
         | 
| 222 219 |  | 
| 223 220 | 
             
                    sbs.Add(locsizer, 3, wx.EXPAND, 5)
         | 
| 224 221 |  | 
    
        wolfhece/PyDraw.py
    CHANGED
    
    | @@ -1217,6 +1217,14 @@ class WolfMapViewer(wx.Frame): | |
| 1217 1217 | 
             
                #     # print(msg)
         | 
| 1218 1218 | 
             
                #     return 0
         | 
| 1219 1219 |  | 
| 1220 | 
            +
                @property
         | 
| 1221 | 
            +
                def viewer_name(self):
         | 
| 1222 | 
            +
                    return self.GetTitle()
         | 
| 1223 | 
            +
             | 
| 1224 | 
            +
                @viewer_name.setter
         | 
| 1225 | 
            +
                def viewer_name(self, value):
         | 
| 1226 | 
            +
                    self.SetTitle(value)
         | 
| 1227 | 
            +
             | 
| 1220 1228 | 
             
                @property
         | 
| 1221 1229 | 
             
                def wxlogging(self):
         | 
| 1222 1230 | 
             
                    return self._wxlogging
         | 
| @@ -2450,6 +2458,16 @@ class WolfMapViewer(wx.Frame): | |
| 2450 2458 | 
             
                    else:
         | 
| 2451 2459 | 
             
                        return config[ConfigurationKeys.TICKS_SIZE]
         | 
| 2452 2460 |  | 
| 2461 | 
            +
                @property
         | 
| 2462 | 
            +
                def assembly_mode(self) -> str:
         | 
| 2463 | 
            +
                    """ Return the assembly mode from configs """
         | 
| 2464 | 
            +
             | 
| 2465 | 
            +
                    config = self.get_configuration()
         | 
| 2466 | 
            +
                    if config is None:
         | 
| 2467 | 
            +
                        return 'square'
         | 
| 2468 | 
            +
                    else:
         | 
| 2469 | 
            +
                        return config[ConfigurationKeys.ASSEMBLY_IMAGES]
         | 
| 2470 | 
            +
             | 
| 2453 2471 | 
             
                @property
         | 
| 2454 2472 | 
             
                def ticks_bounds(self) -> bool:
         | 
| 2455 2473 | 
             
                    """ Return the ticks bounds from configs """
         | 
| @@ -3041,7 +3059,12 @@ class WolfMapViewer(wx.Frame): | |
| 3041 3059 |  | 
| 3042 3060 | 
             
                        return myimage
         | 
| 3043 3061 |  | 
| 3044 | 
            -
                def save_canvasogl(self, | 
| 3062 | 
            +
                def save_canvasogl(self,
         | 
| 3063 | 
            +
                                   fn:str='',
         | 
| 3064 | 
            +
                                   mpl:bool=True,
         | 
| 3065 | 
            +
                                   ds:float=0.,
         | 
| 3066 | 
            +
                                   dpi:int= 300,
         | 
| 3067 | 
            +
                                   add_title:bool = False):
         | 
| 3045 3068 | 
             
                    """
         | 
| 3046 3069 | 
             
                    Sauvegarde de la fenêtre d'affichage dans un fichier
         | 
| 3047 3070 |  | 
| @@ -3151,6 +3174,8 @@ class WolfMapViewer(wx.Frame): | |
| 3151 3174 |  | 
| 3152 3175 | 
             
                            # self.Paint()
         | 
| 3153 3176 |  | 
| 3177 | 
            +
                            if add_title:
         | 
| 3178 | 
            +
                                ax.set_title(self.viewer_name)
         | 
| 3154 3179 | 
             
                            fig.set_size_inches(12, 10)
         | 
| 3155 3180 | 
             
                            fig.tight_layout()
         | 
| 3156 3181 |  | 
| @@ -3257,19 +3282,32 @@ class WolfMapViewer(wx.Frame): | |
| 3257 3282 | 
             
                    # liste des éléments modifiable dans l'arbre
         | 
| 3258 3283 | 
             
                    self.all_lists = [self.myarrays, self.myvectors, self.myclouds, self.mytri, self.myothers, self.myviews, self.myres2D, self.mytiles, self.mypartsystems, self.myviewers3d]
         | 
| 3259 3284 |  | 
| 3285 | 
            +
                    self.menu_options = wx.Menu()
         | 
| 3286 | 
            +
                    self._change_title = self.menu_options.Append(wx.ID_ANY, _('Change title'), _('Change title of the window'))
         | 
| 3287 | 
            +
                    self.Bind(wx.EVT_MENU, self.OnChangeTitle, self._change_title)
         | 
| 3288 | 
            +
             | 
| 3260 3289 | 
             
                    if self.get_configuration() is not None:
         | 
| 3261 3290 | 
             
                        # see PyGui.py if necessary
         | 
| 3262 3291 |  | 
| 3263 | 
            -
                        self.menu_options = wx.Menu()
         | 
| 3264 3292 | 
             
                        self.menubar.Append(self.menu_options, _('Options'))
         | 
| 3265 3293 | 
             
                        self.option_global = self.menu_options.Append(wx.ID_ANY,_("Global"),_("Modify global options"))
         | 
| 3266 3294 | 
             
                        self.Bind(wx.EVT_MENU, self.GlobalOptionsDialog, self.option_global)
         | 
| 3267 3295 |  | 
| 3268 | 
            -
             | 
| 3269 | 
            -
             | 
| 3296 | 
            +
                    self.menu_1to9 =self.menu_options.Append(wx.ID_ANY, _('Colors for selections 1->9'), _('Selections'))
         | 
| 3297 | 
            +
                    self.Bind(wx.EVT_MENU, self.colors1to9.change_colors, self.menu_1to9)
         | 
| 3270 3298 |  | 
| 3271 3299 | 
             
                    self.Show(True)
         | 
| 3272 3300 |  | 
| 3301 | 
            +
                def OnChangeTitle(self, e):
         | 
| 3302 | 
            +
                    """
         | 
| 3303 | 
            +
                    Change the title of the window
         | 
| 3304 | 
            +
                    """
         | 
| 3305 | 
            +
             | 
| 3306 | 
            +
                    dlg = wx.TextEntryDialog(None, _('Enter the new title'), _('Change title'), self.GetTitle())
         | 
| 3307 | 
            +
                    if dlg.ShowModal() == wx.ID_OK:
         | 
| 3308 | 
            +
                        self.SetTitle(dlg.GetValue())
         | 
| 3309 | 
            +
                    dlg.Destroy()
         | 
| 3310 | 
            +
             | 
| 3273 3311 | 
             
                def OnSize(self, e):
         | 
| 3274 3312 | 
             
                    """
         | 
| 3275 3313 | 
             
                    Redimensionnement de la fenêtre
         | 
| @@ -6094,9 +6132,9 @@ class WolfMapViewer(wx.Frame): | |
| 6094 6132 | 
             
                        autoscale = False
         | 
| 6095 6133 |  | 
| 6096 6134 | 
             
                        fn, ds = self.save_canvasogl(mpl=True)
         | 
| 6097 | 
            -
                        all_images = self.save_linked_canvas(fn[:-4], mpl= True, ds= ds)
         | 
| 6098 6135 |  | 
| 6099 | 
            -
                        self. | 
| 6136 | 
            +
                        all_images = self.save_linked_canvas(fn[:-4], mpl= True, ds= ds, add_title= True)
         | 
| 6137 | 
            +
                        self.assembly_images(all_images, mode= self.assembly_mode)
         | 
| 6100 6138 |  | 
| 6101 6139 | 
             
                    elif itemlabel == _('Copy image...'):
         | 
| 6102 6140 | 
             
                        autoscale = False
         | 
| @@ -6666,13 +6704,20 @@ class WolfMapViewer(wx.Frame): | |
| 6666 6704 |  | 
| 6667 6705 | 
             
                    return linkedarrays
         | 
| 6668 6706 |  | 
| 6669 | 
            -
                def save_linked_canvas(self, fn, mpl=True, ds=0 | 
| 6670 | 
            -
                    """ Save canvas of all linked viewers | 
| 6707 | 
            +
                def save_linked_canvas(self, fn:str, mpl:bool= True, ds:float= 0., add_title:bool= True) -> tuple[(str, float), str]:
         | 
| 6708 | 
            +
                    """ Save canvas of all linked viewers
         | 
| 6709 | 
            +
             | 
| 6710 | 
            +
                    :param fn: filename without extension -- '.png' will be added
         | 
| 6711 | 
            +
                    :param mpl: save as matplotlib image
         | 
| 6712 | 
            +
                    :param ds: Ticks size for matplotlib image
         | 
| 6713 | 
            +
                    :return: list of tuple ((filename, ds), viewer_name)
         | 
| 6714 | 
            +
                    """
         | 
| 6671 6715 |  | 
| 6716 | 
            +
                    fn = str(fn)
         | 
| 6672 6717 | 
             
                    ret = []
         | 
| 6673 6718 | 
             
                    if self.linked:
         | 
| 6674 6719 | 
             
                        for idx, curel in enumerate(self.linkedList):
         | 
| 6675 | 
            -
                            ret.append(curel.save_canvasogl(fn + '_' + str(idx) + '.png', mpl, ds))
         | 
| 6720 | 
            +
                            ret.append((curel.save_canvasogl(fn + '_' + str(idx) + '.png', mpl, ds, add_title= add_title), self.viewer_name))
         | 
| 6676 6721 |  | 
| 6677 6722 | 
             
                    return ret
         | 
| 6678 6723 |  | 
| @@ -6680,50 +6725,55 @@ class WolfMapViewer(wx.Frame): | |
| 6680 6725 | 
             
                    """ Assembly images
         | 
| 6681 6726 |  | 
| 6682 6727 | 
             
                    Every image has the same size (width, height)
         | 
| 6728 | 
            +
             | 
| 6729 | 
            +
                    :param all_images: list of tuple (filename, viewer_name)
         | 
| 6730 | 
            +
                    :param mode: 'horizontal', 'vertical', 'square'
         | 
| 6683 6731 | 
             
                    """
         | 
| 6684 6732 |  | 
| 6733 | 
            +
                    assert mode in ['horizontal', 'vertical', 'square', 0, 1, 2], 'Mode not recognized'
         | 
| 6734 | 
            +
             | 
| 6685 6735 | 
             
                    from PIL import Image
         | 
| 6686 6736 |  | 
| 6687 | 
            -
                    images = [Image.open(fn) for fn, ds in all_images]
         | 
| 6737 | 
            +
                    images = [Image.open(fn) for (fn, ds), viewername in all_images]
         | 
| 6688 6738 |  | 
| 6689 6739 | 
             
                    widths, heights = zip(*(i.size for i in images))
         | 
| 6690 6740 |  | 
| 6691 | 
            -
                    if mode == 'horizontal':
         | 
| 6741 | 
            +
                    if mode == 'horizontal' or mode==0:
         | 
| 6692 6742 |  | 
| 6693 6743 | 
             
                        total_width = sum(widths)
         | 
| 6694 6744 | 
             
                        max_height = max(heights)
         | 
| 6695 6745 |  | 
| 6696 | 
            -
                        new_im = Image.new('RGB', (total_width, max_height))
         | 
| 6746 | 
            +
                        new_im = Image.new('RGB', (total_width, max_height), color=(255,255,255))
         | 
| 6697 6747 |  | 
| 6698 6748 | 
             
                        x_offset = 0
         | 
| 6699 6749 | 
             
                        for im in images:
         | 
| 6700 6750 | 
             
                            new_im.paste(im, (x_offset,0))
         | 
| 6701 6751 | 
             
                            x_offset += im.size[0]
         | 
| 6702 6752 |  | 
| 6703 | 
            -
                        new_im.save(all_images[0][0][:-4] + '_assembly.png')
         | 
| 6753 | 
            +
                        new_im.save(all_images[0][0][0][:-4] + '_assembly.png')
         | 
| 6704 6754 |  | 
| 6705 | 
            -
                    elif mode == 'vertical':
         | 
| 6755 | 
            +
                    elif mode == 'vertical' or mode==1:
         | 
| 6706 6756 |  | 
| 6707 6757 | 
             
                        total_height = sum(heights)
         | 
| 6708 6758 | 
             
                        max_width = max(widths)
         | 
| 6709 6759 |  | 
| 6710 | 
            -
                        new_im = Image.new('RGB', (max_width, total_height))
         | 
| 6760 | 
            +
                        new_im = Image.new('RGB', (max_width, total_height), color=(255,255,255))
         | 
| 6711 6761 |  | 
| 6712 6762 | 
             
                        y_offset = 0
         | 
| 6713 6763 | 
             
                        for im in images:
         | 
| 6714 6764 | 
             
                            new_im.paste(im, (0, y_offset))
         | 
| 6715 6765 | 
             
                            y_offset += im.size[1]
         | 
| 6716 6766 |  | 
| 6717 | 
            -
                        new_im.save(all_images[0][0][:-4] + '_assembly.png')
         | 
| 6767 | 
            +
                        new_im.save(all_images[0][0][0][:-4] + '_assembly.png')
         | 
| 6718 6768 |  | 
| 6719 | 
            -
                    elif mode == 'square':
         | 
| 6769 | 
            +
                    elif mode == 'square' or mode==2:
         | 
| 6720 6770 |  | 
| 6721 6771 | 
             
                        max_width = max(widths)
         | 
| 6722 6772 | 
             
                        max_height = max(heights)
         | 
| 6723 6773 |  | 
| 6724 6774 | 
             
                        nb_hor = int(np.ceil(np.sqrt(len(images))))
         | 
| 6725 6775 |  | 
| 6726 | 
            -
                        new_im = Image.new('RGB', (max_width*nb_hor, max_height*nb_hor))
         | 
| 6776 | 
            +
                        new_im = Image.new('RGB', (max_width*nb_hor, max_height*nb_hor), color=(255,255,255))
         | 
| 6727 6777 |  | 
| 6728 6778 | 
             
                        x_offset = 0
         | 
| 6729 6779 | 
             
                        y_offset = 0
         | 
| @@ -6734,7 +6784,9 @@ class WolfMapViewer(wx.Frame): | |
| 6734 6784 | 
             
                                y_offset += im.size[1]
         | 
| 6735 6785 | 
             
                                x_offset = 0
         | 
| 6736 6786 |  | 
| 6737 | 
            -
                        new_im.save(all_images[0][0][:-4] + '_assembly.png')
         | 
| 6787 | 
            +
                        new_im.save(all_images[0][0][0][:-4] + '_assembly.png')
         | 
| 6788 | 
            +
             | 
| 6789 | 
            +
                    return new_im
         | 
| 6738 6790 |  | 
| 6739 6791 | 
             
                def thread_update_blender(self):
         | 
| 6740 6792 | 
             
                    print("Update blender")
         | 
| @@ -9380,7 +9432,7 @@ class WolfMapViewer(wx.Frame): | |
| 9380 9432 | 
             
                    #     \n \
         | 
| 9381 9433 | 
             
                    #     CTRL+Q : Quit application\n \
         | 
| 9382 9434 | 
             
                    #     CTRL+U : Import GLTF/GLB\n \
         | 
| 9383 | 
            -
                    #     CTRL+C : Set copy source | 
| 9435 | 
            +
                    #     CTRL+C : Set copy source\n \
         | 
| 9384 9436 | 
             
                    #     CTRL+V : Paste selected values\n \
         | 
| 9385 9437 | 
             
                    #     CTRL+ALT+V ou ALTGr+V : Paste/Recopy selection\n \
         | 
| 9386 9438 | 
             
                    #     CTRL+L : chargement d'une matrice sur base du nom de fichier de la tile\n \
         | 
| @@ -9416,7 +9468,8 @@ class WolfMapViewer(wx.Frame): | |
| 9416 9468 | 
             
                                 'F7': _('Drawing : refresh'),
         | 
| 9417 9469 | 
             
                                 'Arrows': _('Drawing : lateral movements'),
         | 
| 9418 9470 | 
             
                                 'c or C': _('Drawing : copy canvas to Clipboard wo axes'),
         | 
| 9419 | 
            -
                                 ' | 
| 9471 | 
            +
                                 'ALT+C': _('Drawing : copy canvas to Clipboard as Matplotlib image'),
         | 
| 9472 | 
            +
                                 'ALT+SHIFT+C': _('Drawing : copy canvas to Clipboard as Matplotlib image with axes - linked arrays'),
         | 
| 9420 9473 |  | 
| 9421 9474 | 
             
                                 'CTRL+o': _('Results : increase transparency of the current result'),
         | 
| 9422 9475 | 
             
                                 'CTRL+O': _('Results : decrease transparency of the current result'),
         | 
| @@ -9707,11 +9760,45 @@ class WolfMapViewer(wx.Frame): | |
| 9707 9760 | 
             
                        elif key == wx.WXK_DOWN:
         | 
| 9708 9761 | 
             
                            self.downobj()
         | 
| 9709 9762 |  | 
| 9710 | 
            -
                        elif key == ord('C') and altdown and not ctrldown:
         | 
| 9763 | 
            +
                        elif key == ord('C') and altdown and not ctrldown and not shiftdown:
         | 
| 9711 9764 | 
             
                            # ALT+C
         | 
| 9712 9765 | 
             
                            #Copie du canvas dans le clipboard pour transfert vers autre application
         | 
| 9713 9766 | 
             
                            self.copy_canvasogl()
         | 
| 9714 9767 |  | 
| 9768 | 
            +
                        elif key == ord('C') and altdown and not ctrldown and shiftdown:
         | 
| 9769 | 
            +
                            # ALT+SHIFT+C
         | 
| 9770 | 
            +
                            # Copie du canvas dans le clipboard pour transfert vers autre application
         | 
| 9771 | 
            +
                            # Copie des canvas liés
         | 
| 9772 | 
            +
             | 
| 9773 | 
            +
                            from tempfile import TemporaryDirectory
         | 
| 9774 | 
            +
             | 
| 9775 | 
            +
                            logging.info(_('Creating images'))
         | 
| 9776 | 
            +
             | 
| 9777 | 
            +
                            with TemporaryDirectory() as tmpdirname:
         | 
| 9778 | 
            +
                                all_images = self.save_linked_canvas(Path(tmpdirname) / 'fig', mpl= True, ds= self.ticks_size, add_title= True)
         | 
| 9779 | 
            +
                                im_assembly = self.assembly_images(all_images, mode= self.assembly_mode)
         | 
| 9780 | 
            +
             | 
| 9781 | 
            +
                            logging.info(_('Creating images - done'))
         | 
| 9782 | 
            +
             | 
| 9783 | 
            +
                            # Copy image to clipboard
         | 
| 9784 | 
            +
                            if im_assembly is not None:
         | 
| 9785 | 
            +
                                if wx.TheClipboard.Open():
         | 
| 9786 | 
            +
             | 
| 9787 | 
            +
                                    #création d'un objet bitmap wx
         | 
| 9788 | 
            +
                                    wxbitmap = wx.Bitmap().FromBuffer(im_assembly.width, im_assembly.height, im_assembly.tobytes())
         | 
| 9789 | 
            +
             | 
| 9790 | 
            +
                                    # objet wx exportable via le clipboard
         | 
| 9791 | 
            +
                                    dataobj = wx.BitmapDataObject()
         | 
| 9792 | 
            +
                                    dataobj.SetBitmap(wxbitmap)
         | 
| 9793 | 
            +
             | 
| 9794 | 
            +
                                    wx.TheClipboard.SetData(dataobj)
         | 
| 9795 | 
            +
                                    wx.TheClipboard.Close()
         | 
| 9796 | 
            +
                                    logging.info(_('Image copied to clipboard'))
         | 
| 9797 | 
            +
                                else:
         | 
| 9798 | 
            +
                                    logging.error(_('Cannot open the clipboard'))
         | 
| 9799 | 
            +
                            else:
         | 
| 9800 | 
            +
                                logging.error(_('No image to copy to clipboard'))
         | 
| 9801 | 
            +
             | 
| 9715 9802 | 
             
                        elif key == ord('C') and ctrldown and not altdown:
         | 
| 9716 9803 | 
             
                            # CTRL+C
         | 
| 9717 9804 | 
             
                            if self.active_array is None:
         | 
    
        wolfhece/PyVertexvectors.py
    CHANGED
    
    | @@ -2200,7 +2200,7 @@ class vector: | |
| 2200 2200 | 
             
                                myvec=vector(name=curlabel,parentzone=myzone)
         | 
| 2201 2201 | 
             
                                myzone.add_vector(myvec)
         | 
| 2202 2202 |  | 
| 2203 | 
            -
                                ds =  | 
| 2203 | 
            +
                                ds = curarray.get_dxdy_min()
         | 
| 2204 2204 |  | 
| 2205 2205 | 
             
                                pts = self._refine2D(ds)
         | 
| 2206 2206 |  | 
| @@ -2238,8 +2238,8 @@ class vector: | |
| 2238 2238 | 
             
                    """
         | 
| 2239 2239 | 
             
                    Graphique Matplolib de valeurs dans les matrices liées
         | 
| 2240 2240 | 
             
                    """
         | 
| 2241 | 
            -
                    from .wolf_array import WolfArray
         | 
| 2242 | 
            -
                    from .wolfresults_2D import Wolfresults_2D
         | 
| 2241 | 
            +
                    # from .wolf_array import WolfArray
         | 
| 2242 | 
            +
                    # from .wolfresults_2D import Wolfresults_2D
         | 
| 2243 2243 |  | 
| 2244 2244 | 
             
                    colors=['red','blue','green']
         | 
| 2245 2245 |  | 
| @@ -2265,10 +2265,7 @@ class vector: | |
| 2265 2265 | 
             
                    for curlabel, curarray in linked_arrays.items():
         | 
| 2266 2266 | 
             
                        if curarray.plotted:
         | 
| 2267 2267 |  | 
| 2268 | 
            -
                             | 
| 2269 | 
            -
                                ds = min(curarray.dx,curarray.dy)
         | 
| 2270 | 
            -
                            elif isinstance(curarray, Wolfresults_2D):
         | 
| 2271 | 
            -
                                ds = min(curarray[0].dx,curarray[0].dy)
         | 
| 2268 | 
            +
                            ds = curarray.get_dxdy_min()
         | 
| 2272 2269 |  | 
| 2273 2270 | 
             
                            nb = int(np.ceil(length/ds*2))
         | 
| 2274 2271 |  | 
| @@ -5238,7 +5235,7 @@ class Zones(wx.Frame, Element_To_Draw): | |
| 5238 5235 | 
             
                        boxright.Add(self.getxyfromsz,0,wx.EXPAND) # Added
         | 
| 5239 5236 |  | 
| 5240 5237 | 
             
                        self.butgetval = wx.Button(self,label=_('Get values (self or active array)'))
         | 
| 5241 | 
            -
                        self.butgetval.SetToolTip(_("Get values of the attached/active array on each vertex of the active vector and update the editor"))
         | 
| 5238 | 
            +
                        self.butgetval.SetToolTip(_("Get values of the attached/active array (not working with 2D results) on each vertex of the active vector and update the editor"))
         | 
| 5242 5239 | 
             
                        self.butgetval.Bind(wx.EVT_BUTTON,self.Ongetvalues)
         | 
| 5243 5240 | 
             
                        boxright.Add(self.butgetval,0,wx.EXPAND)
         | 
| 5244 5241 |  | 
    
        wolfhece/apps/version.py
    CHANGED
    
    
    
        wolfhece/wolf_array.py
    CHANGED
    
    | @@ -5639,6 +5639,25 @@ class WolfArray(Element_To_Draw, header_wolf): | |
| 5639 5639 | 
             
                    band.FlushCache()
         | 
| 5640 5640 | 
             
                    band.ComputeStatistics(True)
         | 
| 5641 5641 |  | 
| 5642 | 
            +
             | 
| 5643 | 
            +
                def get_dxdy_min(self):
         | 
| 5644 | 
            +
                    """
         | 
| 5645 | 
            +
                    Return the minimal size
         | 
| 5646 | 
            +
             | 
| 5647 | 
            +
                    Mainly useful in PyVertexVectors to get the minimal size of the cells
         | 
| 5648 | 
            +
                    and ensure compatibility with the 2D results (GPU and Multiblocks)
         | 
| 5649 | 
            +
                    """
         | 
| 5650 | 
            +
                    return min(self.dx, self.dy)
         | 
| 5651 | 
            +
             | 
| 5652 | 
            +
                def get_dxdy_max(self):
         | 
| 5653 | 
            +
                    """
         | 
| 5654 | 
            +
                    Return the maximal size
         | 
| 5655 | 
            +
             | 
| 5656 | 
            +
                    Mainly useful in PyVertexVectors to get the minimal size of the cells
         | 
| 5657 | 
            +
                    and ensure compatibility with the 2D results (GPU and Multiblocks)
         | 
| 5658 | 
            +
                    """
         | 
| 5659 | 
            +
                    return max(self.dx, self.dy)
         | 
| 5660 | 
            +
             | 
| 5642 5661 | 
             
                def _import_npy(self, fn:str='', crop:list[float]=None):
         | 
| 5643 5662 | 
             
                    """
         | 
| 5644 5663 | 
             
                    Import a numpy file.
         | 
| @@ -5,9 +5,9 @@ wolfhece/GraphProfile.py,sha256=OCgJo0YFFBI6H1z-5egJsOOoWF_iziiza0-bbPejNMc,6965 | |
| 5 5 | 
             
            wolfhece/Lidar2002.py,sha256=bX-nIzdpjD7rOfEgJpTeaW6rIdAXwDp_z4YTM9CgANY,6068
         | 
| 6 6 | 
             
            wolfhece/ManageParams.py,sha256=EeuUI5Vvh9ixCvYf8YShMC1s1Yacc7OxOCN7q81gqiQ,517
         | 
| 7 7 | 
             
            wolfhece/Model1D.py,sha256=SI4oNF_J3MdjiWZoizS8kuRXLMVyymX9dYfYJNVCQVI,476989
         | 
| 8 | 
            -
            wolfhece/PyConfig.py,sha256= | 
| 8 | 
            +
            wolfhece/PyConfig.py,sha256=Bb1T8qjgKMChadJYDrHO9uo6CwItiAXScZpYkDXqZF8,11387
         | 
| 9 9 | 
             
            wolfhece/PyCrosssections.py,sha256=FnmM9DWY_SAF2EDH9Gu2PojXNtSTRF4-aYQuAAJXBh4,112771
         | 
| 10 | 
            -
            wolfhece/PyDraw.py,sha256= | 
| 10 | 
            +
            wolfhece/PyDraw.py,sha256=JTl5RmJjzu-xmzL3X4_VXh0sqCbiZesd3SR3u9ZTeRs,449435
         | 
| 11 11 | 
             
            wolfhece/PyGui.py,sha256=HY0beOMSp1JEyq8-vfVynzVrmKxvaO_sJSMwlNqCNrg,105289
         | 
| 12 12 | 
             
            wolfhece/PyGuiHydrology.py,sha256=f60E8K9eGTnRq5RDF6yvt-ahf2AYegwQ9t25zZ2Mk1A,14946
         | 
| 13 13 | 
             
            wolfhece/PyHydrographs.py,sha256=jwtSNMMACwarxrtN1UeQYth99UNrhwPx1IGgUwcooHA,3774
         | 
| @@ -16,7 +16,7 @@ wolfhece/PyParams.py,sha256=6fREK5cUCGw84SDyPvuSzidnX-9BXOX3fve5XBG1K_I,98114 | |
| 16 16 | 
             
            wolfhece/PyPictures.py,sha256=m1kY0saW6Y9Q0bDCo47lW6XxDkBrbQG-Fd8uVn8G5ic,2514
         | 
| 17 17 | 
             
            wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
         | 
| 18 18 | 
             
            wolfhece/PyVertex.py,sha256=aj1Xp6n0pMb_q6AMADHnQ9pgjjRU4EQm0m4Tmc1uoEM,41912
         | 
| 19 | 
            -
            wolfhece/PyVertexvectors.py,sha256= | 
| 19 | 
            +
            wolfhece/PyVertexvectors.py,sha256=VDmAGoUQYaM1DX9GVprpjpUnZTO8zjC1n2lqQX5MfJo,253678
         | 
| 20 20 | 
             
            wolfhece/PyWMS.py,sha256=fyyzm2HFwq8aRwVYHKiBatcZOeKnFi6DWhv4nfscySQ,4602
         | 
| 21 21 | 
             
            wolfhece/RatingCurve.py,sha256=bUjIrQjvIjkD4V-z8bZmA6pe1ILtYNM0-3fT6YUY1RU,22498
         | 
| 22 22 | 
             
            wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
         | 
| @@ -48,7 +48,7 @@ wolfhece/pywalous.py,sha256=yRaWJjKckXef1d9D5devP0yFHC9uc6kRV4G5x9PNq9k,18972 | |
| 48 48 | 
             
            wolfhece/rain_SPWMI.py,sha256=qCfcmF7LajloOaCwnTrrSMzyME03YyilmRUOqrPrv3U,13846
         | 
| 49 49 | 
             
            wolfhece/textpillow.py,sha256=map7HsGYML_o5NHRdFg2s_TVQed_lDnpYNDv27MM0Vw,14130
         | 
| 50 50 | 
             
            wolfhece/tools_mpl.py,sha256=gQ3Jg1iuZiecmMqa5Eli2ZLSkttu68VXL8YmMDBaEYU,564
         | 
| 51 | 
            -
            wolfhece/wolf_array.py,sha256= | 
| 51 | 
            +
            wolfhece/wolf_array.py,sha256=C8Aj2utsA78-NmOqVdKIKcoFc5iA-j7gDMvCRoBFL3U,407876
         | 
| 52 52 | 
             
            wolfhece/wolf_hist.py,sha256=7jeVrgSkM3ErJO6SRMH_PGzfLjIdw8vTy87kesldggk,3582
         | 
| 53 53 | 
             
            wolfhece/wolf_texture.py,sha256=DS5eobLxrq9ljyebYfpMSQPn8shkUAZZVfqrOKN_QUU,16951
         | 
| 54 54 | 
             
            wolfhece/wolf_tiles.py,sha256=2Ho2I20rHRY81KXxjgLOYISdF4OkJ2d6omeY4shDoGI,10386
         | 
| @@ -75,7 +75,7 @@ wolfhece/apps/curvedigitizer.py,sha256=Yps4bcayzbsz0AoVc_dkSk35dEhhn_esIBy1Ziefg | |
| 75 75 | 
             
            wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
         | 
| 76 76 | 
             
            wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
         | 
| 77 77 | 
             
            wolfhece/apps/splashscreen.py,sha256=SrustmIQeXnsiD-92OzjdGhBi-S7c_j-cSvuX4T6rtg,2929
         | 
| 78 | 
            -
            wolfhece/apps/version.py,sha256= | 
| 78 | 
            +
            wolfhece/apps/version.py,sha256=W-lUgSzX807GdIal36FgVFUfuDGbULppRDeyBCXWNc8,388
         | 
| 79 79 | 
             
            wolfhece/apps/wolf.py,sha256=j_CgvsL8rwixbVvVD5Z0s7m7cHZ86gmFLojKGuetMls,729
         | 
| 80 80 | 
             
            wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
         | 
| 81 81 | 
             
            wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
         | 
| @@ -285,8 +285,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=8PlMYrb_8jI8h9F0_EagpM | |
| 285 285 | 
             
            wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
         | 
| 286 286 | 
             
            wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         | 
| 287 287 | 
             
            wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
         | 
| 288 | 
            -
            wolfhece-2.1. | 
| 289 | 
            -
            wolfhece-2.1. | 
| 290 | 
            -
            wolfhece-2.1. | 
| 291 | 
            -
            wolfhece-2.1. | 
| 292 | 
            -
            wolfhece-2.1. | 
| 288 | 
            +
            wolfhece-2.1.98.dist-info/METADATA,sha256=qoO8NN6PL2Ob5mCO_8jQ2-cd3Je5ft85wg4DoS8BuqA,2570
         | 
| 289 | 
            +
            wolfhece-2.1.98.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
         | 
| 290 | 
            +
            wolfhece-2.1.98.dist-info/entry_points.txt,sha256=ZZ-aSfbpdcmo-wo84lRFzBN7LaSnD1XRGSaAKVX-Gpc,522
         | 
| 291 | 
            +
            wolfhece-2.1.98.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
         | 
| 292 | 
            +
            wolfhece-2.1.98.dist-info/RECORD,,
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         |