pyedb 0.7.0__py3-none-any.whl → 0.7.1__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/dotnet/clr_module.py +1 -1
- pyedb/dotnet/edb.py +6 -7
- pyedb/dotnet/edb_core/components.py +11 -11
- pyedb/dotnet/edb_core/configuration.py +199 -24
- pyedb/dotnet/edb_core/definition/component_def.py +9 -0
- pyedb/dotnet/edb_core/definition/package_def.py +27 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +2 -1
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +14 -13
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +2 -2
- pyedb/dotnet/edb_core/edb_data/layer_data.py +8 -3
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +6 -5
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +12 -11
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1 -1
- pyedb/dotnet/edb_core/edb_data/sources.py +10 -0
- pyedb/dotnet/edb_core/layout.py +59 -0
- pyedb/dotnet/edb_core/materials.py +637 -541
- pyedb/dotnet/edb_core/padstack.py +57 -6
- pyedb/dotnet/edb_core/siwave.py +9 -2
- pyedb/dotnet/edb_core/stackup.py +108 -94
- pyedb/dotnet/edb_core/utilities/__init__.py +3 -0
- pyedb/dotnet/edb_core/utilities/heatsink.py +69 -0
- pyedb/exceptions.py +6 -0
- pyedb/generic/filesystem.py +7 -3
- pyedb/generic/general_methods.py +4 -0
- pyedb/generic/process.py +4 -1
- pyedb/generic/settings.py +10 -0
- {pyedb-0.7.0.dist-info → pyedb-0.7.1.dist-info}/METADATA +31 -53
- {pyedb-0.7.0.dist-info → pyedb-0.7.1.dist-info}/RECORD +32 -29
- /pyedb/dotnet/edb_core/{edb_data → utilities}/simulation_setup.py +0 -0
- {pyedb-0.7.0.dist-info → pyedb-0.7.1.dist-info}/LICENSE +0 -0
- {pyedb-0.7.0.dist-info → pyedb-0.7.1.dist-info}/WHEEL +0 -0
|
@@ -142,7 +142,7 @@ class EDBPrimitivesMain(Connectable):
|
|
|
142
142
|
try:
|
|
143
143
|
layer_name = self.primitive_object.GetLayer().GetName()
|
|
144
144
|
return self._pedb.stackup.layers[layer_name]
|
|
145
|
-
except AttributeError: # pragma: no cover
|
|
145
|
+
except (KeyError, AttributeError): # pragma: no cover
|
|
146
146
|
return None
|
|
147
147
|
|
|
148
148
|
@property
|
|
@@ -155,18 +155,19 @@ class EDBPrimitivesMain(Connectable):
|
|
|
155
155
|
"""
|
|
156
156
|
try:
|
|
157
157
|
return self.layer.name
|
|
158
|
-
except AttributeError: # pragma: no cover
|
|
158
|
+
except (KeyError, AttributeError): # pragma: no cover
|
|
159
159
|
return None
|
|
160
160
|
|
|
161
161
|
@layer_name.setter
|
|
162
162
|
def layer_name(self, val):
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
layer_list = list(self._core_stackup.layers.keys())
|
|
164
|
+
if isinstance(val, str) and val in layer_list:
|
|
165
|
+
layer = self._core_stackup.layers[val]._edb_layer
|
|
166
|
+
if layer:
|
|
167
|
+
self.primitive_object.SetLayer(layer)
|
|
167
168
|
else:
|
|
168
|
-
raise AttributeError("Layer {} not found
|
|
169
|
-
elif isinstance(val, type(self._core_stackup.layers[
|
|
169
|
+
raise AttributeError("Layer {} not found.".format(val))
|
|
170
|
+
elif isinstance(val, type(self._core_stackup.layers[layer_list[0]])):
|
|
170
171
|
try:
|
|
171
172
|
self.primitive_object.SetLayer(val._edb_layer)
|
|
172
173
|
except:
|
|
@@ -1301,7 +1302,7 @@ class EDBArcs(object):
|
|
|
1301
1302
|
|
|
1302
1303
|
Examples
|
|
1303
1304
|
--------
|
|
1304
|
-
>>> appedb = Edb(fpath, edbversion="
|
|
1305
|
+
>>> appedb = Edb(fpath, edbversion="2024.1")
|
|
1305
1306
|
>>> start_coordinate = appedb.nets["V1P0_S0"].primitives[0].arcs[0].start
|
|
1306
1307
|
>>> print(start_coordinate)
|
|
1307
1308
|
[x_value, y_value]
|
|
@@ -1320,7 +1321,7 @@ class EDBArcs(object):
|
|
|
1320
1321
|
|
|
1321
1322
|
Examples
|
|
1322
1323
|
--------
|
|
1323
|
-
>>> appedb = Edb(fpath, edbversion="
|
|
1324
|
+
>>> appedb = Edb(fpath, edbversion="2024.1")
|
|
1324
1325
|
>>> end_coordinate = appedb.nets["V1P0_S0"].primitives[0].arcs[0].end
|
|
1325
1326
|
"""
|
|
1326
1327
|
point = self.arc_object.End
|
|
@@ -1338,7 +1339,7 @@ class EDBArcs(object):
|
|
|
1338
1339
|
|
|
1339
1340
|
Examples
|
|
1340
1341
|
--------
|
|
1341
|
-
>>> appedb = Edb(fpath, edbversion="
|
|
1342
|
+
>>> appedb = Edb(fpath, edbversion="2024.1")
|
|
1342
1343
|
>>> arc_height = appedb.nets["V1P0_S0"].primitives[0].arcs[0].height
|
|
1343
1344
|
"""
|
|
1344
1345
|
return self.arc_object.Height
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
|
|
23
23
|
import warnings
|
|
24
24
|
|
|
25
|
-
from pyedb.dotnet.edb_core.edb_data.simulation_setup import BaseSimulationSetup
|
|
26
25
|
from pyedb.dotnet.edb_core.general import (
|
|
27
26
|
convert_netdict_to_pydict,
|
|
28
27
|
convert_pydict_to_netdict,
|
|
29
28
|
)
|
|
29
|
+
from pyedb.dotnet.edb_core.utilities.simulation_setup import BaseSimulationSetup
|
|
30
30
|
from pyedb.generic.general_methods import is_linux, pyedb_function_handler
|
|
31
31
|
|
|
32
32
|
|
|
@@ -20,6 +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
|
+
import warnings
|
|
24
|
+
|
|
23
25
|
from pyedb.generic.constants import NodeType, SourceType
|
|
24
26
|
from pyedb.generic.general_methods import generate_unique_name, pyedb_function_handler
|
|
25
27
|
|
|
@@ -274,9 +276,17 @@ class PinGroup(object):
|
|
|
274
276
|
def component(self, value):
|
|
275
277
|
self._component = value
|
|
276
278
|
|
|
279
|
+
@property
|
|
280
|
+
def pins(self):
|
|
281
|
+
"""Gets the pins belong to this pin group."""
|
|
282
|
+
from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
|
|
283
|
+
|
|
284
|
+
return {i.GetName(): EDBPadstackInstance(i, self._pedb) for i in list(self._edb_object.GetPins())}
|
|
285
|
+
|
|
277
286
|
@property
|
|
278
287
|
def node_pins(self):
|
|
279
288
|
"""Node pins."""
|
|
289
|
+
warnings.warn("`node_pins` is deprecated. Use `pins` method instead.", DeprecationWarning)
|
|
280
290
|
return self._node_pins
|
|
281
291
|
|
|
282
292
|
@node_pins.setter
|
pyedb/dotnet/edb_core/layout.py
CHANGED
|
@@ -240,6 +240,65 @@ class EdbLayout(object):
|
|
|
240
240
|
objinst.append(el)
|
|
241
241
|
return objinst
|
|
242
242
|
|
|
243
|
+
@pyedb_function_handler()
|
|
244
|
+
def get_primitive_by_layer_and_point(self, point=None, layer=None, nets=None):
|
|
245
|
+
"""Return primitive given coordinate point [x, y], layer name and nets.
|
|
246
|
+
|
|
247
|
+
Parameters
|
|
248
|
+
----------
|
|
249
|
+
point : list
|
|
250
|
+
Coordinate [x, y]
|
|
251
|
+
|
|
252
|
+
layer : list or str, optional
|
|
253
|
+
list of layer name or layer name applied on filter.
|
|
254
|
+
|
|
255
|
+
nets : list or str, optional
|
|
256
|
+
list of net name or single net name applied on filter
|
|
257
|
+
|
|
258
|
+
Returns
|
|
259
|
+
-------
|
|
260
|
+
list of :class:`pyedb.dotnet.edb_core.edb_data.primitives_data.EDBPrimitives`
|
|
261
|
+
List of primitives, polygons, paths and rectangles.
|
|
262
|
+
"""
|
|
263
|
+
if isinstance(layer, str) and layer not in list(self._pedb.stackup.signal_layers.keys()):
|
|
264
|
+
layer = None
|
|
265
|
+
if not isinstance(point, list) and len(point) == 2:
|
|
266
|
+
self._logger.error("Provided point must be a list of two values")
|
|
267
|
+
return False
|
|
268
|
+
pt = self._edb.geometry.point_data(point[0], point[1])
|
|
269
|
+
if isinstance(nets, str):
|
|
270
|
+
nets = [nets]
|
|
271
|
+
elif nets and not isinstance(nets, list) and len(nets) == len([net for net in nets if isinstance(net, str)]):
|
|
272
|
+
_nets = []
|
|
273
|
+
for net in nets:
|
|
274
|
+
if net not in self._pedb.nets:
|
|
275
|
+
self._logger.error(
|
|
276
|
+
f"Net {net} used to find primitive from layer point and net not found, skipping it."
|
|
277
|
+
)
|
|
278
|
+
else:
|
|
279
|
+
_nets.append(self._pedb.nets[net].net_obj)
|
|
280
|
+
if _nets:
|
|
281
|
+
nets = _nets
|
|
282
|
+
_obj_instances = list(self._pedb.layout_instance.FindLayoutObjInstance(pt, None, nets).Items)
|
|
283
|
+
returned_obj = []
|
|
284
|
+
if layer:
|
|
285
|
+
selected_obj = [obj for obj in _obj_instances if layer in [lay.GetName() for lay in list(obj.GetLayers())]]
|
|
286
|
+
for obj in selected_obj:
|
|
287
|
+
prim = obj.GetLayoutObj()
|
|
288
|
+
obj_id = prim.GetId()
|
|
289
|
+
prim_type = str(prim.GetPrimitiveType())
|
|
290
|
+
if prim_type == "Polygon":
|
|
291
|
+
[returned_obj.append(p) for p in [poly for poly in self.polygons if poly.id == obj_id]]
|
|
292
|
+
elif prim_type == "Path":
|
|
293
|
+
[returned_obj.append(p) for p in [t for t in self.paths if t.id == obj_id]]
|
|
294
|
+
elif prim_type == "Rectangle":
|
|
295
|
+
[returned_obj.append(p) for p in [t for t in self.rectangles if t.id == obj_id]]
|
|
296
|
+
else:
|
|
297
|
+
for obj in _obj_instances:
|
|
298
|
+
obj_id = obj.GetLayoutObj().GetId()
|
|
299
|
+
[returned_obj.append(p) for p in [obj for obj in self.primitives if obj.id == obj_id]]
|
|
300
|
+
return returned_obj
|
|
301
|
+
|
|
243
302
|
@pyedb_function_handler()
|
|
244
303
|
def get_polygon_bounding_box(self, polygon):
|
|
245
304
|
"""Retrieve a polygon bounding box.
|