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
|
@@ -36,7 +36,6 @@ from pyedb.generic.general_methods import (
|
|
|
36
36
|
settings,
|
|
37
37
|
)
|
|
38
38
|
from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
|
|
39
|
-
from pyedb.misc.misc import list_installed_ansysem
|
|
40
39
|
|
|
41
40
|
|
|
42
41
|
class HierarchyDotNet:
|
|
@@ -53,8 +52,8 @@ class HierarchyDotNet:
|
|
|
53
52
|
|
|
54
53
|
def __init__(self, app):
|
|
55
54
|
self._app = app
|
|
56
|
-
self.
|
|
57
|
-
self._hierarchy = self.
|
|
55
|
+
self.core = self._app._edb
|
|
56
|
+
self._hierarchy = self.core.Cell.Hierarchy
|
|
58
57
|
|
|
59
58
|
@property
|
|
60
59
|
def api_class(self): # pragma: no cover
|
|
@@ -91,8 +90,8 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
91
90
|
|
|
92
91
|
def __init__(self, pedb, api_object=None):
|
|
93
92
|
self._pedb = pedb
|
|
94
|
-
self.dotnetobj = pedb.
|
|
95
|
-
self.
|
|
93
|
+
self.dotnetobj = pedb.core.geometry.api_class.PolygonData
|
|
94
|
+
self.core = api_object
|
|
96
95
|
self._edb_object = api_object
|
|
97
96
|
|
|
98
97
|
@property
|
|
@@ -103,7 +102,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
103
102
|
@property
|
|
104
103
|
def arcs(self): # pragma: no cover
|
|
105
104
|
"""List of Edb.Geometry.ArcData."""
|
|
106
|
-
return list(self.
|
|
105
|
+
return list(self.core.GetArcData())
|
|
107
106
|
|
|
108
107
|
def add_point(self, x, y, incremental=False):
|
|
109
108
|
"""Add a point at the end of the point list of the polygon.
|
|
@@ -129,7 +128,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
129
128
|
last_point = self.get_points()[-1]
|
|
130
129
|
x = "({})+({})".format(x, last_point[0].ToString())
|
|
131
130
|
y = "({})+({})".format(y, last_point[1].ToString())
|
|
132
|
-
return self.
|
|
131
|
+
return self.core.AddPoint(GeometryDotNet(self._pedb).point_data(x, y))
|
|
133
132
|
|
|
134
133
|
def get_bbox_of_boxes(self, points):
|
|
135
134
|
"""Get the EDB .NET API ``Edb.Geometry.GetBBoxOfBoxes`` database.
|
|
@@ -162,9 +161,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
162
161
|
from pyedb.dotnet.clr_module import Tuple
|
|
163
162
|
|
|
164
163
|
if isinstance(points, (tuple, list)):
|
|
165
|
-
points = Tuple[self._pedb.
|
|
166
|
-
points[0], points[1]
|
|
167
|
-
)
|
|
164
|
+
points = Tuple[self._pedb.core.Geometry.PointData, self._pedb.core.Geometry.PointData](points[0], points[1])
|
|
168
165
|
return self.dotnetobj.CreateFromBBox(points)
|
|
169
166
|
|
|
170
167
|
def create_from_arcs(self, arcs, flag):
|
|
@@ -212,7 +209,7 @@ class NetDotNet:
|
|
|
212
209
|
def __init__(self, app, net_obj=None):
|
|
213
210
|
self.net = app._edb.Cell.Net
|
|
214
211
|
|
|
215
|
-
self.
|
|
212
|
+
self.core = app._edb
|
|
216
213
|
self._app = app
|
|
217
214
|
self.net_obj = net_obj
|
|
218
215
|
|
|
@@ -283,7 +280,7 @@ class NetClassDotNet:
|
|
|
283
280
|
def __init__(self, app, api_object=None):
|
|
284
281
|
self.cell_net_class = app._edb.Cell.NetClass
|
|
285
282
|
self.api_object = api_object
|
|
286
|
-
self.
|
|
283
|
+
self.core = app._edb
|
|
287
284
|
self._app = app
|
|
288
285
|
|
|
289
286
|
@property
|
|
@@ -319,7 +316,7 @@ class NetClassDotNet:
|
|
|
319
316
|
object
|
|
320
317
|
"""
|
|
321
318
|
if self.api_object:
|
|
322
|
-
edb_api_net = self.
|
|
319
|
+
edb_api_net = self.core.Cell.Net.FindByName(self._app.active_layout, name)
|
|
323
320
|
return self.api_object.AddNet(edb_api_net)
|
|
324
321
|
|
|
325
322
|
def delete(self): # pragma: no cover
|
|
@@ -379,8 +376,8 @@ class DifferentialPairDotNet(NetClassDotNet):
|
|
|
379
376
|
return DifferentialPairDotNet(self._app, self.cell_diff_pair.Create(self._app.active_layout, name))
|
|
380
377
|
|
|
381
378
|
def _api_set_differential_pair(self, net_name_p, net_name_n):
|
|
382
|
-
edb_api_net_p = self.
|
|
383
|
-
edb_api_net_n = self.
|
|
379
|
+
edb_api_net_p = self.core.Cell.Net.FindByName(self._app.active_layout, net_name_p)
|
|
380
|
+
edb_api_net_n = self.core.Cell.Net.FindByName(self._app.active_layout, net_name_n)
|
|
384
381
|
self.api_object.SetDifferentialPair(edb_api_net_p, edb_api_net_n)
|
|
385
382
|
|
|
386
383
|
@property
|
|
@@ -416,8 +413,8 @@ class CellClassDotNet:
|
|
|
416
413
|
|
|
417
414
|
def __init__(self, app, active_cell=None):
|
|
418
415
|
self._app = app
|
|
419
|
-
self.
|
|
420
|
-
self._cell = self.
|
|
416
|
+
self.core = app._edb
|
|
417
|
+
self._cell = self.core.Cell
|
|
421
418
|
self._active_cell = active_cell
|
|
422
419
|
|
|
423
420
|
@property
|
|
@@ -519,7 +516,7 @@ class UtilityDotNet:
|
|
|
519
516
|
def __init__(self, app):
|
|
520
517
|
self._app = app
|
|
521
518
|
self.utility = app._edb.Utility
|
|
522
|
-
self.
|
|
519
|
+
self.core = app._edb
|
|
523
520
|
self.active_db = app._db
|
|
524
521
|
self.active_cell = app._active_cell
|
|
525
522
|
|
|
@@ -567,7 +564,7 @@ class GeometryDotNet:
|
|
|
567
564
|
def __init__(self, app):
|
|
568
565
|
self._app = app
|
|
569
566
|
self.geometry = self._app._edb.Geometry
|
|
570
|
-
self.
|
|
567
|
+
self.core = self._app._edb
|
|
571
568
|
|
|
572
569
|
@property
|
|
573
570
|
def api_class(self):
|
|
@@ -648,29 +645,29 @@ class CellDotNet:
|
|
|
648
645
|
return super().__getattribute__(key)
|
|
649
646
|
except AttributeError:
|
|
650
647
|
try:
|
|
651
|
-
return getattr(self.
|
|
648
|
+
return getattr(self.core, key)
|
|
652
649
|
except AttributeError:
|
|
653
650
|
raise AttributeError("Attribute not present")
|
|
654
651
|
|
|
655
652
|
def __init__(self, app):
|
|
656
653
|
self._app = app
|
|
657
|
-
self.
|
|
654
|
+
self.core = app._edb
|
|
658
655
|
|
|
659
656
|
@property
|
|
660
657
|
def api_class(self):
|
|
661
658
|
"""Return Ansys.Ansoft.Edb class object."""
|
|
662
|
-
return self.
|
|
659
|
+
return self.core
|
|
663
660
|
|
|
664
661
|
@property
|
|
665
662
|
def definition(self):
|
|
666
663
|
"""Edb Dotnet Api Definition."""
|
|
667
664
|
|
|
668
|
-
return self.
|
|
665
|
+
return self.core.Definition
|
|
669
666
|
|
|
670
667
|
@property
|
|
671
668
|
def database(self):
|
|
672
669
|
"""Edb Dotnet Api Database."""
|
|
673
|
-
return self.
|
|
670
|
+
return self.core.Database
|
|
674
671
|
|
|
675
672
|
@property
|
|
676
673
|
def cell(self):
|
|
@@ -705,12 +702,7 @@ class EdbDotNet(object):
|
|
|
705
702
|
"""Edb Dot Net Class."""
|
|
706
703
|
|
|
707
704
|
def __init__(self, edbversion, student_version=False):
|
|
708
|
-
|
|
709
|
-
try:
|
|
710
|
-
edbversion = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
711
|
-
self._logger.info("Edb version " + edbversion)
|
|
712
|
-
except IndexError:
|
|
713
|
-
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
705
|
+
self._logger.info(f"Edb version {edbversion}")
|
|
714
706
|
self.edbversion = edbversion
|
|
715
707
|
if float(self.edbversion) >= 2025.2:
|
|
716
708
|
warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
|
|
@@ -797,6 +789,19 @@ class EdbDotNet(object):
|
|
|
797
789
|
def edb_api(self):
|
|
798
790
|
"""Edb Dotnet Api class.
|
|
799
791
|
|
|
792
|
+
.. deprecated:: 0.54.0
|
|
793
|
+
Use :func:core` instead.
|
|
794
|
+
Returns
|
|
795
|
+
-------
|
|
796
|
+
:class:`pyedb.dotnet.database.dotnet.database.CellDotNet`
|
|
797
|
+
"""
|
|
798
|
+
warnings.warn("`edb_api` is deprecated, use `core` instead.", DeprecationWarning)
|
|
799
|
+
return CellDotNet(self)
|
|
800
|
+
|
|
801
|
+
@property
|
|
802
|
+
def core(self):
|
|
803
|
+
"""Edb Dotnet Api class.
|
|
804
|
+
|
|
800
805
|
Returns
|
|
801
806
|
-------
|
|
802
807
|
:class:`pyedb.dotnet.database.dotnet.database.CellDotNet`
|
|
@@ -806,12 +811,12 @@ class EdbDotNet(object):
|
|
|
806
811
|
@property
|
|
807
812
|
def database(self):
|
|
808
813
|
"""Edb Dotnet Api Database."""
|
|
809
|
-
return self.
|
|
814
|
+
return self.core.database
|
|
810
815
|
|
|
811
816
|
@property
|
|
812
817
|
def definition(self):
|
|
813
818
|
"""Edb Dotnet Api Database `Edb.Definition`."""
|
|
814
|
-
return self.
|
|
819
|
+
return self.core.Definition
|
|
815
820
|
|
|
816
821
|
|
|
817
822
|
class Database(EdbDotNet):
|
|
@@ -845,7 +850,7 @@ class Database(EdbDotNet):
|
|
|
845
850
|
flag : bool
|
|
846
851
|
Whether if Edb is run as standalone or embedded in AEDT.
|
|
847
852
|
"""
|
|
848
|
-
self.
|
|
853
|
+
self.core.database.SetRunAsStandAlone(flag)
|
|
849
854
|
|
|
850
855
|
def create(self, db_path):
|
|
851
856
|
"""Create a Database at the specified file location.
|
|
@@ -859,7 +864,7 @@ class Database(EdbDotNet):
|
|
|
859
864
|
-------
|
|
860
865
|
Database
|
|
861
866
|
"""
|
|
862
|
-
self._db = self.
|
|
867
|
+
self._db = self.core.database.Create(db_path)
|
|
863
868
|
return self._db
|
|
864
869
|
|
|
865
870
|
def open(self, db_path, read_only):
|
|
@@ -877,7 +882,7 @@ class Database(EdbDotNet):
|
|
|
877
882
|
Database or None
|
|
878
883
|
The opened Database object, or None if not found.
|
|
879
884
|
"""
|
|
880
|
-
self._db = self.
|
|
885
|
+
self._db = self.core.database.Open(
|
|
881
886
|
db_path,
|
|
882
887
|
read_only,
|
|
883
888
|
)
|
|
@@ -893,7 +898,7 @@ class Database(EdbDotNet):
|
|
|
893
898
|
db_path : str
|
|
894
899
|
Path to top-level database folder.
|
|
895
900
|
"""
|
|
896
|
-
return self.
|
|
901
|
+
return self.core.database.Delete(db_path)
|
|
897
902
|
|
|
898
903
|
def save(self):
|
|
899
904
|
"""Save any changes into a file."""
|
|
@@ -972,7 +977,7 @@ class Database(EdbDotNet):
|
|
|
972
977
|
Database
|
|
973
978
|
The Database or Null on failure.
|
|
974
979
|
"""
|
|
975
|
-
self.
|
|
980
|
+
self.core.database.FindById(db_id)
|
|
976
981
|
|
|
977
982
|
def save_as(self, path, version=""):
|
|
978
983
|
"""Save this Database to a new location and older EDB version.
|
|
@@ -1232,5 +1237,5 @@ class Database(EdbDotNet):
|
|
|
1232
1237
|
from pyedb.dotnet.clr_module import Convert
|
|
1233
1238
|
|
|
1234
1239
|
hdl = Convert.ToUInt64(hdb)
|
|
1235
|
-
self._db = self.
|
|
1240
|
+
self._db = self.core.database.Attach(hdl)
|
|
1236
1241
|
return self._db
|
|
@@ -56,7 +56,7 @@ class PrimitiveDotNet:
|
|
|
56
56
|
def __init__(self, api, prim_object=None):
|
|
57
57
|
self._app = api
|
|
58
58
|
self.api = api._edb.Cell.Primitive
|
|
59
|
-
self.
|
|
59
|
+
self.core = api._edb
|
|
60
60
|
self.prim_obj = prim_object
|
|
61
61
|
self._edb_object = prim_object
|
|
62
62
|
|
|
@@ -133,7 +133,7 @@ class PrimitiveDotNet:
|
|
|
133
133
|
if _poly is None or _poly.IsNull() or _poly is False:
|
|
134
134
|
self._logger.error("Failed to create void polygon data")
|
|
135
135
|
return False
|
|
136
|
-
point_list = self._app.
|
|
136
|
+
point_list = self._app.core.cell.primitive.polygon.create(
|
|
137
137
|
self._app.active_layout, self.layer_name, self.prim_obj.GetNet(), _poly
|
|
138
138
|
).prim_obj
|
|
139
139
|
elif "prim_obj" in dir(point_list):
|
|
@@ -340,7 +340,7 @@ class PrimitiveDotNet:
|
|
|
340
340
|
maximum_corner_extension : float, optional
|
|
341
341
|
The maximum corner extension (when round corners are not used) at which point the corner is clipped.
|
|
342
342
|
"""
|
|
343
|
-
new_poly = self.polygon_data.
|
|
343
|
+
new_poly = self.polygon_data.core.Expand(offset, tolerance, round_corners, maximum_corner_extension)
|
|
344
344
|
self.polygon_data = new_poly[0]
|
|
345
345
|
return True
|
|
346
346
|
|
|
@@ -361,9 +361,9 @@ class PrimitiveDotNet:
|
|
|
361
361
|
"""
|
|
362
362
|
if not isinstance(factor, str):
|
|
363
363
|
factor = float(factor)
|
|
364
|
-
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.
|
|
364
|
+
polygon_data = self.polygon_data.create_from_arcs(self.polygon_data.core.GetArcData(), True)
|
|
365
365
|
if not center:
|
|
366
|
-
center = self.polygon_data.
|
|
366
|
+
center = self.polygon_data.core.GetBoundingCircleCenter()
|
|
367
367
|
if center:
|
|
368
368
|
polygon_data.Scale(factor, center)
|
|
369
369
|
self.polygon_data = polygon_data
|
|
@@ -422,15 +422,15 @@ class RectangleDotNet(PrimitiveDotNet):
|
|
|
422
422
|
net = net.api_object
|
|
423
423
|
if isinstance(rep_type, int):
|
|
424
424
|
if rep_type == 1:
|
|
425
|
-
rep_type = self.
|
|
425
|
+
rep_type = self.core.cell.primitive.RectangleRepresentationType.CenterWidthHeight
|
|
426
426
|
else:
|
|
427
|
-
rep_type = self.
|
|
428
|
-
param1 = self._app.
|
|
429
|
-
param2 = self._app.
|
|
430
|
-
param3 = self._app.
|
|
431
|
-
param4 = self._app.
|
|
432
|
-
corner_rad = self._app.
|
|
433
|
-
rotation = self._app.
|
|
427
|
+
rep_type = self.core.cell.primitive.RectangleRepresentationType.LowerLeftUpperRight
|
|
428
|
+
param1 = self._app.core.utility.value(param1)
|
|
429
|
+
param2 = self._app.core.utility.value(param2)
|
|
430
|
+
param3 = self._app.core.utility.value(param3)
|
|
431
|
+
param4 = self._app.core.utility.value(param4)
|
|
432
|
+
corner_rad = self._app.core.utility.value(corner_rad)
|
|
433
|
+
rotation = self._app.core.utility.value(rotation)
|
|
434
434
|
return RectangleDotNet(
|
|
435
435
|
self._app,
|
|
436
436
|
self.api.Rectangle.Create(
|
|
@@ -742,10 +742,10 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
742
742
|
"""
|
|
743
743
|
if isinstance(net, NetDotNet):
|
|
744
744
|
net = net.api_object
|
|
745
|
-
width = self._app.
|
|
745
|
+
width = self._app.core.utility.value(width)
|
|
746
746
|
if isinstance(points, list):
|
|
747
747
|
points = convert_py_list_to_net_list([self._app.point_data(i[0], i[1]) for i in points])
|
|
748
|
-
points = self._app.
|
|
748
|
+
points = self._app.core.geometry.polygon_data.dotnetobj(points)
|
|
749
749
|
return PathDotNet(
|
|
750
750
|
self._app, self.api.Path.Create(layout, layer, net, width, end_cap1, end_cap2, corner_style, points)
|
|
751
751
|
)
|
|
@@ -1501,7 +1501,7 @@ class BoardBendDef(PrimitiveDotNet):
|
|
|
1501
1501
|
|
|
1502
1502
|
Read-Only.
|
|
1503
1503
|
"""
|
|
1504
|
-
return cast(self.
|
|
1504
|
+
return cast(self.core, self.prim_obj.GetBoundaryPrim())
|
|
1505
1505
|
|
|
1506
1506
|
@property
|
|
1507
1507
|
def bend_middle(self):
|
|
@@ -38,14 +38,14 @@ class HfssExtentInfo:
|
|
|
38
38
|
self._pedb = pedb
|
|
39
39
|
|
|
40
40
|
self._hfss_extent_info_type = {
|
|
41
|
-
"bounding_box": self._pedb.
|
|
42
|
-
"conforming": self._pedb.
|
|
43
|
-
"convexHull": self._pedb.
|
|
44
|
-
"polygon": self._pedb.
|
|
41
|
+
"bounding_box": self._pedb.core.utility.utility.HFSSExtentInfoType.BoundingBox,
|
|
42
|
+
"conforming": self._pedb.core.utility.utility.HFSSExtentInfoType.Conforming,
|
|
43
|
+
"convexHull": self._pedb.core.utility.utility.HFSSExtentInfoType.ConvexHull,
|
|
44
|
+
"polygon": self._pedb.core.utility.utility.HFSSExtentInfoType.Polygon,
|
|
45
45
|
}
|
|
46
46
|
self._open_region_type = {
|
|
47
|
-
"radiation": self._pedb.
|
|
48
|
-
"pml": self._pedb.
|
|
47
|
+
"radiation": self._pedb.core.utility.utility.OpenRegionType.Radiation,
|
|
48
|
+
"pml": self._pedb.core.utility.utility.OpenRegionType.PML,
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
def _get_edb_value(self, value):
|
|
@@ -49,7 +49,7 @@ class LayerEdbClass(object):
|
|
|
49
49
|
layer_type = self._layer_name_mapping[layer_type]
|
|
50
50
|
layer_type = self._doc_layer_mapping[layer_type]
|
|
51
51
|
|
|
52
|
-
self._edb_object = self._pedb.
|
|
52
|
+
self._edb_object = self._pedb.core.cell._cell.Layer(
|
|
53
53
|
self._name,
|
|
54
54
|
layer_type,
|
|
55
55
|
)
|
|
@@ -146,7 +146,7 @@ class LayerEdbClass(object):
|
|
|
146
146
|
|
|
147
147
|
@property
|
|
148
148
|
def _edb(self):
|
|
149
|
-
return self._pedb.
|
|
149
|
+
return self._pedb.core
|
|
150
150
|
|
|
151
151
|
@property
|
|
152
152
|
def _edb_layer(self):
|
|
@@ -289,7 +289,7 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
289
289
|
def _create(self, layer_type):
|
|
290
290
|
layer_type_edb_name = self._layer_name_mapping[layer_type]
|
|
291
291
|
layer_type = self._layer_type_mapping[layer_type_edb_name]
|
|
292
|
-
self._edb_object = self._pedb.
|
|
292
|
+
self._edb_object = self._pedb.core.cell._cell.StackupLayer(
|
|
293
293
|
self._name,
|
|
294
294
|
layer_type,
|
|
295
295
|
self._pedb.edb_value(0),
|
|
@@ -639,11 +639,11 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
639
639
|
if not self.is_stackup_layer: # pragma: no cover
|
|
640
640
|
return
|
|
641
641
|
if surface == "top":
|
|
642
|
-
return self._edb_layer.GetRoughnessModel(self._pedb.
|
|
642
|
+
return self._edb_layer.GetRoughnessModel(self._pedb.core.Cell.RoughnessModel.Region.Top)
|
|
643
643
|
elif surface == "bottom":
|
|
644
|
-
return self._edb_layer.GetRoughnessModel(self._pedb.
|
|
644
|
+
return self._edb_layer.GetRoughnessModel(self._pedb.core.Cell.RoughnessModel.Region.Bottom)
|
|
645
645
|
elif surface == "side":
|
|
646
|
-
return self._edb_layer.GetRoughnessModel(self._pedb.
|
|
646
|
+
return self._edb_layer.GetRoughnessModel(self._pedb.core.Cell.RoughnessModel.Region.Side)
|
|
647
647
|
|
|
648
648
|
def assign_roughness_model(
|
|
649
649
|
self,
|
|
@@ -685,27 +685,27 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
685
685
|
if apply_on_surface == "all":
|
|
686
686
|
self._side_roughness = "all"
|
|
687
687
|
regions = [
|
|
688
|
-
self._pedb.
|
|
689
|
-
self._pedb.
|
|
690
|
-
self._pedb.
|
|
688
|
+
self._pedb.core.Cell.RoughnessModel.Region.Top,
|
|
689
|
+
self._pedb.core.Cell.RoughnessModel.Region.Side,
|
|
690
|
+
self._pedb.core.Cell.RoughnessModel.Region.Bottom,
|
|
691
691
|
]
|
|
692
692
|
elif apply_on_surface == "top":
|
|
693
693
|
self._side_roughness = "top"
|
|
694
|
-
regions = [self._pedb.
|
|
694
|
+
regions = [self._pedb.core.Cell.RoughnessModel.Region.Top]
|
|
695
695
|
elif apply_on_surface == "bottom":
|
|
696
696
|
self._side_roughness = "bottom"
|
|
697
|
-
regions = [self._pedb.
|
|
697
|
+
regions = [self._pedb.core.Cell.RoughnessModel.Region.Bottom]
|
|
698
698
|
elif apply_on_surface == "side":
|
|
699
699
|
self._side_roughness = "side"
|
|
700
|
-
regions = [self._pedb.
|
|
700
|
+
regions = [self._pedb.core.Cell.RoughnessModel.Region.Side]
|
|
701
701
|
|
|
702
702
|
layer_clone = self._edb_layer
|
|
703
703
|
layer_clone.SetRoughnessEnabled(True)
|
|
704
704
|
for r in regions:
|
|
705
705
|
if model_type == "huray":
|
|
706
|
-
model = self._pedb.
|
|
706
|
+
model = self._pedb.core.Cell.HurrayRoughnessModel(radius, surface_ratio)
|
|
707
707
|
else:
|
|
708
|
-
model = self._pedb.
|
|
708
|
+
model = self._pedb.core.Cell.GroisseRoughnessModel(groisse_roughness)
|
|
709
709
|
layer_clone.SetRoughnessModel(r, model)
|
|
710
710
|
return self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")
|
|
711
711
|
|
|
@@ -954,13 +954,13 @@ class EDBPadstack(object):
|
|
|
954
954
|
stop = layer_names[layer_names.index(layer_name) + 1]
|
|
955
955
|
new_padstack_name = "MV_{}_{}_{}".format(self.name, start, stop)
|
|
956
956
|
included = [start, stop]
|
|
957
|
-
new_padstack_definition_data = self._ppadstack._pedb.
|
|
957
|
+
new_padstack_definition_data = self._ppadstack._pedb.core.definition.PadstackDefData.Create()
|
|
958
958
|
new_padstack_definition_data.AddLayers(convert_py_list_to_net_list(included))
|
|
959
959
|
for layer in included:
|
|
960
960
|
pl = self.pad_by_layer[layer]
|
|
961
961
|
new_padstack_definition_data.SetPadParameters(
|
|
962
962
|
layer,
|
|
963
|
-
self._ppadstack._pedb.
|
|
963
|
+
self._ppadstack._pedb.core.definition.PadType.RegularPad,
|
|
964
964
|
pl.int_to_geometry_type(pl.geometry_type),
|
|
965
965
|
list(
|
|
966
966
|
pl._edb_padstack.GetData().GetPadParametersValue(
|
|
@@ -980,7 +980,7 @@ class EDBPadstack(object):
|
|
|
980
980
|
pl = self.antipad_by_layer[layer]
|
|
981
981
|
new_padstack_definition_data.SetPadParameters(
|
|
982
982
|
layer,
|
|
983
|
-
self._ppadstack._pedb.
|
|
983
|
+
self._ppadstack._pedb.core.definition.PadType.AntiPad,
|
|
984
984
|
pl.int_to_geometry_type(pl.geometry_type),
|
|
985
985
|
list(
|
|
986
986
|
pl._edb_padstack.GetData().GetPadParametersValue(
|
|
@@ -1000,7 +1000,7 @@ class EDBPadstack(object):
|
|
|
1000
1000
|
pl = self.thermalpad_by_layer[layer]
|
|
1001
1001
|
new_padstack_definition_data.SetPadParameters(
|
|
1002
1002
|
layer,
|
|
1003
|
-
self._ppadstack._pedb.
|
|
1003
|
+
self._ppadstack._pedb.core.definition.PadType.ThermalPad,
|
|
1004
1004
|
pl.int_to_geometry_type(pl.geometry_type),
|
|
1005
1005
|
list(
|
|
1006
1006
|
pl._edb_padstack.GetData().GetPadParametersValue(
|
|
@@ -1422,7 +1422,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1422
1422
|
tuple
|
|
1423
1423
|
Tuple of the layer name, drill diameter, and offset if it exists.
|
|
1424
1424
|
"""
|
|
1425
|
-
layer = self._pedb.
|
|
1425
|
+
layer = self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer)
|
|
1426
1426
|
val = self._pedb.edb_value(0)
|
|
1427
1427
|
offset = self._pedb.edb_value(0.0)
|
|
1428
1428
|
(
|
|
@@ -1488,7 +1488,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1488
1488
|
tuple
|
|
1489
1489
|
Tuple of the layer name, drill diameter, and drill offset if it exists.
|
|
1490
1490
|
"""
|
|
1491
|
-
layer = self._pedb.
|
|
1491
|
+
layer = self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer)
|
|
1492
1492
|
val = self._pedb.edb_value(0)
|
|
1493
1493
|
offset = self._pedb.edb_value(0.0)
|
|
1494
1494
|
(
|
|
@@ -1509,7 +1509,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1509
1509
|
def backdrill_parameters(self):
|
|
1510
1510
|
data = {}
|
|
1511
1511
|
flag, drill_to_layer, offset, diameter = self._edb_object.GetBackDrillParametersLayerValue(
|
|
1512
|
-
self._pedb.
|
|
1512
|
+
self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer),
|
|
1513
1513
|
self._pedb.edb_value(0),
|
|
1514
1514
|
self._pedb.edb_value(0.0),
|
|
1515
1515
|
True,
|
|
@@ -1522,7 +1522,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1522
1522
|
"stub_length": offset.ToString(),
|
|
1523
1523
|
}
|
|
1524
1524
|
flag, drill_to_layer, offset, diameter = self._edb_object.GetBackDrillParametersLayerValue(
|
|
1525
|
-
self._pedb.
|
|
1525
|
+
self._pedb.core.cell.layer("", self._pedb.core.cell.layer_type.SignalLayer),
|
|
1526
1526
|
self._pedb.edb_value(0),
|
|
1527
1527
|
self._pedb.edb_value(0.0),
|
|
1528
1528
|
False,
|
|
@@ -1710,7 +1710,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1710
1710
|
pos.append(self._pedb.edb_value(v))
|
|
1711
1711
|
else:
|
|
1712
1712
|
pos.append(v)
|
|
1713
|
-
point_data = self._pedb.
|
|
1713
|
+
point_data = self._pedb.core.geometry.point_data(pos[0], pos[1])
|
|
1714
1714
|
self._edb_padstackinstance.SetPositionAndRotation(point_data, self._pedb.edb_value(self.rotation))
|
|
1715
1715
|
|
|
1716
1716
|
@property
|
|
@@ -1738,7 +1738,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1738
1738
|
@name.setter
|
|
1739
1739
|
def name(self, value):
|
|
1740
1740
|
self._edb_padstackinstance.SetName(value)
|
|
1741
|
-
self._edb_padstackinstance.SetProductProperty(self._pedb.
|
|
1741
|
+
self._edb_padstackinstance.SetProductProperty(self._pedb.core.ProductId.Designer, 11, value)
|
|
1742
1742
|
|
|
1743
1743
|
@property
|
|
1744
1744
|
def metal_volume(self):
|
|
@@ -1806,7 +1806,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1806
1806
|
"""
|
|
1807
1807
|
|
|
1808
1808
|
val = String("")
|
|
1809
|
-
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.
|
|
1809
|
+
_, name = self._edb_padstackinstance.GetProductProperty(self._pedb.core.ProductId.Designer, 11, val)
|
|
1810
1810
|
aedt_name = str(name).strip("'")
|
|
1811
1811
|
if aedt_name == "":
|
|
1812
1812
|
if self.is_pin and self.component:
|
|
@@ -1818,7 +1818,7 @@ class EDBPadstackInstance(Primitive):
|
|
|
1818
1818
|
|
|
1819
1819
|
@aedt_name.setter
|
|
1820
1820
|
def aedt_name(self, value):
|
|
1821
|
-
self._edb_object.SetProductProperty(self._pedb.
|
|
1821
|
+
self._edb_object.SetProductProperty(self._pedb.core.ProductId.Designer, 11, value)
|
|
1822
1822
|
|
|
1823
1823
|
def parametrize_position(self, prefix=None):
|
|
1824
1824
|
"""Parametrize the instance position.
|
|
@@ -109,7 +109,7 @@ class EdbPolygon(Primitive):
|
|
|
109
109
|
new_polygons = list(self.polygon_data._edb_object.RemoveSelfIntersections())
|
|
110
110
|
self._edb_object.SetPolygonData(new_polygons[0])
|
|
111
111
|
for p in new_polygons[1:]:
|
|
112
|
-
cloned_poly = self._app.
|
|
112
|
+
cloned_poly = self._app.core.cell.primitive.polygon.create(
|
|
113
113
|
self._app.active_layout, self.layer_name, self.net, p
|
|
114
114
|
)
|
|
115
115
|
new_polys.append(cloned_poly)
|
|
@@ -258,7 +258,7 @@ class EdbPolygon(Primitive):
|
|
|
258
258
|
``True`` when successful, ``False`` when failed.
|
|
259
259
|
"""
|
|
260
260
|
if isinstance(point_data, list):
|
|
261
|
-
point_data = self._app.
|
|
261
|
+
point_data = self._app.core.geometry.point_data(
|
|
262
262
|
self._app.edb_value(point_data[0]), self._app.edb_value(point_data[1])
|
|
263
263
|
)
|
|
264
264
|
int_val = int(self.polygon_data._edb_object.PointInPolygon(point_data))
|
|
@@ -297,7 +297,7 @@ class EdbPolygon(Primitive):
|
|
|
297
297
|
# if _poly is None or _poly.IsNull() or _poly is False:
|
|
298
298
|
# self._logger.error("Failed to create void polygon data")
|
|
299
299
|
# return False
|
|
300
|
-
# prim = self._app.
|
|
300
|
+
# prim = self._app.core.cell.primitive.polygon.create(
|
|
301
301
|
# self._app.active_layout, self.layer_name, self.primitive_object.GetNet(), _poly
|
|
302
302
|
# )
|
|
303
303
|
# elif isinstance(point_list, Primitive):
|
|
@@ -369,28 +369,28 @@ class PinGroup(object):
|
|
|
369
369
|
|
|
370
370
|
def create_current_source_terminal(self, magnitude=1, phase=0):
|
|
371
371
|
terminal = self.create_terminal()._edb_object
|
|
372
|
-
terminal.SetBoundaryType(self._pedb.
|
|
372
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.kCurrentSource)
|
|
373
373
|
terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude))
|
|
374
|
-
terminal.SetSourcePhase(self._pedb.
|
|
374
|
+
terminal.SetSourcePhase(self._pedb.core.utility.value(phase))
|
|
375
375
|
return terminal
|
|
376
376
|
|
|
377
377
|
def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001):
|
|
378
378
|
terminal = self.create_terminal()._edb_object
|
|
379
|
-
terminal.SetBoundaryType(self._pedb.
|
|
379
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.kVoltageSource)
|
|
380
380
|
terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude))
|
|
381
|
-
terminal.SetSourcePhase(self._pedb.
|
|
381
|
+
terminal.SetSourcePhase(self._pedb.core.utility.value(phase))
|
|
382
382
|
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
383
383
|
return terminal
|
|
384
384
|
|
|
385
385
|
def create_voltage_probe_terminal(self, impedance=1000000):
|
|
386
386
|
terminal = self.create_terminal()._edb_object
|
|
387
|
-
terminal.SetBoundaryType(self._pedb.
|
|
387
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.kVoltageProbe)
|
|
388
388
|
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
389
389
|
return terminal
|
|
390
390
|
|
|
391
391
|
def create_port_terminal(self, impedance=50):
|
|
392
392
|
terminal = self.create_terminal()._edb_object
|
|
393
|
-
terminal.SetBoundaryType(self._pedb.
|
|
393
|
+
terminal.SetBoundaryType(self._pedb.core.cell.terminal.BoundaryType.PortBoundary)
|
|
394
394
|
terminal.SetImpedance(self._pedb.edb_value(impedance))
|
|
395
395
|
terminal.SetIsCircuitPort(True)
|
|
396
396
|
return terminal
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
|
+
import warnings
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
class Variable:
|
|
@@ -57,7 +58,10 @@ class Variable:
|
|
|
57
58
|
str
|
|
58
59
|
|
|
59
60
|
"""
|
|
60
|
-
|
|
61
|
+
warnings.warn(
|
|
62
|
+
"`value_string` is deprecated. Use `str(value)` method instead.", DeprecationWarning, stacklevel=2
|
|
63
|
+
)
|
|
64
|
+
return str(self.value)
|
|
61
65
|
|
|
62
66
|
@property
|
|
63
67
|
def value_object(self):
|
|
@@ -77,11 +81,11 @@ class Variable:
|
|
|
77
81
|
-------
|
|
78
82
|
float
|
|
79
83
|
"""
|
|
80
|
-
return self._var_server.GetVariableValue(self.name)[1]
|
|
84
|
+
return self._pedb.value(self._var_server.GetVariableValue(self.name)[1])
|
|
81
85
|
|
|
82
86
|
@value.setter
|
|
83
87
|
def value(self, value):
|
|
84
|
-
self._var_server.SetVariableValue(self.name, self._pedb.
|
|
88
|
+
self._var_server.SetVariableValue(self.name, self._pedb.value(value)._edb_obj)
|
|
85
89
|
|
|
86
90
|
@property
|
|
87
91
|
def description(self):
|
|
@@ -91,13 +91,11 @@ class PolygonData:
|
|
|
91
91
|
list_of_point_data = []
|
|
92
92
|
for pt in points:
|
|
93
93
|
list_of_point_data.append(PointData(self._pedb, x=pt[0], y=pt[1])._edb_object)
|
|
94
|
-
return self._pedb.
|
|
95
|
-
convert_py_list_to_net_list(list_of_point_data), closed
|
|
96
|
-
)
|
|
94
|
+
return self._pedb.core.geometry.api_class.PolygonData(convert_py_list_to_net_list(list_of_point_data), closed)
|
|
97
95
|
|
|
98
96
|
def create_from_bounding_box(self, points):
|
|
99
97
|
bbox = BBox(self._pedb, point_1=points[0], point_2=points[1])
|
|
100
|
-
return self._pedb.
|
|
98
|
+
return self._pedb.core.geometry.api_class.PolygonData.CreateFromBBox(bbox._edb_object)
|
|
101
99
|
|
|
102
100
|
def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001):
|
|
103
101
|
"""Expand the polygon shape by an absolute value in all direction.
|