pyedb 0.22.1__py3-none-any.whl → 0.24.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_components.py +1 -1
- pyedb/configuration/cfg_ports_sources.py +3 -3
- pyedb/configuration/configuration.py +2 -2
- pyedb/dotnet/edb.py +55 -56
- pyedb/dotnet/edb_core/cell/hierarchy/component.py +1 -1
- pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +11 -0
- pyedb/dotnet/edb_core/cell/layout.py +30 -23
- pyedb/dotnet/edb_core/cell/layout_obj.py +0 -9
- pyedb/dotnet/edb_core/cell/primitive/__init__.py +3 -0
- pyedb/dotnet/edb_core/cell/{primitive.py → primitive/bondwire.py} +1 -146
- pyedb/dotnet/edb_core/cell/primitive/path.py +351 -0
- pyedb/dotnet/edb_core/cell/primitive/primitive.py +895 -0
- pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +0 -4
- pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +1 -1
- pyedb/dotnet/edb_core/cell/terminal/terminal.py +1 -1
- pyedb/dotnet/edb_core/components.py +26 -18
- pyedb/dotnet/edb_core/dotnet/database.py +1 -23
- pyedb/dotnet/edb_core/dotnet/primitive.py +3 -139
- pyedb/dotnet/edb_core/edb_data/nets_data.py +1 -11
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +12 -38
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +56 -868
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +0 -18
- pyedb/dotnet/edb_core/geometry/polygon_data.py +43 -0
- pyedb/dotnet/edb_core/hfss.py +27 -23
- pyedb/dotnet/edb_core/layout_validation.py +3 -3
- pyedb/dotnet/edb_core/materials.py +1 -1
- pyedb/dotnet/edb_core/modeler.py +65 -82
- pyedb/dotnet/edb_core/nets.py +8 -7
- pyedb/dotnet/edb_core/padstack.py +16 -17
- pyedb/dotnet/edb_core/siwave.py +2 -2
- pyedb/dotnet/edb_core/stackup.py +64 -87
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -1
- pyedb/ipc2581/ecad/cad_data/polygon.py +2 -2
- pyedb/ipc2581/ecad/cad_data/step.py +3 -3
- pyedb/ipc2581/ipc2581.py +2 -2
- pyedb/siwave.py +99 -0
- {pyedb-0.22.1.dist-info → pyedb-0.24.0.dist-info}/METADATA +3 -3
- {pyedb-0.22.1.dist-info → pyedb-0.24.0.dist-info}/RECORD +41 -38
- {pyedb-0.22.1.dist-info → pyedb-0.24.0.dist-info}/LICENSE +0 -0
- {pyedb-0.22.1.dist-info → pyedb-0.24.0.dist-info}/WHEEL +0 -0
|
@@ -43,10 +43,6 @@ class BundleTerminal(Terminal):
|
|
|
43
43
|
"""Get terminals belonging to this excitation."""
|
|
44
44
|
return [EdgeTerminal(self._pedb, i) for i in list(self._edb_object.GetTerminals())]
|
|
45
45
|
|
|
46
|
-
@property
|
|
47
|
-
def name(self):
|
|
48
|
-
return self.terminals[0].name
|
|
49
|
-
|
|
50
46
|
def decouple(self):
|
|
51
47
|
"""Ungroup a bundle of terminals."""
|
|
52
48
|
return self._edb_object.Ungroup()
|
|
@@ -47,4 +47,4 @@ class EdgeTerminal(Terminal):
|
|
|
47
47
|
temp.extend([i._edb_object for i in port])
|
|
48
48
|
edb_list = convert_py_list_to_net_list(temp, self._edb.cell.terminal.Terminal)
|
|
49
49
|
_edb_bundle_terminal = self._edb.cell.terminal.BundleTerminal.Create(edb_list)
|
|
50
|
-
return self._pedb.ports[
|
|
50
|
+
return self._pedb.ports[_edb_bundle_terminal.GetName()]
|
|
@@ -418,7 +418,7 @@ class Terminal(Connectable):
|
|
|
418
418
|
if gnd_net is not None:
|
|
419
419
|
power_ground_net_names = [gnd_net]
|
|
420
420
|
else:
|
|
421
|
-
power_ground_net_names = [net for net in self._pedb.nets.
|
|
421
|
+
power_ground_net_names = [net for net in self._pedb.nets.power.keys()]
|
|
422
422
|
comp_ref_pins = [i for i in pin_list if i.GetNet().GetName() in power_ground_net_names]
|
|
423
423
|
if len(comp_ref_pins) == 0: # pragma: no cover
|
|
424
424
|
self._pedb.logger.error(
|
|
@@ -133,7 +133,7 @@ class Components(object):
|
|
|
133
133
|
return self._pedb.edb_api
|
|
134
134
|
|
|
135
135
|
def _init_parts(self):
|
|
136
|
-
a = self.
|
|
136
|
+
a = self.instances
|
|
137
137
|
a = self.resistors
|
|
138
138
|
a = self.ICs
|
|
139
139
|
a = self.Others
|
|
@@ -202,7 +202,7 @@ class Components(object):
|
|
|
202
202
|
|
|
203
203
|
>>> from pyedb import Edb
|
|
204
204
|
>>> edbapp = Edb("myaedbfolder")
|
|
205
|
-
>>> edbapp.components.
|
|
205
|
+
>>> edbapp.components.instances
|
|
206
206
|
|
|
207
207
|
"""
|
|
208
208
|
if not self._cmp:
|
|
@@ -980,12 +980,7 @@ class Components(object):
|
|
|
980
980
|
"""
|
|
981
981
|
if isinstance(component, str):
|
|
982
982
|
component = self.instances[component].edbcomponent
|
|
983
|
-
|
|
984
|
-
solder_balls_height = self.instances[component.GetName()].solder_ball_height
|
|
985
|
-
if not solder_balls_size:
|
|
986
|
-
solder_balls_size = self.instances[component.GetName()].solder_ball_diameter[0]
|
|
987
|
-
if not solder_balls_mid_size:
|
|
988
|
-
solder_balls_mid_size = self.instances[component.GetName()].solder_ball_diameter[1]
|
|
983
|
+
|
|
989
984
|
if not isinstance(net_list, list):
|
|
990
985
|
net_list = [net_list]
|
|
991
986
|
for net in net_list:
|
|
@@ -1011,6 +1006,12 @@ class Components(object):
|
|
|
1011
1006
|
return False
|
|
1012
1007
|
pin_layers = cmp_pins[0].GetPadstackDef().GetData().GetLayerNames()
|
|
1013
1008
|
if port_type == SourceType.CoaxPort:
|
|
1009
|
+
if not solder_balls_height:
|
|
1010
|
+
solder_balls_height = self.instances[component.GetName()].solder_ball_height
|
|
1011
|
+
if not solder_balls_size:
|
|
1012
|
+
solder_balls_size = self.instances[component.GetName()].solder_ball_diameter[0]
|
|
1013
|
+
if not solder_balls_mid_size:
|
|
1014
|
+
solder_balls_mid_size = self.instances[component.GetName()].solder_ball_diameter[1]
|
|
1014
1015
|
ref_pins = [
|
|
1015
1016
|
p
|
|
1016
1017
|
for p in list(component.LayoutObjs)
|
|
@@ -1133,7 +1134,7 @@ class Components(object):
|
|
|
1133
1134
|
self.create_port_on_pins(
|
|
1134
1135
|
component,
|
|
1135
1136
|
[EDBPadstackInstance(pin, self._pedb).name],
|
|
1136
|
-
[EDBPadstackInstance(ref_pin[0], self._pedb).id],
|
|
1137
|
+
[EDBPadstackInstance(ref_pin[0]._edb_object, self._pedb).id],
|
|
1137
1138
|
)
|
|
1138
1139
|
else:
|
|
1139
1140
|
self._logger.error("Skipping port creation no reference pin found.")
|
|
@@ -1605,6 +1606,7 @@ class Components(object):
|
|
|
1605
1606
|
>>> edbapp.components.create(pins, "A1New")
|
|
1606
1607
|
|
|
1607
1608
|
"""
|
|
1609
|
+
pins = [p._edb_object for p in pins]
|
|
1608
1610
|
if not component_name:
|
|
1609
1611
|
component_name = generate_unique_name("Comp_")
|
|
1610
1612
|
if component_part_name:
|
|
@@ -1618,7 +1620,7 @@ class Components(object):
|
|
|
1618
1620
|
)
|
|
1619
1621
|
|
|
1620
1622
|
if isinstance(pins[0], EDBPadstackInstance):
|
|
1621
|
-
pins = [i.
|
|
1623
|
+
pins = [i._edb_object for i in pins]
|
|
1622
1624
|
hosting_component_location = pins[0].GetComponent().GetTransform()
|
|
1623
1625
|
for pin in pins:
|
|
1624
1626
|
pin.SetIsLayoutPin(True)
|
|
@@ -1745,7 +1747,7 @@ class Components(object):
|
|
|
1745
1747
|
"""
|
|
1746
1748
|
if not modelname:
|
|
1747
1749
|
modelname = get_filename_without_extension(modelpath)
|
|
1748
|
-
edbComponent = self.get_component_by_name(componentname)
|
|
1750
|
+
edbComponent = self.get_component_by_name(componentname)._edb_object
|
|
1749
1751
|
if str(edbComponent.EDBHandle) == "0":
|
|
1750
1752
|
return False
|
|
1751
1753
|
edbRlcComponentProperty = edbComponent.GetComponentProperty().Clone()
|
|
@@ -1957,7 +1959,7 @@ class Components(object):
|
|
|
1957
1959
|
>>> edbapp.components.delete("A1")
|
|
1958
1960
|
|
|
1959
1961
|
"""
|
|
1960
|
-
edb_cmp = self.get_component_by_name(component_name)
|
|
1962
|
+
edb_cmp = self.get_component_by_name(component_name)._edb_object
|
|
1961
1963
|
if edb_cmp is not None:
|
|
1962
1964
|
edb_cmp.Delete()
|
|
1963
1965
|
if edb_cmp in list(self.instances.keys()):
|
|
@@ -1988,6 +1990,7 @@ class Components(object):
|
|
|
1988
1990
|
"""
|
|
1989
1991
|
edb_cmp = self.get_component_by_name(component_name)
|
|
1990
1992
|
if edb_cmp is not None:
|
|
1993
|
+
edb_cmp = edb_cmp._edb_object
|
|
1991
1994
|
rlc_property = edb_cmp.GetComponentProperty().Clone()
|
|
1992
1995
|
pin_pair_model = rlc_property.GetModel().Clone()
|
|
1993
1996
|
pprlc = pin_pair_model.GetPinPairRlc(list(pin_pair_model.PinPairs)[0])
|
|
@@ -2148,7 +2151,7 @@ class Components(object):
|
|
|
2148
2151
|
self.instances[componentname].is_enabled = False
|
|
2149
2152
|
self._logger.info("No parameters passed, component %s is disabled.", componentname)
|
|
2150
2153
|
return True
|
|
2151
|
-
edb_component = self.get_component_by_name(componentname)
|
|
2154
|
+
edb_component = self.get_component_by_name(componentname)._edb_object
|
|
2152
2155
|
edb_rlc_component_property = self._edb.cell.hierarchy._hierarchy.RLCComponentProperty()
|
|
2153
2156
|
component_pins = self.get_pin_from_component(componentname)
|
|
2154
2157
|
pin_number = len(component_pins)
|
|
@@ -2256,7 +2259,7 @@ class Components(object):
|
|
|
2256
2259
|
self.set_component_rlc(new_refdes, ind_value=new_value)
|
|
2257
2260
|
unmount_comp_list.remove(new_refdes)
|
|
2258
2261
|
for comp in unmount_comp_list:
|
|
2259
|
-
self.
|
|
2262
|
+
self.instances[comp].is_enabled = False
|
|
2260
2263
|
return found
|
|
2261
2264
|
|
|
2262
2265
|
def import_bom(
|
|
@@ -2301,7 +2304,7 @@ class Components(object):
|
|
|
2301
2304
|
l = l.split(delimiter)
|
|
2302
2305
|
|
|
2303
2306
|
refdes = l[refdes_col]
|
|
2304
|
-
comp = self.
|
|
2307
|
+
comp = self.instances[refdes]
|
|
2305
2308
|
if not part_name_col == None:
|
|
2306
2309
|
part_name = l[part_name_col]
|
|
2307
2310
|
if comp.partname == part_name:
|
|
@@ -2321,9 +2324,10 @@ class Components(object):
|
|
|
2321
2324
|
unmount_comp_list.remove(refdes)
|
|
2322
2325
|
comp.edbcomponent.Ungroup(True)
|
|
2323
2326
|
|
|
2327
|
+
pinlist = [self._pedb.layout.find_object_by_id(i.GetId()) for i in pinlist]
|
|
2324
2328
|
self.create(pinlist, refdes, p_layer, part_name)
|
|
2325
2329
|
self.refresh_components()
|
|
2326
|
-
comp = self.
|
|
2330
|
+
comp = self.instances[refdes]
|
|
2327
2331
|
|
|
2328
2332
|
comp_type = l[comp_type_col]
|
|
2329
2333
|
if comp_type.capitalize() in ["Resistor", "Capacitor", "Inductor", "Other"]:
|
|
@@ -2346,7 +2350,7 @@ class Components(object):
|
|
|
2346
2350
|
elif comp_type == "Inductor":
|
|
2347
2351
|
self.set_component_rlc(refdes, ind_value=value)
|
|
2348
2352
|
for comp in unmount_comp_list:
|
|
2349
|
-
self.
|
|
2353
|
+
self.instances[comp].is_enabled = False
|
|
2350
2354
|
return True
|
|
2351
2355
|
|
|
2352
2356
|
def export_bom(self, bom_file, delimiter=","):
|
|
@@ -2521,6 +2525,10 @@ class Components(object):
|
|
|
2521
2525
|
>>> edbapp.components.get_pin_position(pin)
|
|
2522
2526
|
|
|
2523
2527
|
"""
|
|
2528
|
+
try:
|
|
2529
|
+
pin = pin._edb_object
|
|
2530
|
+
except:
|
|
2531
|
+
pin = pin
|
|
2524
2532
|
res, pt_pos, rot_pos = pin.GetPositionAndRotation()
|
|
2525
2533
|
|
|
2526
2534
|
if pin.GetComponent().IsNull():
|
|
@@ -2707,7 +2715,7 @@ class Components(object):
|
|
|
2707
2715
|
>>> edbapp.components.short_component_pins("J4A2", ["G4", "9", "3"])
|
|
2708
2716
|
|
|
2709
2717
|
"""
|
|
2710
|
-
component = self.
|
|
2718
|
+
component = self.instances[component_name]
|
|
2711
2719
|
pins = component.pins
|
|
2712
2720
|
pins_list = []
|
|
2713
2721
|
|
|
@@ -92,6 +92,7 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
92
92
|
self._pedb = pedb
|
|
93
93
|
self.dotnetobj = pedb.edb_api.geometry.api_class.PolygonData
|
|
94
94
|
self.edb_api = api_object
|
|
95
|
+
self._edb_object = api_object
|
|
95
96
|
|
|
96
97
|
@property
|
|
97
98
|
def api_class(self): # pragma: no cover
|
|
@@ -103,16 +104,6 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
103
104
|
"""List of Edb.Geometry.ArcData."""
|
|
104
105
|
return list(self.edb_api.GetArcData())
|
|
105
106
|
|
|
106
|
-
def get_points(self):
|
|
107
|
-
"""Get all points in polygon.
|
|
108
|
-
|
|
109
|
-
Returns
|
|
110
|
-
-------
|
|
111
|
-
list[list[edb_value]]
|
|
112
|
-
"""
|
|
113
|
-
|
|
114
|
-
return [[self._pedb.edb_value(i.X), self._pedb.edb_value(i.Y)] for i in list(self.edb_api.Points)]
|
|
115
|
-
|
|
116
107
|
def add_point(self, x, y, incremental=False):
|
|
117
108
|
"""Add a point at the end of the point list of the polygon.
|
|
118
109
|
|
|
@@ -217,19 +208,6 @@ class PolygonDataDotNet: # pragma: no cover
|
|
|
217
208
|
class NetDotNet:
|
|
218
209
|
"""Net Objects."""
|
|
219
210
|
|
|
220
|
-
def __getattr__(self, key):
|
|
221
|
-
try:
|
|
222
|
-
return super().__getattribute__(key)
|
|
223
|
-
except AttributeError:
|
|
224
|
-
if self.net_obj and key in dir(self.net_obj):
|
|
225
|
-
obj = self.net_obj
|
|
226
|
-
else:
|
|
227
|
-
obj = self.net
|
|
228
|
-
try:
|
|
229
|
-
return getattr(obj, key)
|
|
230
|
-
except AttributeError:
|
|
231
|
-
raise AttributeError("Attribute not present")
|
|
232
|
-
|
|
233
211
|
def __init__(self, app, net_obj=None):
|
|
234
212
|
self.net = app._edb.Cell.Net
|
|
235
213
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
"""Primitive."""
|
|
24
|
-
from pyedb.dotnet.edb_core.dotnet.database import NetDotNet
|
|
24
|
+
from pyedb.dotnet.edb_core.dotnet.database import NetDotNet
|
|
25
25
|
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
26
26
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
27
27
|
|
|
@@ -36,8 +36,6 @@ def cast(api, prim_object):
|
|
|
36
36
|
prim_type = prim_object.GetPrimitiveType()
|
|
37
37
|
if prim_type == prim_type.Rectangle:
|
|
38
38
|
return RectangleDotNet(api, prim_object)
|
|
39
|
-
elif prim_type == prim_type.Polygon:
|
|
40
|
-
return PolygonDotNet(api, prim_object)
|
|
41
39
|
elif prim_type == prim_type.Path:
|
|
42
40
|
return PathDotNet(api, prim_object)
|
|
43
41
|
elif prim_type == prim_type.Bondwire:
|
|
@@ -53,67 +51,17 @@ def cast(api, prim_object):
|
|
|
53
51
|
class PrimitiveDotNet:
|
|
54
52
|
"""Base class representing primitive objects."""
|
|
55
53
|
|
|
56
|
-
def __getattr__(self, key):
|
|
57
|
-
try:
|
|
58
|
-
return super().__getattribute__(key)
|
|
59
|
-
except AttributeError:
|
|
60
|
-
if self.prim_obj and key in dir(self.prim_obj):
|
|
61
|
-
obj = self.prim_obj
|
|
62
|
-
else:
|
|
63
|
-
obj = self.api
|
|
64
|
-
try:
|
|
65
|
-
return getattr(obj, key)
|
|
66
|
-
except AttributeError: # pragma: no cover
|
|
67
|
-
raise AttributeError("Attribute {} not present".format(key))
|
|
68
|
-
|
|
69
54
|
def __init__(self, api, prim_object=None):
|
|
70
55
|
self._app = api
|
|
71
56
|
self.api = api._edb.Cell.Primitive
|
|
72
57
|
self.edb_api = api._edb
|
|
73
58
|
self.prim_obj = prim_object
|
|
74
|
-
|
|
75
|
-
@property
|
|
76
|
-
def id(self):
|
|
77
|
-
return self.prim_obj.GetId()
|
|
59
|
+
self._edb_object = prim_object
|
|
78
60
|
|
|
79
61
|
@property
|
|
80
62
|
def api_class(self):
|
|
81
63
|
return self.api
|
|
82
64
|
|
|
83
|
-
@property
|
|
84
|
-
def aedt_name(self):
|
|
85
|
-
"""Name to be visualized in AEDT.
|
|
86
|
-
|
|
87
|
-
Returns
|
|
88
|
-
-------
|
|
89
|
-
str
|
|
90
|
-
Name.
|
|
91
|
-
"""
|
|
92
|
-
from System import String
|
|
93
|
-
|
|
94
|
-
val = String("")
|
|
95
|
-
|
|
96
|
-
_, name = self.prim_obj.GetProductProperty(self._app._edb.ProductId.Designer, 1, val)
|
|
97
|
-
name = str(name).strip("'")
|
|
98
|
-
if name == "":
|
|
99
|
-
if str(self.primitive_type) == "Path":
|
|
100
|
-
ptype = "line"
|
|
101
|
-
elif str(self.primitive_type) == "Rectangle":
|
|
102
|
-
ptype = "rect"
|
|
103
|
-
elif str(self.primitive_type) == "Polygon":
|
|
104
|
-
ptype = "poly"
|
|
105
|
-
elif str(self.primitive_type) == "Bondwire":
|
|
106
|
-
ptype = "bwr"
|
|
107
|
-
else:
|
|
108
|
-
ptype = str(self.primitive_type).lower()
|
|
109
|
-
name = "{}_{}".format(ptype, self.id)
|
|
110
|
-
self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, name)
|
|
111
|
-
return name
|
|
112
|
-
|
|
113
|
-
@aedt_name.setter
|
|
114
|
-
def aedt_name(self, value):
|
|
115
|
-
self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, value)
|
|
116
|
-
|
|
117
65
|
@property
|
|
118
66
|
def api_object(self):
|
|
119
67
|
return self.prim_obj
|
|
@@ -130,10 +78,6 @@ class PrimitiveDotNet:
|
|
|
130
78
|
def circle(self):
|
|
131
79
|
return CircleDotNet(self._app)
|
|
132
80
|
|
|
133
|
-
@property
|
|
134
|
-
def polygon(self):
|
|
135
|
-
return PolygonDotNet(self._app)
|
|
136
|
-
|
|
137
81
|
@property
|
|
138
82
|
def text(self):
|
|
139
83
|
return TextDotNet(self._app)
|
|
@@ -160,15 +104,6 @@ class PrimitiveDotNet:
|
|
|
160
104
|
except TypeError:
|
|
161
105
|
self._app.logger.error("Error setting net object")
|
|
162
106
|
|
|
163
|
-
@property
|
|
164
|
-
def polygon_data(self):
|
|
165
|
-
""":class:`pyedb.dotnet.edb_core.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object."""
|
|
166
|
-
return PolygonDataDotNet(self._app, self.prim_obj.GetPolygonData())
|
|
167
|
-
|
|
168
|
-
@polygon_data.setter
|
|
169
|
-
def polygon_data(self, poly):
|
|
170
|
-
return self.prim_obj.SetPolygonData(poly)
|
|
171
|
-
|
|
172
107
|
@property
|
|
173
108
|
def primitive_type(self):
|
|
174
109
|
""":class:`PrimitiveType`: Primitive type of the primitive.
|
|
@@ -583,6 +518,7 @@ class CircleDotNet(PrimitiveDotNet):
|
|
|
583
518
|
|
|
584
519
|
def __init__(self, api, prim_obj=None):
|
|
585
520
|
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
521
|
+
self._edb_object = prim_obj
|
|
586
522
|
|
|
587
523
|
def create(self, layout, layer, net, center_x, center_y, radius):
|
|
588
524
|
"""Create a circle.
|
|
@@ -772,44 +708,6 @@ class TextDotNet(PrimitiveDotNet):
|
|
|
772
708
|
)
|
|
773
709
|
|
|
774
710
|
|
|
775
|
-
class PolygonDotNet(PrimitiveDotNet):
|
|
776
|
-
"""Class representing a polygon object."""
|
|
777
|
-
|
|
778
|
-
def __init__(self, api, prim_obj=None):
|
|
779
|
-
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
780
|
-
|
|
781
|
-
def create(self, layout, layer, net, polygon_data):
|
|
782
|
-
"""Create a polygon.
|
|
783
|
-
|
|
784
|
-
Parameters
|
|
785
|
-
----------
|
|
786
|
-
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
787
|
-
Layout the polygon will be in.
|
|
788
|
-
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
789
|
-
Layer this Polygon will be in.
|
|
790
|
-
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
791
|
-
Net of the Polygon object.
|
|
792
|
-
polygon_data : :class:`PolygonData <ansys.edb.geometry.PolygonData>`
|
|
793
|
-
The outer contour of the Polygon.
|
|
794
|
-
|
|
795
|
-
Returns
|
|
796
|
-
-------
|
|
797
|
-
:class:`pyedb.dotnet.edb_core.dotnet.primitive.PolygonDotNet`
|
|
798
|
-
Polygon object created.
|
|
799
|
-
"""
|
|
800
|
-
if isinstance(net, NetDotNet):
|
|
801
|
-
net = net.api_object
|
|
802
|
-
return PolygonDotNet(self._app, self.api.Polygon.Create(layout, layer, net, polygon_data))
|
|
803
|
-
|
|
804
|
-
@property
|
|
805
|
-
def can_be_zone_primitive(self):
|
|
806
|
-
""":obj:`bool`: If a polygon can be a zone.
|
|
807
|
-
|
|
808
|
-
Read-Only.
|
|
809
|
-
"""
|
|
810
|
-
return True
|
|
811
|
-
|
|
812
|
-
|
|
813
711
|
class PathDotNet(PrimitiveDotNet):
|
|
814
712
|
"""Class representing a path object."""
|
|
815
713
|
|
|
@@ -866,40 +764,6 @@ class PathDotNet(PrimitiveDotNet):
|
|
|
866
764
|
polygon_data = self._edb.geometry.polygon_data.dotnetobj(convert_py_list_to_net_list(points), False)
|
|
867
765
|
self.prim_obj.SetCenterLine(polygon_data)
|
|
868
766
|
|
|
869
|
-
@property
|
|
870
|
-
def end_cap_style(self):
|
|
871
|
-
"""Get path end cap styles.
|
|
872
|
-
|
|
873
|
-
Returns
|
|
874
|
-
-------
|
|
875
|
-
tuple[
|
|
876
|
-
:class:`PathEndCapType`,
|
|
877
|
-
:class:`PathEndCapType`
|
|
878
|
-
]
|
|
879
|
-
|
|
880
|
-
Returns a tuple of the following format:
|
|
881
|
-
|
|
882
|
-
**(end_cap1, end_cap2)**
|
|
883
|
-
|
|
884
|
-
**end_cap1** : End cap style of path start end cap.
|
|
885
|
-
|
|
886
|
-
**end_cap2** : End cap style of path end end cap.
|
|
887
|
-
"""
|
|
888
|
-
return self._edb_object.GetEndCapStyle()
|
|
889
|
-
|
|
890
|
-
@end_cap_style.setter
|
|
891
|
-
def end_cap_style(self, end_cap1, end_cap2):
|
|
892
|
-
"""Set path end cap styles.
|
|
893
|
-
|
|
894
|
-
Parameters
|
|
895
|
-
----------
|
|
896
|
-
end_cap1: :class:`PathEndCapType`
|
|
897
|
-
End cap style of path start end cap.
|
|
898
|
-
end_cap2: :class:`PathEndCapType`
|
|
899
|
-
End cap style of path end end cap.
|
|
900
|
-
"""
|
|
901
|
-
self._edb_object.SetEndCapStyle(end_cap1, end_cap2)
|
|
902
|
-
|
|
903
767
|
@property
|
|
904
768
|
def get_clip_info(self):
|
|
905
769
|
"""Get data used to clip the path.
|
|
@@ -27,7 +27,6 @@ from pyedb.dotnet.edb_core.dotnet.database import (
|
|
|
27
27
|
NetDotNet,
|
|
28
28
|
)
|
|
29
29
|
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
30
|
-
from pyedb.dotnet.edb_core.edb_data.primitives_data import cast
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
class EDBNetsData(NetDotNet):
|
|
@@ -43,15 +42,6 @@ class EDBNetsData(NetDotNet):
|
|
|
43
42
|
>>> edb_net.name # EDB Object Property
|
|
44
43
|
"""
|
|
45
44
|
|
|
46
|
-
def __getattr__(self, key):
|
|
47
|
-
try:
|
|
48
|
-
return self[key]
|
|
49
|
-
except:
|
|
50
|
-
try:
|
|
51
|
-
return getattr(self.net_object, key)
|
|
52
|
-
except AttributeError:
|
|
53
|
-
raise AttributeError("Attribute not present")
|
|
54
|
-
|
|
55
45
|
def __init__(self, raw_net, core_app):
|
|
56
46
|
self._app = core_app
|
|
57
47
|
self._core_components = core_app.components
|
|
@@ -68,7 +58,7 @@ class EDBNetsData(NetDotNet):
|
|
|
68
58
|
-------
|
|
69
59
|
list of :class:`pyedb.dotnet.edb_core.edb_data.primitives_data.EDBPrimitives`
|
|
70
60
|
"""
|
|
71
|
-
return [
|
|
61
|
+
return [self._app.layout.find_object_by_id(i.GetId()) for i in self.net_object.Primitives]
|
|
72
62
|
|
|
73
63
|
@property
|
|
74
64
|
def padstack_instances(self):
|
|
@@ -26,7 +26,7 @@ import re
|
|
|
26
26
|
import warnings
|
|
27
27
|
|
|
28
28
|
from pyedb.dotnet.clr_module import String
|
|
29
|
-
from pyedb.dotnet.edb_core.cell.primitive import Primitive
|
|
29
|
+
from pyedb.dotnet.edb_core.cell.primitive.primitive import Primitive
|
|
30
30
|
from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
|
|
31
31
|
from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue
|
|
32
32
|
from pyedb.dotnet.edb_core.general import PadGeometryTpe, convert_py_list_to_net_list
|
|
@@ -726,9 +726,7 @@ class EDBPadstack(object):
|
|
|
726
726
|
-------
|
|
727
727
|
dict
|
|
728
728
|
"""
|
|
729
|
-
return {
|
|
730
|
-
id: via for id, via in self._ppadstack.padstack_instances.items() if via.padstack_definition == self.name
|
|
731
|
-
}
|
|
729
|
+
return {id: via for id, via in self._ppadstack.instances.items() if via.padstack_definition == self.name}
|
|
732
730
|
|
|
733
731
|
@property
|
|
734
732
|
def hole_range(self):
|
|
@@ -801,7 +799,7 @@ class EDBPadstack(object):
|
|
|
801
799
|
layer_names = [i for i in list(layers.keys())]
|
|
802
800
|
if convert_only_signal_vias:
|
|
803
801
|
signal_nets = [i for i in list(self._ppadstack._pedb.nets.signal_nets.keys())]
|
|
804
|
-
topl, topz, bottoml, bottomz = self._ppadstack._pedb.stackup.
|
|
802
|
+
topl, topz, bottoml, bottomz = self._ppadstack._pedb.stackup.limits(True)
|
|
805
803
|
if self.via_start_layer in layers:
|
|
806
804
|
start_elevation = layers[self.via_start_layer].lower_elevation
|
|
807
805
|
else:
|
|
@@ -823,11 +821,10 @@ class EDBPadstack(object):
|
|
|
823
821
|
pos = via.position
|
|
824
822
|
started = False
|
|
825
823
|
if len(self.pad_by_layer[self.via_start_layer].parameters) == 0:
|
|
826
|
-
self.
|
|
827
|
-
|
|
828
|
-
self.via_start_layer,
|
|
829
|
-
via._edb_padstackinstance.GetNet(),
|
|
830
|
-
self.pad_by_layer[self.via_start_layer].polygon_data.edb_api,
|
|
824
|
+
self._ppadstack._pedb.modeler.create_polygon(
|
|
825
|
+
self.pad_by_layer[self.via_start_layer].polygon_data._edb_object,
|
|
826
|
+
layer_name=self.via_start_layer,
|
|
827
|
+
net_name=via._edb_padstackinstance.GetNet().GetName(),
|
|
831
828
|
)
|
|
832
829
|
else:
|
|
833
830
|
self._edb.cell.primitive.circle.create(
|
|
@@ -839,11 +836,10 @@ class EDBPadstack(object):
|
|
|
839
836
|
self._get_edb_value(self.pad_by_layer[self.via_start_layer].parameters_values[0] / 2),
|
|
840
837
|
)
|
|
841
838
|
if len(self.pad_by_layer[self.via_stop_layer].parameters) == 0:
|
|
842
|
-
self.
|
|
843
|
-
|
|
844
|
-
self.via_stop_layer,
|
|
845
|
-
via._edb_padstackinstance.GetNet(),
|
|
846
|
-
self.pad_by_layer[self.via_stop_layer].polygon_data.edb_api,
|
|
839
|
+
self._ppadstack._pedb.modeler.create_polygon(
|
|
840
|
+
self.pad_by_layer[self.via_stop_layer].polygon_data._edb_object,
|
|
841
|
+
layer_name=self.via_stop_layer,
|
|
842
|
+
net_name=via._edb_padstackinstance.GetNet().GetName(),
|
|
847
843
|
)
|
|
848
844
|
else:
|
|
849
845
|
self._edb.cell.primitive.circle.create(
|
|
@@ -1029,7 +1025,7 @@ class EDBPadstack(object):
|
|
|
1029
1025
|
None,
|
|
1030
1026
|
None,
|
|
1031
1027
|
)
|
|
1032
|
-
padstack_instance.SetIsLayoutPin(via.is_pin)
|
|
1028
|
+
padstack_instance._edb_object.SetIsLayoutPin(via.is_pin)
|
|
1033
1029
|
i += 1
|
|
1034
1030
|
via.delete()
|
|
1035
1031
|
self._ppadstack._pedb.logger.info("Created {} new microvias.".format(i))
|
|
@@ -1771,16 +1767,6 @@ class EDBPadstackInstance(Primitive):
|
|
|
1771
1767
|
self.position = [var_name + "X", var_name + "Y"]
|
|
1772
1768
|
return [var_name + "X", var_name + "Y"]
|
|
1773
1769
|
|
|
1774
|
-
def delete_padstack_instance(self):
|
|
1775
|
-
"""Delete this padstack instance.
|
|
1776
|
-
|
|
1777
|
-
.. deprecated:: 0.6.28
|
|
1778
|
-
Use :func:`delete` property instead.
|
|
1779
|
-
"""
|
|
1780
|
-
warnings.warn("`delete_padstack_instance` is deprecated. Use `delete` instead.", DeprecationWarning)
|
|
1781
|
-
self._edb_padstackinstance.Delete()
|
|
1782
|
-
return True
|
|
1783
|
-
|
|
1784
1770
|
def in_voids(self, net_name=None, layer_name=None):
|
|
1785
1771
|
"""Check if this padstack instance is in any void.
|
|
1786
1772
|
|
|
@@ -2070,18 +2056,6 @@ class EDBPadstackInstance(Primitive):
|
|
|
2070
2056
|
created_polygon = self._pedb.modeler.create_polygon(path, layer_name)
|
|
2071
2057
|
return created_polygon
|
|
2072
2058
|
|
|
2073
|
-
def get_connected_object_id_set(self):
|
|
2074
|
-
"""Produce a list of all geometries physically connected to a given layout object.
|
|
2075
|
-
|
|
2076
|
-
Returns
|
|
2077
|
-
-------
|
|
2078
|
-
list
|
|
2079
|
-
Found connected objects IDs with Layout object.
|
|
2080
|
-
"""
|
|
2081
|
-
layoutInst = self._edb_padstackinstance.GetLayout().GetLayoutInstance()
|
|
2082
|
-
layoutObjInst = self.object_instance
|
|
2083
|
-
return [loi.GetLayoutObj().GetId() for loi in layoutInst.GetConnectedObjects(layoutObjInst).Items]
|
|
2084
|
-
|
|
2085
2059
|
def get_reference_pins(self, reference_net="GND", search_radius=5e-3, max_limit=0, component_only=True):
|
|
2086
2060
|
"""Search for reference pins using given criteria.
|
|
2087
2061
|
|