-
Notifications
You must be signed in to change notification settings - Fork 1
Description
🔍 Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
🐞 Description of the bug
When a PointTerminal is created and we want to move the position (it is possible with .NET version) using the property setter the API crashes.
📝 Steps to reproduce
new_location = PointData([Value(0.0), Value(0.0)])
self.point = new_location
I checked the PointData is properly defined but it seems it fails to convert the Value.
......\venv\Lib\site-packages\ansys\edb\core\utility\conversions.py:46: in to_point
return point_data.PointData(val)
......\venv\Lib\site-packages\ansys\edb\core\geometry\point_data.py:39: in init
self._x = self._arc_h = conversions.to_value(data[0])
val = x {
constant {
}
}
y {
constant {
}
}
def to_value(val):
"""Take a value implicitly convertible to a ``Value``type and return as a ``Value`` type.
Parameters
----------
val : ansys.edb.core.typing.ValueLike
Returns
-------
:class:`.Value`
"""
if isinstance(val, value.Value):
return val
elif type(val) in [int, float, complex, str, ValueMessage]:
return value.Value(val)
else:
raise TypeError(
f"Value-like objects must be either of type Value or int/float/complex/str. - Received '{val}'"
)
E TypeError: Value-like objects must be either of type Value or int/float/complex/str. - Received 'x {
E constant {
E }
E }
E y {
E constant {
E }
E }
E '
......\venv\Lib\site-packages\ansys\edb\core\utility\conversions.py:24: TypeError
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
No response
🐍 Which Python version are you using?
3.10
📦 Installed packages
NA