PySimultan 0.2.7__py3-none-any.whl → 0.2.9__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.7
3
+ Version: 0.2.9
4
4
  Home-page:
5
5
  Author: Max Buehler
6
6
  Author-email: Max Bühler <maximilian.buehler@tuwien.ac.at>
@@ -4,8 +4,8 @@ PySimultan2/data_model.py,sha256=2Qq_JyUxtDgsIt3p5hIXIqNy7eAtvn-6Of_Wzb9AWoE,280
4
4
  PySimultan2/default_types.py,sha256=1HJ6IZt3Lm3Hhq3A9dDmvIO46Fk9bGqDng6yTtYKmO4,22585
5
5
  PySimultan2/files.py,sha256=q6A5KTqU1nCwh0W0Qf3Se7qcvhGiDAWza2v-X-rt6E4,12473
6
6
  PySimultan2/multi_values.py,sha256=ZFXlTLuZo32x7_7diYAp2XEjp5uwgHLgNOzN7v74-5I,13650
7
- PySimultan2/object_mapper.py,sha256=fpr8HsnMfhzCNSLenWHDyUtkKQdeCjaSdjIV5ofmed8,8720
8
- PySimultan2/simultan_object.py,sha256=3uTNbw_acTj_4_ZVE8n5D0zLxuSnSH58tDfgrxOBs-Y,15206
7
+ PySimultan2/object_mapper.py,sha256=Dsr05gdZxcECr14TVzswHNuE4HQhxyhjQwNWlgDrzwc,9010
8
+ PySimultan2/simultan_object.py,sha256=EpmerK5vtPa87MZtetN8fBAXtET9vRGai5ODKPAW86c,15864
9
9
  PySimultan2/taxonomy_maps.py,sha256=qgKM0CdwwgLCFj-ivzY38VaCpE_eCPKyCiBaTBazpBk,7509
10
10
  PySimultan2/utils.py,sha256=eCClnI1UpAOACiCMu5BmoVZ8oeR_FEWUugzsbaw41Yk,62038
11
11
  PySimultan2/geometry/__init__.py,sha256=nJolTD1i5J8qUkOQa-r3D20aq3Co3sN31Xc0n4wJpJo,248
@@ -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.7.dist-info/LICENSE.txt,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
79
- PySimultan-0.2.7.dist-info/METADATA,sha256=aEPSP8Hy6yP3_csBZR-uZHk5q6FygFNh00CLKLYiJf0,1990
80
- PySimultan-0.2.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
81
- PySimultan-0.2.7.dist-info/top_level.txt,sha256=pbE6SbdKIEEK4vaDNmmdRTj0vesrjgRXGow8QWMTXvk,12
82
- PySimultan-0.2.7.dist-info/RECORD,,
78
+ PySimultan-0.2.9.dist-info/LICENSE.txt,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
79
+ PySimultan-0.2.9.dist-info/METADATA,sha256=HY1DotoLPN5fZTb5M34Sre6ck9iN6V49mA0iaThBGtY,1990
80
+ PySimultan-0.2.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
81
+ PySimultan-0.2.9.dist-info/top_level.txt,sha256=pbE6SbdKIEEK4vaDNmmdRTj0vesrjgRXGow8QWMTXvk,12
82
+ PySimultan-0.2.9.dist-info/RECORD,,
@@ -199,6 +199,13 @@ class PythonMapper(object):
199
199
  for cls in self.mapped_classes.values():
200
200
  cls._cls_instances = WeakSet()
201
201
 
202
+ def copy(self):
203
+ new_mapper = PythonMapper()
204
+ new_mapper.registered_classes = self.registered_classes
205
+ new_mapper.taxonomy_maps = self.taxonomy_maps
206
+ new_mapper.registered_geometry_classes = self.registered_geometry_classes
207
+ return new_mapper
208
+
202
209
 
203
210
  if config.default_mapper is None:
204
211
  config.default_mapper = PythonMapper()
@@ -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
  #