PySimultan 0.7.2__py3-none-any.whl → 0.7.3__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.
- PySimultan2/__about__.py +1 -1
 - PySimultan2/data_model.py +4 -2
 - PySimultan2/object_mapper.py +13 -0
 - {pysimultan-0.7.2.dist-info → pysimultan-0.7.3.dist-info}/METADATA +1 -1
 - {pysimultan-0.7.2.dist-info → pysimultan-0.7.3.dist-info}/RECORD +7 -7
 - {pysimultan-0.7.2.dist-info → pysimultan-0.7.3.dist-info}/WHEEL +0 -0
 - {pysimultan-0.7.2.dist-info → pysimultan-0.7.3.dist-info}/licenses/LICENSE.txt +0 -0
 
    
        PySimultan2/__about__.py
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            version = '0.7. 
     | 
| 
      
 1 
     | 
    
         
            +
            version = '0.7.3'
         
     | 
    
        PySimultan2/data_model.py
    CHANGED
    
    | 
         @@ -975,9 +975,12 @@ class DataModel: 
     | 
|
| 
       975 
975 
     | 
    
         
             
                    return self.component_dict
         
     | 
| 
       976 
976 
     | 
    
         | 
| 
       977 
977 
     | 
    
         
             
                def get_component_by_id(self,
         
     | 
| 
       978 
     | 
    
         
            -
                                        item_id: SimId,
         
     | 
| 
      
 978 
     | 
    
         
            +
                                        item_id: Union[SimId, int],
         
     | 
| 
       979 
979 
     | 
    
         
             
                                        search_subcomponents=False) -> Union[SimComponent, None]:
         
     | 
| 
       980 
980 
     | 
    
         | 
| 
      
 981 
     | 
    
         
            +
                    if isinstance(item_id, int):
         
     | 
| 
      
 982 
     | 
    
         
            +
                        item_id = SimId(self.project.GlobalID, item_id)
         
     | 
| 
      
 983 
     | 
    
         
            +
             
     | 
| 
       981 
984 
     | 
    
         
             
                    # print(item_id.GlobalId, item_id.LocalId)
         
     | 
| 
       982 
985 
     | 
    
         
             
                    # _ = [print((x.Id.GlobalId, x.Id.LocalId)) for x in self.data.Items]
         
     | 
| 
       983 
986 
     | 
    
         | 
| 
         @@ -1023,7 +1026,6 @@ class DataModel: 
     | 
|
| 
       1023 
1026 
     | 
    
         
             
                                       f'Please check if the project is loaded correctly.')
         
     | 
| 
       1024 
1027 
     | 
    
         
             
                        # try to reload the file infos
         
     | 
| 
       1025 
1028 
     | 
    
         
             
                        self.get_file_infos_cached.cache_clear()
         
     | 
| 
       1026 
     | 
    
         
            -
                        file_infos = self.get_file_infos_cached()
         
     | 
| 
       1027 
1029 
     | 
    
         | 
| 
       1028 
1030 
     | 
    
         
             
                    return self.get_file_infos_cached()
         
     | 
| 
       1029 
1031 
     | 
    
         | 
    
        PySimultan2/object_mapper.py
    CHANGED
    
    | 
         @@ -13,6 +13,7 @@ from .geometry.utils import create_python_geometry 
     | 
|
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
            from SIMULTAN.Data.Geometry import (Layer, Vertex, Edge, PEdge, Face, Volume, EdgeLoop)
         
     | 
| 
       15 
15 
     | 
    
         
             
            from SIMULTAN.Data.Components import SimComponent
         
     | 
| 
      
 16 
     | 
    
         
            +
            from SIMULTAN.Data import SimId
         
     | 
| 
       16 
17 
     | 
    
         
             
            from .geometry.geometry_base import (SimultanLayer, SimultanVertex, SimultanEdge, SimultanEdgeLoop, SimultanFace,
         
     | 
| 
       17 
18 
     | 
    
         
             
                                                 SimultanVolume)
         
     | 
| 
       18 
19 
     | 
    
         | 
| 
         @@ -457,6 +458,18 @@ class PythonMapper(object): 
     | 
|
| 
       457 
458 
     | 
    
         
             
                    except IndexError:
         
     | 
| 
       458 
459 
     | 
    
         
             
                        return None
         
     | 
| 
       459 
460 
     | 
    
         | 
| 
      
 461 
     | 
    
         
            +
                def get_mapped_object_by_id(self,
         
     | 
| 
      
 462 
     | 
    
         
            +
                                            component_id: Union[SimId, int],
         
     | 
| 
      
 463 
     | 
    
         
            +
                                            data_model: 'DataModel',
         
     | 
| 
      
 464 
     | 
    
         
            +
                                            search_subcomponents: bool = True) -> Optional[SimultanObject]:
         
     | 
| 
      
 465 
     | 
    
         
            +
             
     | 
| 
      
 466 
     | 
    
         
            +
                    component = data_model.get_component_by_id(component_id, search_subcomponents=search_subcomponents)
         
     | 
| 
      
 467 
     | 
    
         
            +
                    if component is None:
         
     | 
| 
      
 468 
     | 
    
         
            +
                        logger.error(f'Component with id {id} not found in the data model')
         
     | 
| 
      
 469 
     | 
    
         
            +
                        return None
         
     | 
| 
      
 470 
     | 
    
         
            +
                    typed_object = self.create_python_object(component, data_model=data_model)
         
     | 
| 
      
 471 
     | 
    
         
            +
                    return typed_object
         
     | 
| 
      
 472 
     | 
    
         
            +
             
     | 
| 
       460 
473 
     | 
    
         
             
                def __repr__(self):
         
     | 
| 
       461 
474 
     | 
    
         
             
                    return f'PythonMapper(module={self.module}, {len(self.registered_classes)} registered classes)'
         
     | 
| 
       462 
475 
     | 
    
         | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.4
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: PySimultan
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 0.7. 
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 0.7.3
         
     | 
| 
       4 
4 
     | 
    
         
             
            Project-URL: Documentation, https://github.com/Bühler Maximilian/PySimultan2#readme
         
     | 
| 
       5 
5 
     | 
    
         
             
            Project-URL: Issues, https://github.com/Bühler Maximilian/PySimultan2/issues
         
     | 
| 
       6 
6 
     | 
    
         
             
            Project-URL: Source, https://github.com/Bühler Maximilian/PySimultan2
         
     | 
| 
         @@ -1,11 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PySimultan2/CHANGELOG.md,sha256=sFTVr_AgFyqf4HPmShaAHKaHcT5A3MjL2s2VVzEdoyM,1340
         
     | 
| 
       2 
     | 
    
         
            -
            PySimultan2/__about__.py,sha256= 
     | 
| 
      
 2 
     | 
    
         
            +
            PySimultan2/__about__.py,sha256=Yl5Obh3nV2cgQAb9sShmU5W55HPrpYbI_WGlWqZ5S6Y,19
         
     | 
| 
       3 
3 
     | 
    
         
             
            PySimultan2/__init__.py,sha256=PGVR1uhY01dF5tHyad-znURUZ_LVB95vsjId2BT0aJM,3245
         
     | 
| 
       4 
     | 
    
         
            -
            PySimultan2/data_model.py,sha256= 
     | 
| 
      
 4 
     | 
    
         
            +
            PySimultan2/data_model.py,sha256=3KX3cjsEB-9G-FzRVd0Zo1FpoAgR8cFOCo-drPoXJKg,45894
         
     | 
| 
       5 
5 
     | 
    
         
             
            PySimultan2/default_types.py,sha256=NnBgf16CElEAWH7tA0qLKqFHZ4_YS00HAJpKHG1CmjQ,30581
         
     | 
| 
       6 
6 
     | 
    
         
             
            PySimultan2/files.py,sha256=8JCWtUPS89POsPrmn_kCrHzmiBsLb1iWhw-A9qQLcR8,34716
         
     | 
| 
       7 
7 
     | 
    
         
             
            PySimultan2/multi_values.py,sha256=CkmfifA-mHL3Cnm496tGQuUchpmNF7JCulyrhUFAM_I,15638
         
     | 
| 
       8 
     | 
    
         
            -
            PySimultan2/object_mapper.py,sha256= 
     | 
| 
      
 8 
     | 
    
         
            +
            PySimultan2/object_mapper.py,sha256=0qiVEjn6q24u2_YZGOyD4ESXZ-0tfJjGjSowT8wa2wM,20568
         
     | 
| 
       9 
9 
     | 
    
         
             
            PySimultan2/simultan_object.py,sha256=-3dTlkyoVdrXmSZgozz7fTHJnaxN63utYPXOXTCuEOY,20837
         
     | 
| 
       10 
10 
     | 
    
         
             
            PySimultan2/taxonomy_maps.py,sha256=hhgXhRXIPTD2briG_yYZssJ9musOnzs0LC4e8e78e40,10323
         
     | 
| 
       11 
11 
     | 
    
         
             
            PySimultan2/type_setter_lookup.py,sha256=PGa5_EtV7SM15w3uxy0fA3LiQ0TaS4Ys0LYR5zs8aNk,3748
         
     | 
| 
         @@ -44,7 +44,7 @@ PySimultan2/resources/System.Data.OleDb.dll,sha256=-AAzdmyo01QNgD9qnUIewEImplJFV 
     | 
|
| 
       44 
44 
     | 
    
         
             
            PySimultan2/resources/System.Net.Http.Formatting.dll,sha256=xQBIin4YpqDObdqwau_5dr8XQEq54hlxV4gBgNtUqbc,179672
         
     | 
| 
       45 
45 
     | 
    
         
             
            PySimultan2/resources/System.Reflection.MetadataLoadContext.dll,sha256=P4PBRwAGWL27sNc754Wd28t_koJKBFYJ2FyolrD1xo0,242296
         
     | 
| 
       46 
46 
     | 
    
         
             
            PySimultan2/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       47 
     | 
    
         
            -
            pysimultan-0.7. 
     | 
| 
       48 
     | 
    
         
            -
            pysimultan-0.7. 
     | 
| 
       49 
     | 
    
         
            -
            pysimultan-0.7. 
     | 
| 
       50 
     | 
    
         
            -
            pysimultan-0.7. 
     | 
| 
      
 47 
     | 
    
         
            +
            pysimultan-0.7.3.dist-info/METADATA,sha256=ZDkGZr0z2LnB2G2eMgKHQdb2tIM8nMeCT5Plo4C_2Tc,6608
         
     | 
| 
      
 48 
     | 
    
         
            +
            pysimultan-0.7.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
         
     | 
| 
      
 49 
     | 
    
         
            +
            pysimultan-0.7.3.dist-info/licenses/LICENSE.txt,sha256=FgR_YZkk7oYz4087xYXfcBCXGuTStFrsOWTH4bbpa3c,1821
         
     | 
| 
      
 50 
     | 
    
         
            +
            pysimultan-0.7.3.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |