PySimultan 0.2.8__py3-none-any.whl → 0.2.10__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySimultan
3
- Version: 0.2.8
3
+ Version: 0.2.10
4
4
  Home-page:
5
5
  Author: Max Buehler
6
6
  Author-email: Max Bühler <maximilian.buehler@tuwien.ac.at>
@@ -5,9 +5,9 @@ PySimultan2/default_types.py,sha256=1HJ6IZt3Lm3Hhq3A9dDmvIO46Fk9bGqDng6yTtYKmO4,
5
5
  PySimultan2/files.py,sha256=q6A5KTqU1nCwh0W0Qf3Se7qcvhGiDAWza2v-X-rt6E4,12473
6
6
  PySimultan2/multi_values.py,sha256=ZFXlTLuZo32x7_7diYAp2XEjp5uwgHLgNOzN7v74-5I,13650
7
7
  PySimultan2/object_mapper.py,sha256=Dsr05gdZxcECr14TVzswHNuE4HQhxyhjQwNWlgDrzwc,9010
8
- PySimultan2/simultan_object.py,sha256=3uTNbw_acTj_4_ZVE8n5D0zLxuSnSH58tDfgrxOBs-Y,15206
8
+ PySimultan2/simultan_object.py,sha256=EpmerK5vtPa87MZtetN8fBAXtET9vRGai5ODKPAW86c,15864
9
9
  PySimultan2/taxonomy_maps.py,sha256=qgKM0CdwwgLCFj-ivzY38VaCpE_eCPKyCiBaTBazpBk,7509
10
- PySimultan2/utils.py,sha256=eCClnI1UpAOACiCMu5BmoVZ8oeR_FEWUugzsbaw41Yk,62038
10
+ PySimultan2/utils.py,sha256=a_2BA2P5lVZ6gVBNad43bYg-VL5WtHjm2nrFiyY39Fc,62067
11
11
  PySimultan2/geometry/__init__.py,sha256=nJolTD1i5J8qUkOQa-r3D20aq3Co3sN31Xc0n4wJpJo,248
12
12
  PySimultan2/geometry/geometry_base.py,sha256=IQQPVxkgIdBsFJp8rPSCNiCiKO7TxkVWy-XmE8GjDbE,23367
13
13
  PySimultan2/geometry/utils.py,sha256=K_3HnqPMAlJkOh01oqjspeqsLrooG9NwIQKWf14IJ48,8513
@@ -75,8 +75,8 @@ PySimultan2/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
75
75
  PySimultan2/resources/assimp.dll,sha256=HwfDwXqoPDTFRyoQpA3qmgZoUdFtziJkV5fNtktEZEU,6081536
76
76
  PySimultan2/resources/defaultsettings.xml,sha256=s6Tk1tubLz5UYqXZWpD42EDHzedemRY1nEneoIVcUfg,392
77
77
  PySimultan2/resources/setup.bat,sha256=fjvvYfVM6TalS-QTSiKAbAId5nTsk8kGGo06ba-wWaY,32
78
- PySimultan-0.2.8.dist-info/LICENSE.txt,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
79
- PySimultan-0.2.8.dist-info/METADATA,sha256=H6eIn24kJ1mZfXijbASwLQO0SG2dNPz4iXo2yjXxdjM,1990
80
- PySimultan-0.2.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
81
- PySimultan-0.2.8.dist-info/top_level.txt,sha256=pbE6SbdKIEEK4vaDNmmdRTj0vesrjgRXGow8QWMTXvk,12
82
- PySimultan-0.2.8.dist-info/RECORD,,
78
+ PySimultan-0.2.10.dist-info/LICENSE.txt,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
79
+ PySimultan-0.2.10.dist-info/METADATA,sha256=GOU8tqXM6DijHdbhz_XhuVhyUuAoxvQEqF_19sVqcog,1991
80
+ PySimultan-0.2.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
81
+ PySimultan-0.2.10.dist-info/top_level.txt,sha256=pbE6SbdKIEEK4vaDNmmdRTj0vesrjgRXGow8QWMTXvk,12
82
+ PySimultan-0.2.10.dist-info/RECORD,,
@@ -364,6 +364,25 @@ class SimultanObject(object, metaclass=MetaMock):
364
364
  setattr(comp_prop, prop, value)
365
365
  return comp_prop
366
366
 
367
+ def copy(self):
368
+ """
369
+ Create a copy of the object including all properties. The properties are copied by reference.
370
+ :return:
371
+ """
372
+ new_copy = self.__class__(data_model=self._data_model,
373
+ object_mapper=self._object_mapper)
374
+
375
+ for content in self._taxonomy_map.content:
376
+ setattr(new_copy, content.property_name, getattr(self, content.property_name))
377
+
378
+ new_copy.name = f'Copy of {self.name}'
379
+
380
+ if self.associated_geometry:
381
+ for geo in self.associated_geometry:
382
+ new_copy.associate(geo)
383
+
384
+ return new_copy
385
+
367
386
 
368
387
  # def to_json(self):
369
388
  #
PySimultan2/utils.py CHANGED
@@ -386,7 +386,7 @@ def add_sub_component(comp: SimComponent,
386
386
 
387
387
  entry = SimChildComponentEntry(new_slot, sub_comp)
388
388
  if entry not in comp.Components.Items:
389
- comp.Components.InsertItem(0, entry)
389
+ comp.Components.InsertItem(len(comp.Components.Items) + 1, entry)
390
390
  return True
391
391
 
392
392