pyedb 0.53.0__py3-none-any.whl → 0.55.0__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.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +1 -8
- pyedb/configuration/cfg_boundaries.py +69 -151
- pyedb/configuration/cfg_components.py +201 -460
- pyedb/configuration/cfg_data.py +4 -2
- pyedb/configuration/cfg_general.py +13 -36
- pyedb/configuration/cfg_modeler.py +2 -1
- pyedb/configuration/cfg_nets.py +21 -35
- pyedb/configuration/cfg_operations.py +22 -151
- pyedb/configuration/cfg_package_definition.py +56 -112
- pyedb/configuration/cfg_padstacks.py +292 -688
- pyedb/configuration/cfg_pin_groups.py +32 -79
- pyedb/configuration/cfg_ports_sources.py +20 -9
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +66 -6
- pyedb/dotnet/database/cell/connectable.py +38 -9
- pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +64 -3
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
- pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +26 -28
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +99 -91
- pyedb/dotnet/database/definition/component_def.py +4 -4
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +2 -3
- pyedb/dotnet/database/dotnet/database.py +27 -218
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/control_file.py +5 -5
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +35 -35
- pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
- pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +8 -4
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -5
- pyedb/dotnet/database/hfss.py +50 -52
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +104 -101
- pyedb/dotnet/database/nets.py +20 -23
- pyedb/dotnet/database/padstack.py +156 -84
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +47 -47
- pyedb/dotnet/database/stackup.py +152 -87
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +3 -3
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +248 -170
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +68 -21
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +55 -17
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +24 -31
- pyedb/grpc/database/definition/package_def.py +18 -18
- pyedb/grpc/database/definition/padstack_def.py +104 -51
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +4 -3
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +17 -13
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +16 -15
- pyedb/grpc/database/modeler.py +60 -58
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +112 -31
- pyedb/grpc/database/padstacks.py +303 -190
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +191 -23
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +31 -25
- pyedb/grpc/database/source_excitations.py +335 -233
- pyedb/grpc/database/stackup.py +165 -148
- pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +130 -63
- pyedb/grpc/edb_init.py +3 -10
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -25,13 +25,13 @@ from ansys.edb.core.terminal.terminal import (
|
|
|
25
25
|
SourceTermToGroundType as GrpcSourceTermToGroundType,
|
|
26
26
|
)
|
|
27
27
|
from ansys.edb.core.terminal.terminal import HfssPIType as GrpcHfssPIType
|
|
28
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
28
|
|
|
30
29
|
from pyedb.grpc.database.hierarchy.component import Component
|
|
31
30
|
from pyedb.grpc.database.layers.layer import Layer
|
|
32
31
|
from pyedb.grpc.database.net.net import Net
|
|
33
32
|
from pyedb.grpc.database.terminal.terminal import Terminal
|
|
34
33
|
from pyedb.grpc.database.utility.rlc import Rlc
|
|
34
|
+
from pyedb.grpc.database.utility.value import Value
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class BundleTerminal(GrpcBundleTerminal):
|
|
@@ -50,6 +50,16 @@ class BundleTerminal(GrpcBundleTerminal):
|
|
|
50
50
|
self._pedb = pedb
|
|
51
51
|
self._edb_object = edb_object
|
|
52
52
|
|
|
53
|
+
@property
|
|
54
|
+
def boundary_type(self) -> str:
|
|
55
|
+
"""Boundary type.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
str : boundary type.
|
|
60
|
+
"""
|
|
61
|
+
return super().boundary_type.name.lower()
|
|
62
|
+
|
|
53
63
|
def decouple(self) -> bool:
|
|
54
64
|
"""Ungroup a bundle of terminals.
|
|
55
65
|
|
|
@@ -78,11 +88,11 @@ class BundleTerminal(GrpcBundleTerminal):
|
|
|
78
88
|
float
|
|
79
89
|
Impedance value.
|
|
80
90
|
"""
|
|
81
|
-
return self.impedance
|
|
91
|
+
return Value(self.impedance)
|
|
82
92
|
|
|
83
93
|
@impedance.setter
|
|
84
94
|
def impedance(self, value):
|
|
85
|
-
self.impedance =
|
|
95
|
+
self.impedance = Value(value)
|
|
86
96
|
|
|
87
97
|
@property
|
|
88
98
|
def net(self) -> Net:
|
|
@@ -142,7 +152,7 @@ class BundleTerminal(GrpcBundleTerminal):
|
|
|
142
152
|
-------
|
|
143
153
|
:class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`
|
|
144
154
|
"""
|
|
145
|
-
return Terminal(self._pedb,
|
|
155
|
+
return Terminal(self._pedb, super().reference_terminal)
|
|
146
156
|
|
|
147
157
|
@reference_terminal.setter
|
|
148
158
|
def reference_terminal(self, value):
|
|
@@ -167,11 +177,11 @@ class BundleTerminal(GrpcBundleTerminal):
|
|
|
167
177
|
-------
|
|
168
178
|
float
|
|
169
179
|
"""
|
|
170
|
-
return self.source_amplitude
|
|
180
|
+
return Value(self.source_amplitude)
|
|
171
181
|
|
|
172
182
|
@source_amplitude.setter
|
|
173
183
|
def source_amplitude(self, value):
|
|
174
|
-
self.source_amplitude =
|
|
184
|
+
self.source_amplitude = Value(value)
|
|
175
185
|
|
|
176
186
|
@property
|
|
177
187
|
def source_phase(self) -> float:
|
|
@@ -181,11 +191,11 @@ class BundleTerminal(GrpcBundleTerminal):
|
|
|
181
191
|
-------
|
|
182
192
|
float
|
|
183
193
|
"""
|
|
184
|
-
return self.source_phase
|
|
194
|
+
return Value(self.source_phase)
|
|
185
195
|
|
|
186
196
|
@source_phase.setter
|
|
187
197
|
def source_phase(self, value):
|
|
188
|
-
self.source_phase =
|
|
198
|
+
self.source_phase = Value(value)
|
|
189
199
|
|
|
190
200
|
@property
|
|
191
201
|
def term_to_ground(self) -> str:
|
|
@@ -33,6 +33,16 @@ class EdgeTerminal(GrpcEdgeTerminal):
|
|
|
33
33
|
self._edb_object = edb_object
|
|
34
34
|
self._hfss_type = "Gap"
|
|
35
35
|
|
|
36
|
+
@property
|
|
37
|
+
def boundary_type(self) -> str:
|
|
38
|
+
"""Boundary type.
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
-------
|
|
42
|
+
str : boundary type.
|
|
43
|
+
"""
|
|
44
|
+
return super().boundary_type.name.lower()
|
|
45
|
+
|
|
36
46
|
@property
|
|
37
47
|
def _edb_properties(self):
|
|
38
48
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
@@ -25,7 +25,8 @@ from ansys.edb.core.terminal.padstack_instance_terminal import (
|
|
|
25
25
|
)
|
|
26
26
|
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
27
|
|
|
28
|
-
from pyedb.
|
|
28
|
+
from pyedb.grpc.database.utility.value import Value
|
|
29
|
+
from pyedb.misc.decorators import deprecated_property
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
@@ -36,6 +37,16 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
36
37
|
super().__init__(edb_object.msg)
|
|
37
38
|
self._pedb = pedb
|
|
38
39
|
|
|
40
|
+
@property
|
|
41
|
+
def boundary_type(self) -> str:
|
|
42
|
+
"""Boundary type.
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
str : boundary type.
|
|
47
|
+
"""
|
|
48
|
+
return super().boundary_type.name.lower()
|
|
49
|
+
|
|
39
50
|
@property
|
|
40
51
|
def position(self) -> list[float]:
|
|
41
52
|
"""Terminal position.
|
|
@@ -45,7 +56,7 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
45
56
|
Position [x,y] : [float, float]
|
|
46
57
|
"""
|
|
47
58
|
pos_x, pos_y, rotation = self.padstack_instance.get_position_and_rotation()
|
|
48
|
-
return [pos_x
|
|
59
|
+
return [Value(pos_x), Value(pos_y)]
|
|
49
60
|
|
|
50
61
|
@property
|
|
51
62
|
def padstack_instance(self) -> any:
|
|
@@ -69,7 +80,7 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
69
80
|
"""
|
|
70
81
|
p_inst, _ = self.params
|
|
71
82
|
pos_x, pos_y, _ = p_inst.get_position_and_rotation()
|
|
72
|
-
return [pos_x
|
|
83
|
+
return [Value(pos_x), Value(pos_y)]
|
|
73
84
|
|
|
74
85
|
@property
|
|
75
86
|
def net_name(self) -> str:
|
|
@@ -141,7 +152,7 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
141
152
|
-------
|
|
142
153
|
float : phase value.
|
|
143
154
|
"""
|
|
144
|
-
return super().source_phase
|
|
155
|
+
return Value(super().source_phase)
|
|
145
156
|
|
|
146
157
|
@source_phase.setter
|
|
147
158
|
def source_phase(self, value):
|
|
@@ -155,7 +166,7 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
155
166
|
-------
|
|
156
167
|
float : impedance value.
|
|
157
168
|
"""
|
|
158
|
-
return super().impedance
|
|
169
|
+
return Value(super().impedance)
|
|
159
170
|
|
|
160
171
|
@impedance.setter
|
|
161
172
|
def impedance(self, value):
|
|
@@ -26,7 +26,8 @@ from ansys.edb.core.terminal.pin_group_terminal import (
|
|
|
26
26
|
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
27
|
|
|
28
28
|
from pyedb.grpc.database.net.net import Net
|
|
29
|
-
from pyedb.
|
|
29
|
+
from pyedb.grpc.database.utility.value import Value
|
|
30
|
+
from pyedb.misc.decorators import deprecated_property
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
@@ -74,11 +75,11 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
74
75
|
float : magnitude value.
|
|
75
76
|
|
|
76
77
|
"""
|
|
77
|
-
return self.source_amplitude
|
|
78
|
+
return Value(self.source_amplitude)
|
|
78
79
|
|
|
79
80
|
@magnitude.setter
|
|
80
81
|
def magnitude(self, value):
|
|
81
|
-
self.source_amplitude = value
|
|
82
|
+
self.source_amplitude = Value(value)
|
|
82
83
|
|
|
83
84
|
@property
|
|
84
85
|
def phase(self) -> float:
|
|
@@ -89,11 +90,11 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
89
90
|
float : phase value.
|
|
90
91
|
|
|
91
92
|
"""
|
|
92
|
-
return self.source_phase
|
|
93
|
+
return Value(self.source_phase)
|
|
93
94
|
|
|
94
95
|
@phase.setter
|
|
95
96
|
def phase(self, value):
|
|
96
|
-
self.source_phase = value
|
|
97
|
+
self.source_phase = Value(value)
|
|
97
98
|
|
|
98
99
|
@property
|
|
99
100
|
def source_amplitude(self) -> float:
|
|
@@ -104,11 +105,11 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
104
105
|
float : source magnitude.
|
|
105
106
|
|
|
106
107
|
"""
|
|
107
|
-
return super().source_amplitude
|
|
108
|
+
return Value(super().source_amplitude)
|
|
108
109
|
|
|
109
110
|
@source_amplitude.setter
|
|
110
111
|
def source_amplitude(self, value):
|
|
111
|
-
super(PinGroupTerminal, self.__class__).source_amplitude.__set__(self, value)
|
|
112
|
+
super(PinGroupTerminal, self.__class__).source_amplitude.__set__(self, Value(value))
|
|
112
113
|
|
|
113
114
|
@property
|
|
114
115
|
def source_phase(self) -> float:
|
|
@@ -119,11 +120,11 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
119
120
|
foat : source phase.
|
|
120
121
|
|
|
121
122
|
"""
|
|
122
|
-
return super().source_amplitude
|
|
123
|
+
return Value(super().source_amplitude)
|
|
123
124
|
|
|
124
125
|
@source_phase.setter
|
|
125
126
|
def source_phase(self, value):
|
|
126
|
-
super(PinGroupTerminal, self.__class__).source_phase.__set__(self, value)
|
|
127
|
+
super(PinGroupTerminal, self.__class__).source_phase.__set__(self, Value(value))
|
|
127
128
|
|
|
128
129
|
@property
|
|
129
130
|
def impedance(self) -> float:
|
|
@@ -134,11 +135,11 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
134
135
|
float : terminal impedance.
|
|
135
136
|
|
|
136
137
|
"""
|
|
137
|
-
return super().impedance
|
|
138
|
+
return Value(super().impedance)
|
|
138
139
|
|
|
139
140
|
@impedance.setter
|
|
140
141
|
def impedance(self, value):
|
|
141
|
-
super(PinGroupTerminal, self.__class__).impedance.__set__(self, value)
|
|
142
|
+
super(PinGroupTerminal, self.__class__).impedance.__set__(self, Value(value))
|
|
142
143
|
|
|
143
144
|
@property
|
|
144
145
|
def net(self) -> Net:
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
24
24
|
from ansys.edb.core.terminal.point_terminal import PointTerminal as GrpcPointTerminal
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
from pyedb.grpc.database.utility.value import Value
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
class PointTerminal(GrpcPointTerminal):
|
|
@@ -41,13 +42,13 @@ class PointTerminal(GrpcPointTerminal):
|
|
|
41
42
|
[float, float] : [x,y]
|
|
42
43
|
|
|
43
44
|
"""
|
|
44
|
-
return [self.point.x
|
|
45
|
+
return [Value(self.point.x), Value(self.point.y)]
|
|
45
46
|
|
|
46
47
|
@location.setter
|
|
47
48
|
def location(self, value):
|
|
48
49
|
if not isinstance(value, list):
|
|
49
50
|
return
|
|
50
|
-
value = [
|
|
51
|
+
value = [Value(i) for i in value]
|
|
51
52
|
self.point = GrpcPointData(value)
|
|
52
53
|
|
|
53
54
|
@property
|
|
@@ -26,10 +26,10 @@ from ansys.edb.core.terminal.edge_terminal import EdgeType as GrpcEdgeType
|
|
|
26
26
|
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
27
|
from ansys.edb.core.terminal.terminal import Terminal as GrpcTerminal
|
|
28
28
|
from ansys.edb.core.terminal.terminal import TerminalType as GrpcTerminalType
|
|
29
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
30
29
|
|
|
31
30
|
from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
32
31
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
32
|
+
from pyedb.grpc.database.utility.value import Value
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class Terminal(GrpcTerminal):
|
|
@@ -239,11 +239,11 @@ class Terminal(GrpcTerminal):
|
|
|
239
239
|
float : impedance value.
|
|
240
240
|
|
|
241
241
|
"""
|
|
242
|
-
return self.impedance
|
|
242
|
+
return Value(self.impedance)
|
|
243
243
|
|
|
244
244
|
@impedance.setter
|
|
245
245
|
def impedance(self, value):
|
|
246
|
-
self.impedance =
|
|
246
|
+
self.impedance = Value(value)
|
|
247
247
|
|
|
248
248
|
@property
|
|
249
249
|
def reference_object(self) -> any:
|
|
@@ -356,7 +356,7 @@ class Terminal(GrpcTerminal):
|
|
|
356
356
|
ref_layer = self.reference_layer
|
|
357
357
|
edges = self.edges
|
|
358
358
|
_, _, point_data = edges[0].get_parameters()
|
|
359
|
-
# shape_pd = self._pedb.
|
|
359
|
+
# shape_pd = self._pedb.core.geometry.point_data(X, Y)
|
|
360
360
|
layer_name = ref_layer.name
|
|
361
361
|
for primitive in self._pedb.layout.primitives:
|
|
362
362
|
if primitive.layer.name == layer_name:
|
|
@@ -375,7 +375,7 @@ class Terminal(GrpcTerminal):
|
|
|
375
375
|
|
|
376
376
|
ref_term = self.reference_terminal # return value is type terminal
|
|
377
377
|
_, point_data, layer = ref_term.get_parameters()
|
|
378
|
-
# shape_pd = self._pedb.
|
|
378
|
+
# shape_pd = self._pedb.core.geometry.point_data(X, Y)
|
|
379
379
|
layer_name = layer.name
|
|
380
380
|
for primitive in self._pedb.layout.primitives:
|
|
381
381
|
if primitive.layer.name == layer_name:
|
|
@@ -448,11 +448,11 @@ class Terminal(GrpcTerminal):
|
|
|
448
448
|
-------
|
|
449
449
|
float : source magnitude.
|
|
450
450
|
"""
|
|
451
|
-
return self.source_amplitude
|
|
451
|
+
return Value(self.source_amplitude)
|
|
452
452
|
|
|
453
453
|
@magnitude.setter
|
|
454
454
|
def magnitude(self, value):
|
|
455
|
-
self.source_amplitude =
|
|
455
|
+
self.source_amplitude = Value(value)
|
|
456
456
|
|
|
457
457
|
@property
|
|
458
458
|
def phase(self) -> float:
|
|
@@ -463,8 +463,8 @@ class Terminal(GrpcTerminal):
|
|
|
463
463
|
float : source phase.
|
|
464
464
|
|
|
465
465
|
"""
|
|
466
|
-
return self.source_phase
|
|
466
|
+
return Value(self.source_phase)
|
|
467
467
|
|
|
468
468
|
@phase.setter
|
|
469
469
|
def phase(self, value):
|
|
470
|
-
self.source_phase =
|
|
470
|
+
self.source_phase = Value(value)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
import ansys.edb.core.utility.value
|
|
23
|
+
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Value(float, GrpcValue):
|
|
27
|
+
"""Class defining Edb Value properties."""
|
|
28
|
+
|
|
29
|
+
def __new__(cls, edb_obj, owner=None) -> float:
|
|
30
|
+
inst = super().__new__(cls, float(GrpcValue(edb_obj, owner).double))
|
|
31
|
+
inst._edb_obj = edb_obj
|
|
32
|
+
inst._context = owner
|
|
33
|
+
return inst
|
|
34
|
+
|
|
35
|
+
def __add__(self, other):
|
|
36
|
+
"""Adds two Edb Values."""
|
|
37
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(self._edb_obj)})+({str(other)})", self._context)
|
|
38
|
+
return self.__class__(edb_object)
|
|
39
|
+
|
|
40
|
+
def __radd__(self, other):
|
|
41
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(other)})+({str(self._edb_obj)})", self._context)
|
|
42
|
+
return self.__class__(edb_object)
|
|
43
|
+
|
|
44
|
+
def __sub__(self, other):
|
|
45
|
+
"""Subtracts two Edb Values."""
|
|
46
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(self._edb_obj)})-({str(other)})", self._context)
|
|
47
|
+
return self.__class__(edb_object)
|
|
48
|
+
|
|
49
|
+
def __rsub__(self, other):
|
|
50
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(other)})-({str(self._edb_obj)})", self._context)
|
|
51
|
+
return self.__class__(edb_object)
|
|
52
|
+
|
|
53
|
+
def __mul__(self, other):
|
|
54
|
+
"""Multiplies two Edb Values."""
|
|
55
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(self._edb_obj)})*({str(other)})", self._context)
|
|
56
|
+
return self.__class__(edb_object)
|
|
57
|
+
|
|
58
|
+
def __rmul__(self, other):
|
|
59
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(other)})*({str(self._edb_obj)})", self._context)
|
|
60
|
+
return self.__class__(edb_object)
|
|
61
|
+
|
|
62
|
+
def __truediv__(self, other):
|
|
63
|
+
"""Divides two Edb Values."""
|
|
64
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(self._edb_obj)})/({str(other)})", self._context)
|
|
65
|
+
return self.__class__(edb_object)
|
|
66
|
+
|
|
67
|
+
def __rtruediv__(self, other):
|
|
68
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(other)})/({str(self._edb_obj)})", self._context)
|
|
69
|
+
return self.__class__(edb_object)
|
|
70
|
+
|
|
71
|
+
def sqrt(self):
|
|
72
|
+
"""Square root of the value."""
|
|
73
|
+
edb_object = ansys.edb.core.utility.value.Value(f"({str(self._edb_obj)})**0.5", self._context)
|
|
74
|
+
return self.__class__(edb_object)
|
|
75
|
+
|
|
76
|
+
def log10(self):
|
|
77
|
+
"""Base-10 logarithm of the value."""
|
|
78
|
+
edb_object = ansys.edb.core.utility.value.Value(f"log10({str(self._edb_obj)})", self._context)
|
|
79
|
+
return self.__class__(edb_object)
|
|
80
|
+
|
|
81
|
+
def sin(self):
|
|
82
|
+
"""Sine of the value."""
|
|
83
|
+
edb_object = ansys.edb.core.utility.value.Value(f"sin({str(self._edb_obj)})", self._context)
|
|
84
|
+
return self.__class__(edb_object)
|
|
85
|
+
|
|
86
|
+
def cos(self):
|
|
87
|
+
"""Cosine of the value."""
|
|
88
|
+
edb_object = ansys.edb.core.utility.value.Value(f"cos({str(self._edb_obj)})", self._context)
|
|
89
|
+
return self.__class__(edb_object)
|
|
90
|
+
|
|
91
|
+
def asin(self):
|
|
92
|
+
"""Arcsine of the value."""
|
|
93
|
+
edb_object = ansys.edb.core.utility.value.Value(f"asin({str(self._edb_obj)})", self._context)
|
|
94
|
+
return self.__class__(edb_object)
|
|
95
|
+
|
|
96
|
+
def acos(self):
|
|
97
|
+
"""Arccosine of the value."""
|
|
98
|
+
edb_object = ansys.edb.core.utility.value.Value(f"acos({str(self._edb_obj)})", self._context)
|
|
99
|
+
return self.__class__(edb_object)
|
|
100
|
+
|
|
101
|
+
def tan(self):
|
|
102
|
+
"""Tangent of the value."""
|
|
103
|
+
edb_object = ansys.edb.core.utility.value.Value(f"tan({str(self._edb_obj)})", self._context)
|
|
104
|
+
return self.__class__(edb_object)
|
|
105
|
+
|
|
106
|
+
def atan(self):
|
|
107
|
+
"""Arctangent of the value."""
|
|
108
|
+
edb_object = ansys.edb.core.utility.value.Value(f"atan({str(self._edb_obj)})", self._context)
|
|
109
|
+
return self.__class__(edb_object)
|
|
@@ -26,8 +26,8 @@ import re
|
|
|
26
26
|
import subprocess
|
|
27
27
|
import sys
|
|
28
28
|
|
|
29
|
-
from pyedb.edb_logger import pyedb_logger
|
|
30
29
|
from pyedb.generic.general_methods import ET, env_path, env_value, is_linux
|
|
30
|
+
from pyedb.generic.settings import settings
|
|
31
31
|
from pyedb.misc.aedtlib_personalib_install import write_pretty_xml
|
|
32
32
|
from pyedb.misc.misc import list_installed_ansysem
|
|
33
33
|
|
|
@@ -56,7 +56,7 @@ def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
|
56
56
|
base_path = env_path(edbversion)
|
|
57
57
|
sys.path.append(base_path)
|
|
58
58
|
else:
|
|
59
|
-
|
|
59
|
+
settings.logger.error("No Edb installation found. Check environment variables")
|
|
60
60
|
return False
|
|
61
61
|
os.environ["HELIC_ROOT"] = os.path.join(base_path, "helic")
|
|
62
62
|
if os.getenv("ANSYSLMD_LICENCE_FILE", None) is None:
|
|
@@ -69,7 +69,7 @@ def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
|
69
69
|
os.environ["ANSYSLMD_LICENSE_FILE"] = line.split("=")[1]
|
|
70
70
|
break
|
|
71
71
|
else:
|
|
72
|
-
|
|
72
|
+
settings.logger.error("ANSYSLMD_LICENSE_FILE is not defined.")
|
|
73
73
|
vlc_file_name = os.path.splitext(tech_file)[0]
|
|
74
74
|
if not control_file:
|
|
75
75
|
control_file = vlc_file_name + ".xml"
|
|
@@ -103,9 +103,9 @@ def convert_technology_file(tech_file, edbversion=None, control_file=None):
|
|
|
103
103
|
p = subprocess.Popen(command, env=my_env)
|
|
104
104
|
p.wait()
|
|
105
105
|
if os.path.exists(control_file):
|
|
106
|
-
|
|
106
|
+
settings.logger.info("Xml file created.")
|
|
107
107
|
return control_file
|
|
108
|
-
|
|
108
|
+
settings.logger.error("Technology files are supported only in Linux. Use control file instead.")
|
|
109
109
|
return False
|
|
110
110
|
|
|
111
111
|
|