pyedb 0.42.0__py3-none-any.whl → 0.44.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 -1
- pyedb/configuration/cfg_boundaries.py +155 -72
- pyedb/configuration/cfg_components.py +1 -1
- pyedb/configuration/cfg_general.py +34 -16
- pyedb/configuration/cfg_modeler.py +162 -67
- pyedb/configuration/cfg_nets.py +33 -17
- pyedb/configuration/cfg_operations.py +63 -31
- pyedb/configuration/cfg_package_definition.py +113 -52
- pyedb/configuration/cfg_padstacks.py +611 -256
- pyedb/configuration/cfg_pin_groups.py +75 -33
- pyedb/configuration/cfg_ports_sources.py +75 -15
- pyedb/configuration/cfg_s_parameter_models.py +125 -70
- pyedb/configuration/cfg_setup.py +301 -257
- pyedb/configuration/cfg_stackup.py +166 -90
- pyedb/configuration/configuration.py +342 -209
- pyedb/dotnet/database/edb_data/design_options.py +19 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +16 -6
- pyedb/dotnet/database/geometry/polygon_data.py +4 -2
- pyedb/dotnet/database/padstack.py +6 -2
- pyedb/dotnet/database/sim_setup_data/data/sweep_data.py +63 -10
- pyedb/dotnet/database/utilities/simulation_setup.py +14 -30
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +30 -0
- pyedb/dotnet/edb.py +75 -105
- pyedb/grpc/database/components.py +1 -1
- pyedb/grpc/database/definition/component_def.py +15 -0
- pyedb/grpc/database/definition/component_pin.py +1 -1
- pyedb/grpc/database/definition/materials.py +27 -0
- pyedb/grpc/database/definition/package_def.py +20 -2
- pyedb/grpc/database/definition/padstack_def.py +5 -2
- pyedb/grpc/database/hierarchy/component.py +4 -2
- pyedb/grpc/database/hierarchy/pingroup.py +12 -8
- pyedb/grpc/database/layers/layer.py +28 -0
- pyedb/grpc/database/layers/stackup_layer.py +281 -40
- pyedb/grpc/database/layout/layout.py +12 -6
- pyedb/grpc/database/modeler.py +8 -8
- pyedb/grpc/database/primitive/bondwire.py +3 -3
- pyedb/grpc/database/primitive/circle.py +1 -1
- pyedb/grpc/database/primitive/padstack_instance.py +13 -3
- pyedb/grpc/database/primitive/path.py +2 -2
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +1 -1
- pyedb/grpc/database/primitive/rectangle.py +2 -2
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +73 -30
- pyedb/grpc/database/source_excitations.py +7 -7
- pyedb/grpc/database/stackup.py +14 -6
- pyedb/grpc/database/terminal/bundle_terminal.py +3 -3
- pyedb/grpc/database/terminal/edge_terminal.py +2 -2
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +42 -2
- pyedb/grpc/database/terminal/pingroup_terminal.py +35 -2
- pyedb/grpc/database/terminal/point_terminal.py +10 -1
- pyedb/grpc/database/terminal/terminal.py +4 -4
- pyedb/grpc/database/utility/hfss_extent_info.py +14 -10
- pyedb/grpc/edb.py +8 -8
- pyedb/misc/misc.py +13 -0
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/METADATA +1 -1
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/RECORD +58 -58
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/LICENSE +0 -0
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/WHEEL +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
24
24
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
25
|
-
from ansys.edb.core.primitive.
|
|
25
|
+
from ansys.edb.core.primitive.circle import Circle as GrpcCircle
|
|
26
26
|
from ansys.edb.core.primitive.primitive import Primitive as GrpcPrimitive
|
|
27
27
|
|
|
28
28
|
from pyedb.misc.utilities import compute_arc_points
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
from ansys.edb.core.primitive.
|
|
24
|
+
from ansys.edb.core.primitive.rectangle import (
|
|
25
25
|
RectangleRepresentationType as GrpcRectangleRepresentationType,
|
|
26
26
|
)
|
|
27
|
-
from ansys.edb.core.primitive.
|
|
27
|
+
from ansys.edb.core.primitive.rectangle import Rectangle as GrpcRectangle
|
|
28
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
29
|
|
|
30
30
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
@@ -293,7 +293,14 @@ class HfssSimulationSetup(GrpcHfssSimulationSetup):
|
|
|
293
293
|
return mesh_operation
|
|
294
294
|
|
|
295
295
|
def add_sweep(
|
|
296
|
-
self,
|
|
296
|
+
self,
|
|
297
|
+
name=None,
|
|
298
|
+
distribution="linear",
|
|
299
|
+
start_freq="0GHz",
|
|
300
|
+
stop_freq="20GHz",
|
|
301
|
+
step="10MHz",
|
|
302
|
+
discrete=False,
|
|
303
|
+
frequency_set=None,
|
|
297
304
|
):
|
|
298
305
|
"""Add a HFSS frequency sweep.
|
|
299
306
|
|
|
@@ -317,39 +324,75 @@ class HfssSimulationSetup(GrpcHfssSimulationSetup):
|
|
|
317
324
|
distribution. Must be integer in that case.
|
|
318
325
|
discrete : bool, optional
|
|
319
326
|
Whether the sweep is discrete. The default is ``False``.
|
|
327
|
+
frequency_set : List, optional
|
|
328
|
+
Frequency set is a list adding one or more frequency sweeps. If ``frequency_set`` is provided, the other
|
|
329
|
+
arguments are ignored except ``discrete``. Default value is ``None``.
|
|
330
|
+
example of frequency_set : [['linear_scale', '50MHz', '200MHz', '10MHz']].
|
|
320
331
|
|
|
321
332
|
Returns
|
|
322
333
|
-------
|
|
323
334
|
bool
|
|
324
335
|
"""
|
|
325
336
|
init_sweep_count = len(self.sweep_data)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
if frequency_set:
|
|
338
|
+
for sweep in frequency_set:
|
|
339
|
+
if "linear_scale" in sweep:
|
|
340
|
+
distribution = "LIN"
|
|
341
|
+
elif "linear_count" in sweep:
|
|
342
|
+
distribution = "LINC"
|
|
343
|
+
elif "exponential" in sweep:
|
|
344
|
+
distribution = "ESTP"
|
|
345
|
+
elif "log_scale" in sweep:
|
|
346
|
+
distribution = "DEC"
|
|
347
|
+
elif "octave_count" in sweep:
|
|
348
|
+
distribution = "OCT"
|
|
349
|
+
else:
|
|
350
|
+
distribution = "LIN"
|
|
351
|
+
start_freq = self._pedb.number_with_units(sweep[1], "Hz")
|
|
352
|
+
stop_freq = self._pedb.number_with_units(sweep[2], "Hz")
|
|
353
|
+
step = str(sweep[3])
|
|
354
|
+
if not name:
|
|
355
|
+
name = f"sweep_{init_sweep_count + 1}"
|
|
356
|
+
sweep_data = [
|
|
357
|
+
SweepData(
|
|
358
|
+
self._pedb, name=name, distribution=distribution, start_f=start_freq, end_f=stop_freq, step=step
|
|
359
|
+
)
|
|
360
|
+
]
|
|
361
|
+
if discrete:
|
|
362
|
+
sweep_data[0].type = sweep_data[0].type.DISCRETE_SWEEP
|
|
363
|
+
for sweep in self.sweep_data:
|
|
364
|
+
sweep_data.append(sweep)
|
|
365
|
+
self.sweep_data = sweep_data
|
|
339
366
|
else:
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
367
|
+
start_freq = self._pedb.number_with_units(start_freq, "Hz")
|
|
368
|
+
stop_freq = self._pedb.number_with_units(stop_freq, "Hz")
|
|
369
|
+
step = str(step)
|
|
370
|
+
if distribution.lower() == "linear":
|
|
371
|
+
distribution = "LIN"
|
|
372
|
+
elif distribution.lower() == "linear_count":
|
|
373
|
+
distribution = "LINC"
|
|
374
|
+
elif distribution.lower() == "exponential":
|
|
375
|
+
distribution = "ESTP"
|
|
376
|
+
elif distribution.lower() == "decade_count":
|
|
377
|
+
distribution = "DEC"
|
|
378
|
+
elif distribution.lower() == "octave_count":
|
|
379
|
+
distribution = "OCT"
|
|
380
|
+
else:
|
|
381
|
+
distribution = "LIN"
|
|
382
|
+
if not name:
|
|
383
|
+
name = f"sweep_{init_sweep_count + 1}"
|
|
384
|
+
sweep_data = [
|
|
385
|
+
SweepData(
|
|
386
|
+
self._pedb, name=name, distribution=distribution, start_f=start_freq, end_f=stop_freq, step=step
|
|
387
|
+
)
|
|
388
|
+
]
|
|
389
|
+
if discrete:
|
|
390
|
+
sweep_data[0].type = sweep_data[0].type.DISCRETE_SWEEP
|
|
391
|
+
for sweep in self.sweep_data:
|
|
392
|
+
sweep_data.append(sweep)
|
|
393
|
+
self.sweep_data = sweep_data
|
|
394
|
+
if len(self.sweep_data) == init_sweep_count + 1:
|
|
395
|
+
return True
|
|
396
|
+
else:
|
|
397
|
+
self._pedb.logger.error("Failed to add frequency sweep data")
|
|
398
|
+
return False
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from typing import Union
|
|
23
|
+
from typing import List, Set, Union
|
|
24
24
|
|
|
25
25
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
26
26
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
27
27
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
28
|
-
from ansys.edb.core.terminal.
|
|
29
|
-
from ansys.edb.core.terminal.
|
|
30
|
-
from ansys.edb.core.terminal.
|
|
28
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeTerminal as GrpcEdgeTerminal
|
|
29
|
+
from ansys.edb.core.terminal.edge_terminal import PrimitiveEdge as GrpcPrimitiveEdge
|
|
30
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
31
31
|
from ansys.edb.core.utility.rlc import Rlc as GrpcRlc
|
|
32
32
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
33
33
|
|
|
@@ -267,8 +267,8 @@ class SourceExcitation:
|
|
|
267
267
|
return term or False
|
|
268
268
|
|
|
269
269
|
def _get_pins_for_ports(
|
|
270
|
-
self, pins: Union[int, str, PadstackInstance,
|
|
271
|
-
) ->
|
|
270
|
+
self, pins: Union[int, str, PadstackInstance, List[Union[int, str, PadstackInstance]]], comp: Component
|
|
271
|
+
) -> List[PadstackInstance]:
|
|
272
272
|
if not isinstance(pins, list):
|
|
273
273
|
pins = [pins]
|
|
274
274
|
result = []
|
|
@@ -506,7 +506,7 @@ class SourceExcitation:
|
|
|
506
506
|
return True
|
|
507
507
|
|
|
508
508
|
@staticmethod
|
|
509
|
-
def _normalize_net_list(net_list) ->
|
|
509
|
+
def _normalize_net_list(net_list) -> Set[str]:
|
|
510
510
|
if not isinstance(net_list, list):
|
|
511
511
|
net_list = [net_list]
|
|
512
512
|
nets = set()
|
pyedb/grpc/database/stackup.py
CHANGED
|
@@ -170,11 +170,19 @@ class LayerCollection(GrpcLayerCollection):
|
|
|
170
170
|
if "thickness" in kwargs:
|
|
171
171
|
thickness = GrpcValue(kwargs["thickness"])
|
|
172
172
|
elevation = GrpcValue(0.0)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
_layer_type =
|
|
173
|
+
if "type" in kwargs:
|
|
174
|
+
_l_map = {"signal": GrpcLayerType.SIGNAL_LAYER, "dielectric": GrpcLayerType.DIELECTRIC_LAYER}
|
|
175
|
+
_layer_type = _l_map[kwargs["type"]]
|
|
176
|
+
else:
|
|
177
|
+
_layer_type = GrpcLayerType.SIGNAL_LAYER
|
|
178
|
+
if layer_type.lower() == "dielectric":
|
|
179
|
+
_layer_type = GrpcLayerType.DIELECTRIC_LAYER
|
|
180
|
+
if "material" in kwargs:
|
|
181
|
+
material = kwargs["material"]
|
|
182
|
+
else:
|
|
183
|
+
material = "copper"
|
|
176
184
|
layer = GrpcStackupLayer.create(
|
|
177
|
-
name=name, layer_type=_layer_type, thickness=thickness, material=
|
|
185
|
+
name=name, layer_type=_layer_type, thickness=thickness, material=material, elevation=elevation
|
|
178
186
|
)
|
|
179
187
|
return self._layer_collection.add_layer_below(layer, base_layer_name)
|
|
180
188
|
|
|
@@ -695,8 +703,8 @@ class Stackup(LayerCollection):
|
|
|
695
703
|
|
|
696
704
|
"""
|
|
697
705
|
new_layer_collection = LayerCollection.create()
|
|
698
|
-
for lyr in self.layers:
|
|
699
|
-
if not (
|
|
706
|
+
for layer_name, lyr in self.layers.items():
|
|
707
|
+
if not (layer_name == name):
|
|
700
708
|
new_layer_collection.add_layer_bottom(lyr)
|
|
701
709
|
|
|
702
710
|
self._pedb.layout.layer_collection = new_layer_collection
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from ansys.edb.core.terminal.
|
|
23
|
+
from ansys.edb.core.terminal.bundle_terminal import BundleTerminal as GrpcBundleTerminal
|
|
24
|
+
from ansys.edb.core.terminal.terminal import (
|
|
24
25
|
SourceTermToGroundType as GrpcSourceTermToGroundType,
|
|
25
26
|
)
|
|
26
|
-
from ansys.edb.core.terminal.
|
|
27
|
-
from ansys.edb.core.terminal.terminals import HfssPIType as GrpcHfssPIType
|
|
27
|
+
from ansys.edb.core.terminal.terminal import HfssPIType as GrpcHfssPIType
|
|
28
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
29
|
|
|
30
30
|
from pyedb.grpc.database.hierarchy.component import Component
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from ansys.edb.core.terminal.
|
|
24
|
-
from ansys.edb.core.terminal.
|
|
23
|
+
from ansys.edb.core.terminal.bundle_terminal import BundleTerminal as GrpcBundleTerminal
|
|
24
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeTerminal as GrpcEdgeTerminal
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class EdgeTerminal(GrpcEdgeTerminal):
|
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from ansys.edb.core.terminal.
|
|
23
|
+
from ansys.edb.core.terminal.padstack_instance_terminal import (
|
|
24
24
|
PadstackInstanceTerminal as GrpcPadstackInstanceTerminal,
|
|
25
25
|
)
|
|
26
|
-
from ansys.edb.core.terminal.
|
|
26
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
|
+
|
|
28
|
+
from pyedb.misc.misc import deprecated_property
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
@@ -45,6 +47,18 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
45
47
|
pos_x, pos_y, rotation = self.padstack_instance.get_position_and_rotation()
|
|
46
48
|
return [pos_x.value, pos_y.value]
|
|
47
49
|
|
|
50
|
+
@property
|
|
51
|
+
def padstack_instance(self):
|
|
52
|
+
from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
53
|
+
|
|
54
|
+
return PadstackInstance(self._pedb, super().padstack_instance)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def component(self):
|
|
58
|
+
from pyedb.grpc.database.hierarchy.component import Component
|
|
59
|
+
|
|
60
|
+
return Component(self._pedb, super().component)
|
|
61
|
+
|
|
48
62
|
@property
|
|
49
63
|
def location(self):
|
|
50
64
|
"""Terminal position.
|
|
@@ -169,3 +183,29 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
169
183
|
"pec": GrpcBoundaryType.PEC,
|
|
170
184
|
}
|
|
171
185
|
super(PadstackInstanceTerminal, self.__class__).boundary_type.__set__(self, mapping[value.name.lower()])
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def is_port(self):
|
|
189
|
+
if self.boundary_type == "port":
|
|
190
|
+
return True
|
|
191
|
+
return False
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
@deprecated_property
|
|
195
|
+
def ref_terminal(self):
|
|
196
|
+
"""Return reference terminal.
|
|
197
|
+
|
|
198
|
+
..deprecated:: 0.43.0
|
|
199
|
+
Use: func:`reference_terminal` property instead.
|
|
200
|
+
"""
|
|
201
|
+
self._pedb.logger.warning("ref_terminal property is deprecated, use reference_terminal property instead.")
|
|
202
|
+
return self.reference_terminal
|
|
203
|
+
|
|
204
|
+
@ref_terminal.setter
|
|
205
|
+
def ref_terminal(self, value):
|
|
206
|
+
if isinstance(value, PadstackInstanceTerminal):
|
|
207
|
+
self.reference_terminal = value
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def terminal_type(self):
|
|
211
|
+
return "PadstackInstanceTerminal"
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from ansys.edb.core.terminal.
|
|
24
|
-
|
|
23
|
+
from ansys.edb.core.terminal.pin_group_terminal import (
|
|
24
|
+
PinGroupTerminal as GrpcPinGroupTerminal,
|
|
25
|
+
)
|
|
26
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
25
27
|
|
|
26
28
|
from pyedb.grpc.database.net.net import Net
|
|
29
|
+
from pyedb.misc.misc import deprecated_property
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
@@ -56,6 +59,12 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
56
59
|
value = GrpcBoundaryType.VOLTAGE_PROBE
|
|
57
60
|
super(PinGroupTerminal, self.__class__).boundary_type.__set__(self, value)
|
|
58
61
|
|
|
62
|
+
@property
|
|
63
|
+
def is_port(self):
|
|
64
|
+
if self.boundary_type == "port":
|
|
65
|
+
return True
|
|
66
|
+
return False
|
|
67
|
+
|
|
59
68
|
@property
|
|
60
69
|
def magnitude(self):
|
|
61
70
|
"""Source magnitude.
|
|
@@ -160,3 +169,27 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
160
169
|
from pyedb.grpc.database.hierarchy.pingroup import PinGroup
|
|
161
170
|
|
|
162
171
|
return PinGroup(self._pedb, super().pin_group)
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
def terminal_type(self):
|
|
175
|
+
return "PinGroupTerminal"
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
@deprecated_property
|
|
179
|
+
def ref_terminal(self):
|
|
180
|
+
"""Property keeping DotNet compatibility
|
|
181
|
+
|
|
182
|
+
..deprecated:: 0.43.0
|
|
183
|
+
Use: func:`reference_terminal` property instead.
|
|
184
|
+
|
|
185
|
+
"""
|
|
186
|
+
self._pedb.logger.warning("ref_terminal property is deprecated, use reference_terminal property instead.")
|
|
187
|
+
return self.reference_terminal
|
|
188
|
+
|
|
189
|
+
@ref_terminal.setter
|
|
190
|
+
def ref_terminal(self, value):
|
|
191
|
+
self.reference_terminal = value
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def hfss_type(self):
|
|
195
|
+
return "circuit"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
24
|
-
from ansys.edb.core.terminal.
|
|
24
|
+
from ansys.edb.core.terminal.point_terminal import PointTerminal as GrpcPointTerminal
|
|
25
25
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
26
26
|
|
|
27
27
|
|
|
@@ -97,3 +97,12 @@ class PointTerminal(GrpcPointTerminal):
|
|
|
97
97
|
@reference_terminal.setter
|
|
98
98
|
def reference_terminal(self, value):
|
|
99
99
|
super(PointTerminal, self.__class__).reference_terminal.__set__(self, value)
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def terminal_type(self):
|
|
103
|
+
return "PointTerminal"
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def is_port(self):
|
|
107
|
+
"""Adding DotNet compatibility."""
|
|
108
|
+
return True
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
import re
|
|
24
24
|
|
|
25
|
-
from ansys.edb.core.terminal.
|
|
26
|
-
from ansys.edb.core.terminal.
|
|
27
|
-
from ansys.edb.core.terminal.
|
|
28
|
-
from ansys.edb.core.terminal.
|
|
25
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeType as GrpcEdgeType
|
|
26
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
|
+
from ansys.edb.core.terminal.terminal import Terminal as GrpcTerminal
|
|
28
|
+
from ansys.edb.core.terminal.terminal import TerminalType as GrpcTerminalType
|
|
29
29
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
30
30
|
|
|
31
31
|
from pyedb.dotnet.database.edb_data.padstacks_data import EDBPadstackInstance
|
|
@@ -20,7 +20,11 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
from ansys.edb.core.utility.hfss_extent_info import (
|
|
24
|
+
HFSSExtentInfoType as GrpcHfssExtentInfoType,
|
|
25
|
+
)
|
|
23
26
|
from ansys.edb.core.utility.hfss_extent_info import HfssExtentInfo as GrpcHfssExtentInfo
|
|
27
|
+
from ansys.edb.core.utility.hfss_extent_info import OpenRegionType as GrpcOpenRegionType
|
|
24
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
25
29
|
|
|
26
30
|
|
|
@@ -37,14 +41,14 @@ class HfssExtentInfo(GrpcHfssExtentInfo):
|
|
|
37
41
|
self._pedb = pedb
|
|
38
42
|
super().__init__()
|
|
39
43
|
self.extent_type_mapping = {
|
|
40
|
-
"bounding_box":
|
|
41
|
-
"conforming":
|
|
42
|
-
"convex_hull":
|
|
43
|
-
"polygon":
|
|
44
|
+
"bounding_box": GrpcHfssExtentInfoType.BOUNDING_BOX,
|
|
45
|
+
"conforming": GrpcHfssExtentInfoType.CONFORMING,
|
|
46
|
+
"convex_hull": GrpcHfssExtentInfoType.CONVEX_HUL,
|
|
47
|
+
"polygon": GrpcHfssExtentInfoType.POLYGON,
|
|
44
48
|
}
|
|
45
49
|
self._open_region_type = {
|
|
46
|
-
"radiation":
|
|
47
|
-
"pml":
|
|
50
|
+
"radiation": GrpcOpenRegionType.RADIATION,
|
|
51
|
+
"pml": GrpcOpenRegionType.PML,
|
|
48
52
|
}
|
|
49
53
|
self.hfss_extent_type = self._hfss_extent_info.extent_type
|
|
50
54
|
|
|
@@ -258,13 +262,13 @@ class HfssExtentInfo(GrpcHfssExtentInfo):
|
|
|
258
262
|
hfss_extent = self._hfss_extent_info
|
|
259
263
|
if isinstance(value, str):
|
|
260
264
|
if value.lower() == "bounding_box":
|
|
261
|
-
value =
|
|
265
|
+
value = GrpcHfssExtentInfoType.BOUNDING_BOX
|
|
262
266
|
elif value.lower() == "conforming":
|
|
263
|
-
value =
|
|
267
|
+
value = GrpcHfssExtentInfoType.CONFORMING
|
|
264
268
|
elif value.lower() == "convex_hul":
|
|
265
|
-
value =
|
|
269
|
+
value = GrpcHfssExtentInfoType.CONVEX_HUL
|
|
266
270
|
elif value.lower() == "polygon":
|
|
267
|
-
value =
|
|
271
|
+
value = GrpcHfssExtentInfoType.POLYGON
|
|
268
272
|
else:
|
|
269
273
|
raise f"Invalid extent type : {value}"
|
|
270
274
|
hfss_extent.extent_type = value
|
pyedb/grpc/edb.py
CHANGED
|
@@ -1085,7 +1085,7 @@ class Edb(EdbInit):
|
|
|
1085
1085
|
:class:`Circle <pyedb.grpc.database.primitive.circle.Circle>`,
|
|
1086
1086
|
:class:`Polygon <pyedb.grpc.database.primitive.polygon.Polygon>`]
|
|
1087
1087
|
"""
|
|
1088
|
-
from ansys.edb.core.terminal.
|
|
1088
|
+
from ansys.edb.core.terminal.padstack_instance_terminal import (
|
|
1089
1089
|
PadstackInstanceTerminal as GrpcPadstackInstanceTerminal,
|
|
1090
1090
|
)
|
|
1091
1091
|
|
|
@@ -2324,7 +2324,7 @@ class Edb(EdbInit):
|
|
|
2324
2324
|
ids.append(lobj.id)
|
|
2325
2325
|
if include_partial_instances:
|
|
2326
2326
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
2327
|
-
from ansys.edb.core.primitive.
|
|
2327
|
+
from ansys.edb.core.primitive.padstack_instance import (
|
|
2328
2328
|
PadstackInstance as GrpcPadstackInstance,
|
|
2329
2329
|
)
|
|
2330
2330
|
|
|
@@ -3384,15 +3384,15 @@ class Edb(EdbInit):
|
|
|
3384
3384
|
list: [:class:`GapPort <pyedb.grpc.database.ports.ports.GapPort`>,
|
|
3385
3385
|
:class:`WavePort <pyedb.grpc.database.ports.ports.WavePort>`].
|
|
3386
3386
|
"""
|
|
3387
|
-
from ansys.edb.core.terminal.
|
|
3387
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
3388
3388
|
|
|
3389
|
-
if
|
|
3389
|
+
if terminal.boundary_type == "port":
|
|
3390
3390
|
terminal.boundary_type = GrpcBoundaryType.PORT
|
|
3391
3391
|
terminal.is_circuit_port = is_circuit_port
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3392
|
+
if ref_terminal:
|
|
3393
|
+
if ref_terminal.boundary_type == "port":
|
|
3394
|
+
ref_terminal.boundary_type = GrpcBoundaryType.PORT
|
|
3395
|
+
terminal.reference_terminal = ref_terminal
|
|
3396
3396
|
if name:
|
|
3397
3397
|
terminal.name = name
|
|
3398
3398
|
return self.ports[terminal.name]
|
pyedb/misc/misc.py
CHANGED
|
@@ -87,3 +87,16 @@ def current_student_version():
|
|
|
87
87
|
if "SV" in version_key:
|
|
88
88
|
return version_key
|
|
89
89
|
return ""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def deprecated_property(func):
|
|
93
|
+
"""
|
|
94
|
+
This decorator marks a property as deprecated.
|
|
95
|
+
It will emit a warning when the property is accessed.
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
def wrapper(*args, **kwargs):
|
|
99
|
+
warnings.warn(f"Access to deprecated property {func.__name__}.", category=DeprecationWarning, stacklevel=2)
|
|
100
|
+
return func(*args, **kwargs)
|
|
101
|
+
|
|
102
|
+
return wrapper
|