PySimultan 0.2.4__py3-none-any.whl → 0.2.6__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {PySimultan-0.2.4.dist-info → PySimultan-0.2.6.dist-info}/METADATA +9 -1
- {PySimultan-0.2.4.dist-info → PySimultan-0.2.6.dist-info}/RECORD +8 -8
- PySimultan2/multi_values.py +19 -6
- PySimultan2/simultan_object.py +4 -0
- PySimultan2/utils.py +3 -0
- {PySimultan-0.2.4.dist-info → PySimultan-0.2.6.dist-info}/LICENSE.txt +0 -0
- {PySimultan-0.2.4.dist-info → PySimultan-0.2.6.dist-info}/WHEEL +0 -0
- {PySimultan-0.2.4.dist-info → PySimultan-0.2.6.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PySimultan
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.6
|
4
4
|
Home-page:
|
5
5
|
Author: Max Buehler
|
6
6
|
Author-email: Max Bühler <maximilian.buehler@tuwien.ac.at>
|
@@ -28,6 +28,14 @@ Classifier: Operating System :: OS Independent
|
|
28
28
|
Requires-Python: >=3.10
|
29
29
|
Description-Content-Type: text/markdown
|
30
30
|
License-File: LICENSE.txt
|
31
|
+
Requires-Dist: six
|
32
|
+
Requires-Dist: numpy
|
33
|
+
Requires-Dist: pythonnet
|
34
|
+
Requires-Dist: colorlog
|
35
|
+
Requires-Dist: ruamel.yaml
|
36
|
+
Requires-Dist: tqdm
|
37
|
+
Requires-Dist: pandas
|
38
|
+
Requires-Dist: pyarrow
|
31
39
|
|
32
40
|
===================================================
|
33
41
|
geometry_utils: Several tools to work with geometry
|
@@ -3,11 +3,11 @@ PySimultan2/config.py,sha256=Bazt2vDSEga_cFEIPWcAYBsj3TUN5jgtob8TtUvGm5E,1523
|
|
3
3
|
PySimultan2/data_model.py,sha256=2Qq_JyUxtDgsIt3p5hIXIqNy7eAtvn-6Of_Wzb9AWoE,28004
|
4
4
|
PySimultan2/default_types.py,sha256=1HJ6IZt3Lm3Hhq3A9dDmvIO46Fk9bGqDng6yTtYKmO4,22585
|
5
5
|
PySimultan2/files.py,sha256=q6A5KTqU1nCwh0W0Qf3Se7qcvhGiDAWza2v-X-rt6E4,12473
|
6
|
-
PySimultan2/multi_values.py,sha256=
|
6
|
+
PySimultan2/multi_values.py,sha256=ZFXlTLuZo32x7_7diYAp2XEjp5uwgHLgNOzN7v74-5I,13650
|
7
7
|
PySimultan2/object_mapper.py,sha256=fpr8HsnMfhzCNSLenWHDyUtkKQdeCjaSdjIV5ofmed8,8720
|
8
|
-
PySimultan2/simultan_object.py,sha256=
|
8
|
+
PySimultan2/simultan_object.py,sha256=3uTNbw_acTj_4_ZVE8n5D0zLxuSnSH58tDfgrxOBs-Y,15206
|
9
9
|
PySimultan2/taxonomy_maps.py,sha256=qgKM0CdwwgLCFj-ivzY38VaCpE_eCPKyCiBaTBazpBk,7509
|
10
|
-
PySimultan2/utils.py,sha256=
|
10
|
+
PySimultan2/utils.py,sha256=eCClnI1UpAOACiCMu5BmoVZ8oeR_FEWUugzsbaw41Yk,62038
|
11
11
|
PySimultan2/geometry/__init__.py,sha256=nJolTD1i5J8qUkOQa-r3D20aq3Co3sN31Xc0n4wJpJo,248
|
12
12
|
PySimultan2/geometry/geometry_base.py,sha256=9qePzRroQ4vDckTT9L7vI4KMydpYO8Rsj5OvbU4ZRSo,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.
|
79
|
-
PySimultan-0.2.
|
80
|
-
PySimultan-0.2.
|
81
|
-
PySimultan-0.2.
|
82
|
-
PySimultan-0.2.
|
78
|
+
PySimultan-0.2.6.dist-info/LICENSE.txt,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
79
|
+
PySimultan-0.2.6.dist-info/METADATA,sha256=8LCTrU6vtdI0JX_l09VZEUTBVdwKCNuL0haSyNj7maw,1990
|
80
|
+
PySimultan-0.2.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
81
|
+
PySimultan-0.2.6.dist-info/top_level.txt,sha256=pbE6SbdKIEEK4vaDNmmdRTj0vesrjgRXGow8QWMTXvk,12
|
82
|
+
PySimultan-0.2.6.dist-info/RECORD,,
|
PySimultan2/multi_values.py
CHANGED
@@ -189,11 +189,23 @@ def set_parameter_to_value_field(parameter: SimDoubleParameter,
|
|
189
189
|
:return: SimDoubleParameter
|
190
190
|
"""
|
191
191
|
|
192
|
+
_ = x_ax_val
|
193
|
+
|
194
|
+
def default_value_source(val_field: SimMultiValueField3D,
|
195
|
+
x_ax: float = None,
|
196
|
+
y_ax: float = None,
|
197
|
+
z_ax: float = None):
|
198
|
+
x_ax = x_ax if x_ax is not None else val_field.XAxis[0]
|
199
|
+
y_ax = y_ax if y_ax is not None else val_field.YAxis[0]
|
200
|
+
z_ax = z_ax if z_ax is not None else val_field.ZAxis[0]
|
201
|
+
return SimMultiValueField3DParameterSource(val_field, x_ax, y_ax, z_ax)
|
202
|
+
|
192
203
|
if not isinstance(parameter, SimDoubleParameter):
|
193
204
|
raise ValueError('The input parameter must be a SimDoubleParameter object.')
|
194
205
|
|
195
206
|
if isinstance(value, SimMultiValueField3D):
|
196
|
-
source = value
|
207
|
+
# source = value
|
208
|
+
source = default_value_source(value, x_ax_val, y_ax_val, z_ax_val)
|
197
209
|
elif isinstance(value, np.ndarray):
|
198
210
|
value_field = numpy_to_simultan_multi_value_field_3d(value,
|
199
211
|
name=field_name if field_name is not None else str(
|
@@ -201,11 +213,12 @@ def set_parameter_to_value_field(parameter: SimDoubleParameter,
|
|
201
213
|
if data_model is not None:
|
202
214
|
data_model.add_field(value_field)
|
203
215
|
|
204
|
-
x_ax_val = x_ax_val if x_ax_val is not None else value_field.XAxis[0]
|
205
|
-
y_ax_val = y_ax_val if y_ax_val is not None else value_field.YAxis[0]
|
206
|
-
z_ax_val = z_ax_val if z_ax_val is not None else value_field.ZAxis[0]
|
207
|
-
|
208
|
-
source = SimMultiValueField3DParameterSource(value_field, x_ax_val, y_ax_val, z_ax_val)
|
216
|
+
# x_ax_val = x_ax_val if x_ax_val is not None else value_field.XAxis[0]
|
217
|
+
# y_ax_val = y_ax_val if y_ax_val is not None else value_field.YAxis[0]
|
218
|
+
# z_ax_val = z_ax_val if z_ax_val is not None else value_field.ZAxis[0]
|
219
|
+
#
|
220
|
+
# source = SimMultiValueField3DParameterSource(value_field, x_ax_val, y_ax_val, z_ax_val)
|
221
|
+
source = default_value_source(value_field, x_ax_val, y_ax_val, z_ax_val)
|
209
222
|
|
210
223
|
elif isinstance(value, pd.DataFrame):
|
211
224
|
value_field = pandas_to_simultan_multi_value_big_table(value,
|
PySimultan2/simultan_object.py
CHANGED
@@ -102,6 +102,10 @@ class SimultanObject(object, metaclass=MetaMock):
|
|
102
102
|
_cls_instances_dict_cache = None
|
103
103
|
__type_view__ = None # ui view cls
|
104
104
|
|
105
|
+
@classmethod
|
106
|
+
def get_instance_by_id(cls, id: SimId) -> 'SimultanObject':
|
107
|
+
return cls._cls_instances_dict.get(id, None)
|
108
|
+
|
105
109
|
@classproperty
|
106
110
|
def _cls_instances_dict(cls) -> dict[SimId, 'SimultanObject']:
|
107
111
|
return dict(zip([x.id for x in cls._cls_instances], [x for x in cls._cls_instances]))
|
PySimultan2/utils.py
CHANGED
@@ -1143,6 +1143,7 @@ def set_property_to_value_field(value: Union[np.ndarray, pd.DataFrame],
|
|
1143
1143
|
data_model=component._data_model)
|
1144
1144
|
|
1145
1145
|
if parameter_idx is None:
|
1146
|
+
|
1146
1147
|
param = create_field_parameter(field_name=str(component.id) + '_' + prop_name,
|
1147
1148
|
value=value,
|
1148
1149
|
slot=taxonomy_entry,
|
@@ -1264,6 +1265,8 @@ def add_properties(prop_name: str,
|
|
1264
1265
|
SimStringParameter: set_property_to_parameter,
|
1265
1266
|
SimBoolParameter: set_property_to_parameter,
|
1266
1267
|
SimEnumParameter: set_property_to_parameter,
|
1268
|
+
SimMultiValueField3D: set_property_to_value_field,
|
1269
|
+
SimMultiValueBigTable: set_property_to_value_field,
|
1267
1270
|
int: set_property_to_parameter,
|
1268
1271
|
float: set_property_to_parameter,
|
1269
1272
|
str: set_property_to_parameter,
|
File without changes
|
File without changes
|
File without changes
|