pyedb 0.53.0__py3-none-any.whl → 0.54.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_ports_sources.py +6 -8
- pyedb/configuration/configuration.py +2 -1
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +1 -1
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +1 -1
- pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
- 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 +24 -26
- pyedb/dotnet/database/components.py +24 -24
- pyedb/dotnet/database/definition/component_def.py +3 -3
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +1 -1
- pyedb/dotnet/database/dotnet/database.py +43 -38
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +14 -14
- pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +7 -3
- pyedb/dotnet/database/geometry/point_data.py +1 -1
- pyedb/dotnet/database/geometry/polygon_data.py +2 -4
- pyedb/dotnet/database/hfss.py +7 -7
- pyedb/dotnet/database/materials.py +2 -2
- pyedb/dotnet/database/modeler.py +8 -11
- pyedb/dotnet/database/nets.py +1 -1
- pyedb/dotnet/database/padstack.py +72 -1
- 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 +5 -5
- pyedb/dotnet/database/stackup.py +74 -77
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +43 -43
- pyedb/generic/design_types.py +12 -3
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +53 -17
- pyedb/grpc/database/definition/materials.py +23 -30
- pyedb/grpc/database/definition/package_def.py +15 -15
- pyedb/grpc/database/definition/padstack_def.py +51 -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 +3 -2
- 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 +9 -8
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +13 -12
- pyedb/grpc/database/modeler.py +51 -54
- pyedb/grpc/database/nets.py +42 -31
- pyedb/grpc/database/padstacks.py +270 -175
- 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 +18 -18
- 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 +30 -24
- pyedb/grpc/database/source_excitations.py +333 -229
- pyedb/grpc/database/stackup.py +164 -147
- pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
- pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
- 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/edb.py +59 -38
- pyedb/grpc/edb_init.py +0 -7
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +3 -3
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +84 -81
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/licenses/LICENSE +0 -0
pyedb/dotnet/edb.py
CHANGED
|
@@ -92,6 +92,7 @@ from pyedb.dotnet.database.utilities.siwave_simulation_setup import (
|
|
|
92
92
|
SiwaveDCSimulationSetup,
|
|
93
93
|
SiwaveSimulationSetup,
|
|
94
94
|
)
|
|
95
|
+
from pyedb.dotnet.database.utilities.value import Value
|
|
95
96
|
from pyedb.edb_logger import pyedb_logger
|
|
96
97
|
from pyedb.generic.constants import AEDT_UNITS, SolverType, unit_converter
|
|
97
98
|
from pyedb.generic.general_methods import (
|
|
@@ -400,6 +401,13 @@ class Edb(Database):
|
|
|
400
401
|
def pedb_class(self):
|
|
401
402
|
return pyedb.dotnet
|
|
402
403
|
|
|
404
|
+
def value(self, val):
|
|
405
|
+
"""Convert a value into a pyedb value."""
|
|
406
|
+
if isinstance(val, self._edb.Utility.Value):
|
|
407
|
+
return Value(self, val)
|
|
408
|
+
else:
|
|
409
|
+
return Value(self, self.core.utility.value(val))
|
|
410
|
+
|
|
403
411
|
@property
|
|
404
412
|
def grpc(self):
|
|
405
413
|
"""grpc flag."""
|
|
@@ -620,9 +628,7 @@ class Edb(Database):
|
|
|
620
628
|
return None
|
|
621
629
|
if not self.cellname:
|
|
622
630
|
self.cellname = generate_unique_name("Cell")
|
|
623
|
-
self._active_cell = self.
|
|
624
|
-
self.active_db, self.edb_api.cell.CellType.CircuitCell, self.cellname
|
|
625
|
-
)
|
|
631
|
+
self._active_cell = self.core.cell.create(self.active_db, self.core.cell.CellType.CircuitCell, self.cellname)
|
|
626
632
|
if self._active_cell:
|
|
627
633
|
self._init_objects()
|
|
628
634
|
return True
|
|
@@ -1366,7 +1372,7 @@ class Edb(Database):
|
|
|
1366
1372
|
Instance of `Edb.Utility.Value`
|
|
1367
1373
|
|
|
1368
1374
|
"""
|
|
1369
|
-
return self.
|
|
1375
|
+
return self.core.utility.value(val)
|
|
1370
1376
|
|
|
1371
1377
|
def point_3d(self, x, y, z=0.0):
|
|
1372
1378
|
"""Compute the Edb 3d Point Data.
|
|
@@ -1384,7 +1390,7 @@ class Edb(Database):
|
|
|
1384
1390
|
-------
|
|
1385
1391
|
``Geometry.Point3DData``.
|
|
1386
1392
|
"""
|
|
1387
|
-
return self.
|
|
1393
|
+
return self.core.geometry.point3d_data(x, y, z)
|
|
1388
1394
|
|
|
1389
1395
|
def point_data(self, x, y=None):
|
|
1390
1396
|
"""Compute the Edb Point Data.
|
|
@@ -1402,9 +1408,9 @@ class Edb(Database):
|
|
|
1402
1408
|
``Geometry.PointData``.
|
|
1403
1409
|
"""
|
|
1404
1410
|
if y is None:
|
|
1405
|
-
return self.
|
|
1411
|
+
return self.core.geometry.point_data(x)
|
|
1406
1412
|
else:
|
|
1407
|
-
return self.
|
|
1413
|
+
return self.core.geometry.point_data(x, y)
|
|
1408
1414
|
|
|
1409
1415
|
def _is_file_existing_and_released(self, filename):
|
|
1410
1416
|
if os.path.exists(filename):
|
|
@@ -1468,7 +1474,7 @@ class Edb(Database):
|
|
|
1468
1474
|
warnings.warn("Use new property :func:`close` instead.", DeprecationWarning)
|
|
1469
1475
|
return self.close()
|
|
1470
1476
|
|
|
1471
|
-
def close(self):
|
|
1477
|
+
def close(self, **kwargs):
|
|
1472
1478
|
"""Close EDB and cleanup variables.
|
|
1473
1479
|
|
|
1474
1480
|
Returns
|
|
@@ -1589,7 +1595,7 @@ class Edb(Database):
|
|
|
1589
1595
|
``True`` when successful, ``False`` when failed.
|
|
1590
1596
|
|
|
1591
1597
|
"""
|
|
1592
|
-
return self.
|
|
1598
|
+
return self.core.utility.utility.Command.Execute(func)
|
|
1593
1599
|
|
|
1594
1600
|
def import_cadence_file(self, inputBrd, WorkDir=None, anstranslator_full_path="", use_ppe=False):
|
|
1595
1601
|
"""Import a board file and generate an ``edb.def`` file in the working directory.
|
|
@@ -1638,7 +1644,7 @@ class Edb(Database):
|
|
|
1638
1644
|
):
|
|
1639
1645
|
if extent_type in [
|
|
1640
1646
|
"Conforming",
|
|
1641
|
-
self.
|
|
1647
|
+
self.core.geometry.extent_type.Conforming,
|
|
1642
1648
|
1,
|
|
1643
1649
|
]:
|
|
1644
1650
|
if use_pyaedt_extent:
|
|
@@ -1656,7 +1662,7 @@ class Edb(Database):
|
|
|
1656
1662
|
else:
|
|
1657
1663
|
_poly = self.layout.expanded_extent(
|
|
1658
1664
|
net_signals,
|
|
1659
|
-
self.
|
|
1665
|
+
self.core.geometry.extent_type.Conforming,
|
|
1660
1666
|
expansion_size,
|
|
1661
1667
|
False,
|
|
1662
1668
|
use_round_corner,
|
|
@@ -1664,12 +1670,12 @@ class Edb(Database):
|
|
|
1664
1670
|
)
|
|
1665
1671
|
elif extent_type in [
|
|
1666
1672
|
"Bounding",
|
|
1667
|
-
self.
|
|
1673
|
+
self.core.geometry.extent_type.BoundingBox,
|
|
1668
1674
|
0,
|
|
1669
1675
|
]:
|
|
1670
1676
|
_poly = self.layout.expanded_extent(
|
|
1671
1677
|
net_signals,
|
|
1672
|
-
self.
|
|
1678
|
+
self.core.geometry.extent_type.BoundingBox,
|
|
1673
1679
|
expansion_size,
|
|
1674
1680
|
False,
|
|
1675
1681
|
use_round_corner,
|
|
@@ -1690,14 +1696,14 @@ class Edb(Database):
|
|
|
1690
1696
|
else:
|
|
1691
1697
|
_poly = self.layout.expanded_extent(
|
|
1692
1698
|
net_signals,
|
|
1693
|
-
self.
|
|
1699
|
+
self.core.geometry.extent_type.Conforming,
|
|
1694
1700
|
expansion_size,
|
|
1695
1701
|
False,
|
|
1696
1702
|
use_round_corner,
|
|
1697
1703
|
1,
|
|
1698
1704
|
)
|
|
1699
1705
|
_poly_list = convert_py_list_to_net_list([_poly])
|
|
1700
|
-
_poly = self.
|
|
1706
|
+
_poly = self.core.geometry.polygon_data.get_convex_hull_of_polygons(_poly_list)
|
|
1701
1707
|
return _poly
|
|
1702
1708
|
|
|
1703
1709
|
def _create_conformal(
|
|
@@ -1772,7 +1778,7 @@ class Edb(Database):
|
|
|
1772
1778
|
pass
|
|
1773
1779
|
finally:
|
|
1774
1780
|
unite_polys.extend(list(obj_data))
|
|
1775
|
-
_poly_unite = self.
|
|
1781
|
+
_poly_unite = self.core.geometry.polygon_data.unite(unite_polys)
|
|
1776
1782
|
if len(_poly_unite) == 1:
|
|
1777
1783
|
self.logger.info("Correctly computed Extension at first iteration.")
|
|
1778
1784
|
return _poly_unite[0]
|
|
@@ -1797,20 +1803,20 @@ class Edb(Database):
|
|
|
1797
1803
|
pd = term._edb_object.GetParameters()[1]
|
|
1798
1804
|
locations.append([pd.X.ToDouble(), pd.Y.ToDouble()])
|
|
1799
1805
|
for point in locations:
|
|
1800
|
-
pointA = self.
|
|
1806
|
+
pointA = self.core.geometry.point_data(
|
|
1801
1807
|
self.edb_value(point[0] - expansion_size),
|
|
1802
1808
|
self.edb_value(point[1] - expansion_size),
|
|
1803
1809
|
)
|
|
1804
|
-
pointB = self.
|
|
1810
|
+
pointB = self.core.geometry.point_data(
|
|
1805
1811
|
self.edb_value(point[0] + expansion_size),
|
|
1806
1812
|
self.edb_value(point[1] + expansion_size),
|
|
1807
1813
|
)
|
|
1808
1814
|
|
|
1809
1815
|
points = Tuple[
|
|
1810
|
-
self.
|
|
1811
|
-
self.
|
|
1816
|
+
self.core.geometry.geometry.PointData,
|
|
1817
|
+
self.core.geometry.geometry.PointData,
|
|
1812
1818
|
](pointA, pointB)
|
|
1813
|
-
_polys.append(self.
|
|
1819
|
+
_polys.append(self.core.geometry.polygon_data.create_from_bbox(points))
|
|
1814
1820
|
return _polys
|
|
1815
1821
|
|
|
1816
1822
|
def _create_convex_hull(
|
|
@@ -1843,7 +1849,7 @@ class Edb(Database):
|
|
|
1843
1849
|
if smart_cut:
|
|
1844
1850
|
objs_data = self._smart_cut(reference_list, expansion_size)
|
|
1845
1851
|
_polys.extend(objs_data)
|
|
1846
|
-
_poly = self.
|
|
1852
|
+
_poly = self.core.geometry.polygon_data.get_convex_hull_of_polygons(convert_py_list_to_net_list(_polys))
|
|
1847
1853
|
_poly = _poly.Expand(expansion_size, tolerance, round_corner, round_extension)[0]
|
|
1848
1854
|
return _poly
|
|
1849
1855
|
|
|
@@ -1978,8 +1984,8 @@ class Edb(Database):
|
|
|
1978
1984
|
>>> edb.logger.info("Total legacy cutout time in min %s", end_time)
|
|
1979
1985
|
>>> edb.nets.plot(signal_list, None, color_by_net=True)
|
|
1980
1986
|
>>> edb.nets.plot(power_list, None, color_by_net=True)
|
|
1981
|
-
>>> edb.
|
|
1982
|
-
>>> edb.
|
|
1987
|
+
>>> edb.save()
|
|
1988
|
+
>>> edb.close()
|
|
1983
1989
|
|
|
1984
1990
|
|
|
1985
1991
|
"""
|
|
@@ -2051,12 +2057,12 @@ class Edb(Database):
|
|
|
2051
2057
|
)
|
|
2052
2058
|
if self.are_port_reference_terminals_connected():
|
|
2053
2059
|
if output_aedb_path:
|
|
2054
|
-
self.
|
|
2060
|
+
self.save_as(output_aedb_path)
|
|
2055
2061
|
else:
|
|
2056
|
-
self.
|
|
2062
|
+
self.save_as(legacy_path)
|
|
2057
2063
|
working_cutout = True
|
|
2058
2064
|
break
|
|
2059
|
-
self.
|
|
2065
|
+
self.close()
|
|
2060
2066
|
self.edbpath = legacy_path
|
|
2061
2067
|
self.open_edb()
|
|
2062
2068
|
i += 1
|
|
@@ -2091,8 +2097,8 @@ class Edb(Database):
|
|
|
2091
2097
|
inlcude_voids_in_extents=include_voids_in_extents,
|
|
2092
2098
|
)
|
|
2093
2099
|
if result and not open_cutout_at_end and self.edbpath != legacy_path:
|
|
2094
|
-
self.
|
|
2095
|
-
self.
|
|
2100
|
+
self.save()
|
|
2101
|
+
self.close()
|
|
2096
2102
|
self.edbpath = legacy_path
|
|
2097
2103
|
self.open_edb()
|
|
2098
2104
|
return result
|
|
@@ -2416,7 +2422,7 @@ class Edb(Database):
|
|
|
2416
2422
|
pins_to_preserve=pins_to_preserve,
|
|
2417
2423
|
inlcude_voids_in_extents=inlcude_voids_in_extents,
|
|
2418
2424
|
)
|
|
2419
|
-
if extent_type in ["Conforming", self.
|
|
2425
|
+
if extent_type in ["Conforming", self.core.geometry.extent_type.Conforming, 1]:
|
|
2420
2426
|
if extent_defeature > 0:
|
|
2421
2427
|
_poly = _poly.Defeature(extent_defeature)
|
|
2422
2428
|
_poly1 = _poly.CreateFromArcs(_poly.GetArcData(), True)
|
|
@@ -2681,14 +2687,10 @@ class Edb(Database):
|
|
|
2681
2687
|
via.pin.Delete()
|
|
2682
2688
|
if netlist:
|
|
2683
2689
|
nets = [net.net_obj for net in temp_edb.layout.nets if net.name in netlist]
|
|
2684
|
-
_poly = temp_edb.layout.expanded_extent(
|
|
2685
|
-
nets, self.edb_api.geometry.extent_type.Conforming, 0.0, True, True, 1
|
|
2686
|
-
)
|
|
2690
|
+
_poly = temp_edb.layout.expanded_extent(nets, self.core.geometry.extent_type.Conforming, 0.0, True, True, 1)
|
|
2687
2691
|
else:
|
|
2688
2692
|
nets = [net.api_object for net in temp_edb.layout.nets if "gnd" in net.name.lower()]
|
|
2689
|
-
_poly = temp_edb.layout.expanded_extent(
|
|
2690
|
-
nets, self.edb_api.geometry.extent_type.Conforming, 0.0, True, True, 1
|
|
2691
|
-
)
|
|
2693
|
+
_poly = temp_edb.layout.expanded_extent(nets, self.core.geometry.extent_type.Conforming, 0.0, True, True, 1)
|
|
2692
2694
|
temp_edb.close_edb()
|
|
2693
2695
|
if _poly:
|
|
2694
2696
|
return _poly
|
|
@@ -2789,9 +2791,7 @@ class Edb(Database):
|
|
|
2789
2791
|
p_missing = [i for i in pinstance_to_add if i.id not in ids]
|
|
2790
2792
|
self.logger.info("Added {} padstack instances after cutout".format(len(p_missing)))
|
|
2791
2793
|
for p in p_missing:
|
|
2792
|
-
position = self.
|
|
2793
|
-
self.edb_value(p.position[0]), self.edb_value(p.position[1])
|
|
2794
|
-
)
|
|
2794
|
+
position = self.core.geometry.point_data(self.edb_value(p.position[0]), self.edb_value(p.position[1]))
|
|
2795
2795
|
net = self.nets.find_or_create_net(p.net_name)
|
|
2796
2796
|
rotation = self.edb_value(p.rotation)
|
|
2797
2797
|
sign_layers = list(self.stackup.signal_layers.keys())
|
|
@@ -2808,7 +2808,7 @@ class Edb(Database):
|
|
|
2808
2808
|
for pad in list(self.padstacks.definitions.keys()):
|
|
2809
2809
|
if pad == p.padstack_definition:
|
|
2810
2810
|
padstack = self.padstacks.definitions[pad].edb_padstack
|
|
2811
|
-
padstack_instance = self.
|
|
2811
|
+
padstack_instance = self.core.cell.primitive.padstack_instance.create(
|
|
2812
2812
|
_cutout.GetLayout(),
|
|
2813
2813
|
net,
|
|
2814
2814
|
p.name,
|
|
@@ -2831,7 +2831,7 @@ class Edb(Database):
|
|
|
2831
2831
|
center_y,
|
|
2832
2832
|
radius,
|
|
2833
2833
|
) = void_circle.primitive_object.GetParameters(0.0, 0.0, 0.0)
|
|
2834
|
-
cloned_circle = self.
|
|
2834
|
+
cloned_circle = self.core.cell.primitive.circle.create(
|
|
2835
2835
|
layout,
|
|
2836
2836
|
void_circle.layer_name,
|
|
2837
2837
|
void_circle.net,
|
|
@@ -2841,7 +2841,7 @@ class Edb(Database):
|
|
|
2841
2841
|
)
|
|
2842
2842
|
cloned_circle.SetIsNegative(True)
|
|
2843
2843
|
elif void_circle.type == "Polygon":
|
|
2844
|
-
cloned_polygon = self.
|
|
2844
|
+
cloned_polygon = self.core.cell.primitive.polygon.create(
|
|
2845
2845
|
layout,
|
|
2846
2846
|
void_circle.layer_name,
|
|
2847
2847
|
void_circle.net,
|
|
@@ -3458,7 +3458,7 @@ class Edb(Database):
|
|
|
3458
3458
|
self.logger.info("Cutout processed.")
|
|
3459
3459
|
old_cell = self.active_cell.FindByName(
|
|
3460
3460
|
self.db,
|
|
3461
|
-
self.
|
|
3461
|
+
self.core.cell.CellType.CircuitCell,
|
|
3462
3462
|
old_cell_name,
|
|
3463
3463
|
)
|
|
3464
3464
|
if old_cell:
|
pyedb/generic/design_types.py
CHANGED
|
@@ -23,6 +23,7 @@ from typing import TYPE_CHECKING, Literal, Union, overload
|
|
|
23
23
|
import warnings
|
|
24
24
|
|
|
25
25
|
from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
|
|
26
|
+
from pyedb.misc.misc import list_installed_ansysem
|
|
26
27
|
|
|
27
28
|
if TYPE_CHECKING:
|
|
28
29
|
from pyedb.dotnet.edb import Edb as EdbDotnet
|
|
@@ -257,13 +258,21 @@ def Edb(
|
|
|
257
258
|
|
|
258
259
|
"""
|
|
259
260
|
|
|
261
|
+
if not edbversion: # pragma: no cover
|
|
262
|
+
try:
|
|
263
|
+
version = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
264
|
+
except IndexError:
|
|
265
|
+
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
266
|
+
else:
|
|
267
|
+
version = edbversion
|
|
268
|
+
|
|
260
269
|
# Use EDB legacy (default choice)
|
|
261
|
-
if float(
|
|
270
|
+
if float(version) >= 2025.2:
|
|
262
271
|
if not grpc:
|
|
263
272
|
warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
|
|
264
273
|
else:
|
|
265
274
|
if grpc:
|
|
266
|
-
raise ValueError(f"gRPC flag was enabled however your ANSYS AEDT version {
|
|
275
|
+
raise ValueError(f"gRPC flag was enabled however your ANSYS AEDT version {version} is not compatible")
|
|
267
276
|
if grpc:
|
|
268
277
|
from pyedb.grpc.edb import Edb as app
|
|
269
278
|
else:
|
|
@@ -272,7 +281,7 @@ def Edb(
|
|
|
272
281
|
edbpath=edbpath,
|
|
273
282
|
cellname=cellname,
|
|
274
283
|
isreadonly=isreadonly,
|
|
275
|
-
edbversion=
|
|
284
|
+
edbversion=version,
|
|
276
285
|
isaedtowned=isaedtowned,
|
|
277
286
|
oproject=oproject,
|
|
278
287
|
student_version=student_version,
|
pyedb/grpc/__init__.py
ADDED
|
File without changes
|
|
@@ -39,7 +39,6 @@ from ansys.edb.core.definition.solder_ball_property import (
|
|
|
39
39
|
from ansys.edb.core.hierarchy.component_group import ComponentType as GrpcComponentType
|
|
40
40
|
from ansys.edb.core.hierarchy.spice_model import SPICEModel as GrpcSPICEModel
|
|
41
41
|
from ansys.edb.core.utility.rlc import Rlc as GrpcRlc
|
|
42
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
43
42
|
|
|
44
43
|
from pyedb.component_libraries.ansys_components import (
|
|
45
44
|
ComponentLib,
|
|
@@ -57,6 +56,7 @@ from pyedb.grpc.database.hierarchy.pin_pair_model import PinPairModel
|
|
|
57
56
|
from pyedb.grpc.database.hierarchy.pingroup import PinGroup
|
|
58
57
|
from pyedb.grpc.database.padstacks import Padstacks
|
|
59
58
|
from pyedb.grpc.database.utility.sources import SourceType
|
|
59
|
+
from pyedb.grpc.database.utility.value import Value
|
|
60
60
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
61
61
|
|
|
62
62
|
|
|
@@ -1098,17 +1098,17 @@ class Components(object):
|
|
|
1098
1098
|
rlc.r_enabled = False
|
|
1099
1099
|
else:
|
|
1100
1100
|
rlc.r_enabled = True
|
|
1101
|
-
rlc.r =
|
|
1101
|
+
rlc.r = Value(r_value)
|
|
1102
1102
|
if l_value is None:
|
|
1103
1103
|
rlc.l_enabled = False
|
|
1104
1104
|
else:
|
|
1105
1105
|
rlc.l_enabled = True
|
|
1106
|
-
rlc.l =
|
|
1106
|
+
rlc.l = Value(l_value)
|
|
1107
1107
|
if c_value is None:
|
|
1108
1108
|
rlc.c_enabled = False
|
|
1109
1109
|
else:
|
|
1110
1110
|
rlc.c_enabled = True
|
|
1111
|
-
rlc.C =
|
|
1111
|
+
rlc.C = Value(c_value)
|
|
1112
1112
|
if rlc.r_enabled and not rlc.c_enabled and not rlc.l_enabled:
|
|
1113
1113
|
new_cmp.component_type = GrpcComponentType.RESISTOR
|
|
1114
1114
|
elif rlc.c_enabled and not rlc.r_enabled and not rlc.l_enabled:
|
|
@@ -1434,12 +1434,12 @@ class Components(object):
|
|
|
1434
1434
|
pin1 = list(cmp.pins.values())[0]
|
|
1435
1435
|
pin_layers = pin1.padstack_def.data.layer_names
|
|
1436
1436
|
pad_params = self._pedb.padstacks.get_pad_parameters(pin=pin1, layername=pin_layers[0], pad_type=0)
|
|
1437
|
-
_sb_diam = min([abs(
|
|
1437
|
+
_sb_diam = min([abs(Value(val)) for val in pad_params[1]])
|
|
1438
1438
|
sball_diam = 0.8 * _sb_diam
|
|
1439
1439
|
if sball_height:
|
|
1440
|
-
sball_height =
|
|
1440
|
+
sball_height = Value(sball_height)
|
|
1441
1441
|
else:
|
|
1442
|
-
sball_height =
|
|
1442
|
+
sball_height = Value(sball_diam)
|
|
1443
1443
|
|
|
1444
1444
|
if not sball_mid_diam:
|
|
1445
1445
|
sball_mid_diam = sball_diam
|
|
@@ -1460,17 +1460,17 @@ class Components(object):
|
|
|
1460
1460
|
cmp_property.die_property = ic_die_prop
|
|
1461
1461
|
|
|
1462
1462
|
solder_ball_prop = cmp_property.solder_ball_property
|
|
1463
|
-
solder_ball_prop.set_diameter(
|
|
1464
|
-
solder_ball_prop.height =
|
|
1463
|
+
solder_ball_prop.set_diameter(Value(sball_diam), Value(sball_mid_diam))
|
|
1464
|
+
solder_ball_prop.height = Value(sball_height)
|
|
1465
1465
|
|
|
1466
1466
|
solder_ball_prop.shape = sball_shape
|
|
1467
1467
|
cmp_property.solder_ball_property = solder_ball_prop
|
|
1468
1468
|
|
|
1469
1469
|
port_prop = cmp_property.port_property
|
|
1470
|
-
port_prop.reference_height =
|
|
1470
|
+
port_prop.reference_height = Value(reference_height)
|
|
1471
1471
|
port_prop.reference_size_auto = auto_reference_size
|
|
1472
1472
|
if not auto_reference_size:
|
|
1473
|
-
port_prop.set_reference_size(
|
|
1473
|
+
port_prop.set_reference_size(Value(reference_size_x), Value(reference_size_y))
|
|
1474
1474
|
cmp_property.port_property = port_prop
|
|
1475
1475
|
cmp.component_property = cmp_property
|
|
1476
1476
|
return True
|
|
@@ -1520,17 +1520,17 @@ class Components(object):
|
|
|
1520
1520
|
rlc.is_parallel = isparallel
|
|
1521
1521
|
if res_value is not None:
|
|
1522
1522
|
rlc.r_enabled = True
|
|
1523
|
-
rlc.r =
|
|
1523
|
+
rlc.r = Value(res_value)
|
|
1524
1524
|
else:
|
|
1525
1525
|
rlc.r_enabled = False
|
|
1526
1526
|
if ind_value is not None:
|
|
1527
1527
|
rlc.l_enabled = True
|
|
1528
|
-
rlc.l =
|
|
1528
|
+
rlc.l = Value(ind_value)
|
|
1529
1529
|
else:
|
|
1530
1530
|
rlc.l_enabled = False
|
|
1531
1531
|
if cap_value is not None:
|
|
1532
1532
|
rlc.c_enabled = True
|
|
1533
|
-
rlc.c =
|
|
1533
|
+
rlc.c = Value(cap_value)
|
|
1534
1534
|
else:
|
|
1535
1535
|
rlc.CEnabled = False
|
|
1536
1536
|
pin_pair = (from_pin.name, to_pin.name)
|
|
@@ -1838,7 +1838,7 @@ class Components(object):
|
|
|
1838
1838
|
transformed_pt_pos = pt_pos
|
|
1839
1839
|
else:
|
|
1840
1840
|
transformed_pt_pos = pin.component.transform.transform_point(pt_pos)
|
|
1841
|
-
return [transformed_pt_pos[0]
|
|
1841
|
+
return [Value(transformed_pt_pos[0]), Value(transformed_pt_pos[1])]
|
|
1842
1842
|
|
|
1843
1843
|
def get_pins_name_from_net(self, net_name: str, pin_list: Optional[List[Any]] = None) -> List[str]:
|
|
1844
1844
|
"""Get pin names from net.
|
|
@@ -2021,8 +2021,8 @@ class Components(object):
|
|
|
2021
2021
|
w = min(pars[0], w)
|
|
2022
2022
|
elif pad.polygon_data: # pragma: no cover
|
|
2023
2023
|
bbox = pad.polygon_data.bbox()
|
|
2024
|
-
lower = [bbox[0].x
|
|
2025
|
-
upper = [bbox[1].x
|
|
2024
|
+
lower = [Value(bbox[0].x), Value(bbox[0].y)]
|
|
2025
|
+
upper = [Value(bbox[1].x), Value(bbox[1].y)]
|
|
2026
2026
|
pars = [abs(lower[0] - upper[0]), abs(lower[1] - upper[1])]
|
|
2027
2027
|
delta_pins.append(max(pars) + min(pars) / 2)
|
|
2028
2028
|
w = min(min(pars), w)
|
|
@@ -2228,6 +2228,42 @@ class Components(object):
|
|
|
2228
2228
|
component=component.refdes, circuit_ports=create_circuit_port, pec_boundary=pec_boundary
|
|
2229
2229
|
)
|
|
2230
2230
|
|
|
2231
|
+
def add_port_on_rlc_component(
|
|
2232
|
+
self, component: Optional[Union[str, Component]] = None, circuit_ports: bool = True, pec_boundary: bool = False
|
|
2233
|
+
) -> bool:
|
|
2234
|
+
"""Deactivate RLC component and replace it with a circuit port.
|
|
2235
|
+
The circuit port supports only two-pin components.
|
|
2236
|
+
|
|
2237
|
+
Parameters
|
|
2238
|
+
----------
|
|
2239
|
+
component : str
|
|
2240
|
+
Reference designator of the RLC component.
|
|
2241
|
+
|
|
2242
|
+
circuit_ports : bool
|
|
2243
|
+
``True`` will replace RLC component by circuit ports, ``False`` gap ports compatible with HFSS 3D modeler
|
|
2244
|
+
export.
|
|
2245
|
+
|
|
2246
|
+
pec_boundary : bool, optional
|
|
2247
|
+
Whether to define the PEC boundary, The default is ``False``. If set to ``True``,
|
|
2248
|
+
a perfect short is created between the pin and impedance is ignored. This
|
|
2249
|
+
parameter is only supported on a port created between two pins, such as
|
|
2250
|
+
when there is no pin group.
|
|
2251
|
+
|
|
2252
|
+
Returns
|
|
2253
|
+
-------
|
|
2254
|
+
bool
|
|
2255
|
+
``True`` when successful, ``False`` when failed.
|
|
2256
|
+
|
|
2257
|
+
Examples
|
|
2258
|
+
--------
|
|
2259
|
+
>>> from pyedb import Edb
|
|
2260
|
+
>>> edb = Edb()
|
|
2261
|
+
>>> edb.source_excitation.add_port_on_rlc_component("R1")
|
|
2262
|
+
"""
|
|
2263
|
+
return self._pedb.source_excitation.add_port_on_rlc_component(
|
|
2264
|
+
component=component, circuit_ports=circuit_ports, pec_boundary=pec_boundary
|
|
2265
|
+
)
|
|
2266
|
+
|
|
2231
2267
|
def replace_rlc_by_gap_boundaries(self, component: Optional[Union[str, Component]] = None) -> bool:
|
|
2232
2268
|
"""Replace RLC component by RLC gap boundaries. These boundary types are compatible with 3D modeler export.
|
|
2233
2269
|
Only 2 pins RLC components are supported in this command.
|