pyedb 0.6.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 +15 -16
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +17 -0
- pyedb/dotnet/edb_core/components.py +11 -11
- pyedb/dotnet/edb_core/configuration.py +346 -77
- 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 +8 -3
- 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 +26 -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/hfss.py +1 -1
- pyedb/dotnet/edb_core/layout.py +94 -31
- pyedb/dotnet/edb_core/materials.py +637 -541
- pyedb/dotnet/edb_core/nets.py +5 -5
- 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.6.0.dist-info → pyedb-0.7.1.dist-info}/METADATA +31 -53
- {pyedb-0.6.0.dist-info → pyedb-0.7.1.dist-info}/RECORD +35 -32
- /pyedb/dotnet/edb_core/{edb_data → utilities}/simulation_setup.py +0 -0
- {pyedb-0.6.0.dist-info → pyedb-0.7.1.dist-info}/LICENSE +0 -0
- {pyedb-0.6.0.dist-info → pyedb-0.7.1.dist-info}/WHEEL +0 -0
|
@@ -39,14 +39,14 @@ class HfssExtentInfo:
|
|
|
39
39
|
self._pedb = pedb
|
|
40
40
|
|
|
41
41
|
self._hfss_extent_info_type = {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
42
|
+
"bounding_box": self._pedb.edb_api.utility.utility.HFSSExtentInfoType.BoundingBox,
|
|
43
|
+
"conforming": self._pedb.edb_api.utility.utility.HFSSExtentInfoType.Conforming,
|
|
44
|
+
"convexHull": self._pedb.edb_api.utility.utility.HFSSExtentInfoType.ConvexHull,
|
|
45
|
+
"polygon": self._pedb.edb_api.utility.utility.HFSSExtentInfoType.Polygon,
|
|
46
46
|
}
|
|
47
47
|
self._open_region_type = {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"radiation": self._pedb.edb_api.utility.utility.OpenRegionType.Radiation,
|
|
49
|
+
"pml": self._pedb.edb_api.utility.utility.OpenRegionType.PML,
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
@pyedb_function_handler()
|
|
@@ -195,18 +195,19 @@ class HfssExtentInfo:
|
|
|
195
195
|
@property
|
|
196
196
|
def dielectric_extent_type(self):
|
|
197
197
|
"""Dielectric extent type."""
|
|
198
|
-
return self._edb_hfss_extent_info.DielectricExtentType.ToString()
|
|
198
|
+
return self._edb_hfss_extent_info.DielectricExtentType.ToString().lower()
|
|
199
199
|
|
|
200
200
|
@dielectric_extent_type.setter
|
|
201
201
|
def dielectric_extent_type(self, value):
|
|
202
|
+
value = "bounding_box" if value == "BoundingBox" else value
|
|
202
203
|
info = self._edb_hfss_extent_info
|
|
203
|
-
info.DielectricExtentType = self._hfss_extent_info_type[value]
|
|
204
|
+
info.DielectricExtentType = self._hfss_extent_info_type[value.lower()]
|
|
204
205
|
self._update_hfss_extent_info(info)
|
|
205
206
|
|
|
206
207
|
@property
|
|
207
208
|
def extent_type(self):
|
|
208
209
|
"""Extent type."""
|
|
209
|
-
return self._edb_hfss_extent_info.ExtentType.ToString()
|
|
210
|
+
return self._edb_hfss_extent_info.ExtentType.ToString().lower()
|
|
210
211
|
|
|
211
212
|
@extent_type.setter
|
|
212
213
|
def extent_type(self, value):
|
|
@@ -239,17 +240,17 @@ class HfssExtentInfo:
|
|
|
239
240
|
@property
|
|
240
241
|
def open_region_type(self):
|
|
241
242
|
"""Open region type."""
|
|
242
|
-
return self._edb_hfss_extent_info.OpenRegionType.ToString()
|
|
243
|
+
return self._edb_hfss_extent_info.OpenRegionType.ToString().lower()
|
|
243
244
|
|
|
244
245
|
@open_region_type.setter
|
|
245
246
|
def open_region_type(self, value):
|
|
246
247
|
info = self._edb_hfss_extent_info
|
|
247
|
-
info.OpenRegionType = self._open_region_type[value]
|
|
248
|
+
info.OpenRegionType = self._open_region_type[value.lower()]
|
|
248
249
|
self._update_hfss_extent_info(info)
|
|
249
250
|
|
|
250
251
|
@property
|
|
251
252
|
def operating_freq(self):
|
|
252
|
-
"""Operating frequency.
|
|
253
|
+
"""PML Operating frequency.
|
|
253
254
|
|
|
254
255
|
Returns
|
|
255
256
|
-------
|
|
@@ -266,7 +267,7 @@ class HfssExtentInfo:
|
|
|
266
267
|
|
|
267
268
|
@property
|
|
268
269
|
def radiation_level(self):
|
|
269
|
-
"""Radiation level."""
|
|
270
|
+
"""PML Radiation level to calculate the thickness of boundary."""
|
|
270
271
|
return EdbValue(self._edb_hfss_extent_info.RadiationLevel)
|
|
271
272
|
|
|
272
273
|
@radiation_level.setter
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from pyedb.dotnet.clr_module import Tuple
|
|
24
|
-
from pyedb.dotnet.edb_core.
|
|
24
|
+
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
25
|
+
from pyedb.dotnet.edb_core.utilities.simulation_setup import (
|
|
25
26
|
BaseSimulationSetup,
|
|
26
27
|
EdbFrequencySweep,
|
|
27
28
|
)
|
|
28
|
-
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
29
29
|
from pyedb.generic.general_methods import generate_unique_name, pyedb_function_handler
|
|
30
30
|
|
|
31
31
|
|
|
@@ -553,6 +553,7 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
553
553
|
dict_out[k[1:]] = v
|
|
554
554
|
return dict_out
|
|
555
555
|
|
|
556
|
+
# TODO: This method might need some refactoring
|
|
556
557
|
def _load_layer(self, layer):
|
|
557
558
|
if layer:
|
|
558
559
|
self.color = layer["color"]
|
|
@@ -560,13 +561,17 @@ class StackupLayerEdbClass(LayerEdbClass):
|
|
|
560
561
|
if isinstance(layer["material"], str):
|
|
561
562
|
self.material = layer["material"]
|
|
562
563
|
else:
|
|
563
|
-
|
|
564
|
-
|
|
564
|
+
material_data = layer["material"]
|
|
565
|
+
if material_data is not None:
|
|
566
|
+
self._pclass._pedb.materials.add_material(**material_data)
|
|
567
|
+
self.material = layer["material"]["name"]
|
|
565
568
|
if layer["dielectric_fill"]:
|
|
566
569
|
if isinstance(layer["dielectric_fill"], str):
|
|
567
570
|
self.dielectric_fill = layer["dielectric_fill"]
|
|
568
571
|
else:
|
|
569
|
-
|
|
572
|
+
dielectric_data = layer["dielectric_fill"]
|
|
573
|
+
if dielectric_data is not None:
|
|
574
|
+
self._pclass._pedb.materials.add_material(**dielectric_data)
|
|
570
575
|
self.dielectric_fill = layer["dielectric_fill"]["name"]
|
|
571
576
|
self.thickness = layer["thickness"]
|
|
572
577
|
self.etch_factor = layer["etch_factor"]
|
|
@@ -144,6 +144,11 @@ class EDBPadProperties(object):
|
|
|
144
144
|
"""
|
|
145
145
|
return [i.tofloat for i in self.parameters.values()]
|
|
146
146
|
|
|
147
|
+
@property
|
|
148
|
+
def parameters_values_string(self):
|
|
149
|
+
"""Parameters value in string format."""
|
|
150
|
+
return [i.tostring for i in self.parameters.values()]
|
|
151
|
+
|
|
147
152
|
@property
|
|
148
153
|
def polygon_data(self):
|
|
149
154
|
"""Parameters.
|
|
@@ -499,6 +504,21 @@ class EDBPadstack(object):
|
|
|
499
504
|
self._hole_parameters = self.hole_params[2]
|
|
500
505
|
return self._hole_parameters
|
|
501
506
|
|
|
507
|
+
@property
|
|
508
|
+
def hole_diameter(self):
|
|
509
|
+
"""Hole diameter."""
|
|
510
|
+
return list(self.hole_params[2])[0].ToDouble()
|
|
511
|
+
|
|
512
|
+
@hole_diameter.setter
|
|
513
|
+
def hole_diameter(self, value):
|
|
514
|
+
params = convert_py_list_to_net_list([self._get_edb_value(value)])
|
|
515
|
+
self._update_hole_parameters(params=params)
|
|
516
|
+
|
|
517
|
+
@property
|
|
518
|
+
def hole_diameter_string(self):
|
|
519
|
+
"""Hole diameter in string format."""
|
|
520
|
+
return list(self.hole_params[2])[0].ToString()
|
|
521
|
+
|
|
502
522
|
@pyedb_function_handler()
|
|
503
523
|
def _update_hole_parameters(self, hole_type=None, params=None, offsetx=None, offsety=None, rotation=None):
|
|
504
524
|
"""Update hole parameters.
|
|
@@ -668,6 +688,7 @@ class EDBPadstack(object):
|
|
|
668
688
|
float
|
|
669
689
|
Thickness of the hole plating if present.
|
|
670
690
|
"""
|
|
691
|
+
value = self._get_edb_value(value).ToDouble()
|
|
671
692
|
hr = 200 * float(value) / float(self.hole_properties[0])
|
|
672
693
|
self.hole_plating_ratio = hr
|
|
673
694
|
|
|
@@ -788,13 +809,13 @@ class EDBPadstack(object):
|
|
|
788
809
|
if convert_only_signal_vias:
|
|
789
810
|
signal_nets = [i for i in list(self._ppadstack._pedb.nets.signal_nets.keys())]
|
|
790
811
|
topl, topz, bottoml, bottomz = self._ppadstack._pedb.stackup.stackup_limits(True)
|
|
791
|
-
|
|
812
|
+
if self.via_start_layer in layers:
|
|
792
813
|
start_elevation = layers[self.via_start_layer].lower_elevation
|
|
793
|
-
|
|
814
|
+
else:
|
|
794
815
|
start_elevation = layers[self.instances[0].start_layer].lower_elevation
|
|
795
|
-
|
|
796
|
-
stop_elevation = layers[self.
|
|
797
|
-
|
|
816
|
+
if self.via_stop_layer in layers:
|
|
817
|
+
stop_elevation = layers[self.via_stop_layer].upper_elevation
|
|
818
|
+
else:
|
|
798
819
|
stop_elevation = layers[self.instances[0].stop_layer].upper_elevation
|
|
799
820
|
|
|
800
821
|
diel_thick = abs(start_elevation - stop_elevation)
|
|
@@ -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/hfss.py
CHANGED
|
@@ -1165,7 +1165,7 @@ class EdbHfss(object):
|
|
|
1165
1165
|
if not ref_prim:
|
|
1166
1166
|
self._logger.error("Failed to collect valid reference primitives for terminal")
|
|
1167
1167
|
if ref_prim:
|
|
1168
|
-
reference_layer = ref_prim[0].layer
|
|
1168
|
+
reference_layer = ref_prim[0].layer._edb_layer
|
|
1169
1169
|
if term.SetReferenceLayer(reference_layer): # pragma no cover
|
|
1170
1170
|
self._logger.info("Port {} created".format(port_name))
|
|
1171
1171
|
return terminal_info
|
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.
|
|
@@ -1126,7 +1185,7 @@ class EdbLayout(object):
|
|
|
1126
1185
|
return True
|
|
1127
1186
|
|
|
1128
1187
|
@pyedb_function_handler()
|
|
1129
|
-
def unite_polygons_on_layer(self, layer_name=None, delete_padstack_gemometries=False,
|
|
1188
|
+
def unite_polygons_on_layer(self, layer_name=None, delete_padstack_gemometries=False, net_names_list=[]):
|
|
1130
1189
|
"""Try to unite all Polygons on specified layer.
|
|
1131
1190
|
|
|
1132
1191
|
Parameters
|
|
@@ -1135,8 +1194,8 @@ class EdbLayout(object):
|
|
|
1135
1194
|
Name of layer name to unite objects on. The default is ``None``, in which case all layers are taken.
|
|
1136
1195
|
delete_padstack_gemometries : bool, optional
|
|
1137
1196
|
Whether to delete all padstack geometries. The default is ``False``.
|
|
1138
|
-
|
|
1139
|
-
Net list filter. The default is ``[]``, in which case all nets are taken.
|
|
1197
|
+
net_names_list : list[str] : optional
|
|
1198
|
+
Net names list filter. The default is ``[]``, in which case all nets are taken.
|
|
1140
1199
|
|
|
1141
1200
|
Returns
|
|
1142
1201
|
-------
|
|
@@ -1151,6 +1210,9 @@ class EdbLayout(object):
|
|
|
1151
1210
|
for lay in layer_name:
|
|
1152
1211
|
self._logger.info("Uniting Objects on layer %s.", lay)
|
|
1153
1212
|
poly_by_nets = {}
|
|
1213
|
+
all_voids = []
|
|
1214
|
+
list_polygon_data = []
|
|
1215
|
+
delete_list = []
|
|
1154
1216
|
if lay in list(self.polygons_by_layer.keys()):
|
|
1155
1217
|
for poly in self.polygons_by_layer[lay]:
|
|
1156
1218
|
if not poly.GetNet().GetName() in list(poly_by_nets.keys()):
|
|
@@ -1160,34 +1222,35 @@ class EdbLayout(object):
|
|
|
1160
1222
|
if poly.GetNet().GetName():
|
|
1161
1223
|
poly_by_nets[poly.GetNet().GetName()].append(poly)
|
|
1162
1224
|
for net in poly_by_nets:
|
|
1163
|
-
if net in
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1225
|
+
if net in net_names_list or not net_names_list:
|
|
1226
|
+
for i in poly_by_nets[net]:
|
|
1227
|
+
list_polygon_data.append(i.GetPolygonData())
|
|
1228
|
+
delete_list.append(i)
|
|
1229
|
+
all_voids.append(i.Voids)
|
|
1230
|
+
a = self._edb.geometry.polygon_data.unite(convert_py_list_to_net_list(list_polygon_data))
|
|
1231
|
+
for item in a:
|
|
1232
|
+
for v in all_voids:
|
|
1233
|
+
for void in v:
|
|
1234
|
+
if int(item.GetIntersectionType(void.GetPolygonData())) == 2:
|
|
1235
|
+
item.AddHole(void.GetPolygonData())
|
|
1236
|
+
poly = self._edb.cell.primitive.polygon.create(
|
|
1237
|
+
self._active_layout,
|
|
1238
|
+
lay,
|
|
1239
|
+
self._pedb.nets.nets[net],
|
|
1240
|
+
item,
|
|
1241
|
+
)
|
|
1242
|
+
for v in all_voids:
|
|
1243
|
+
for void in v:
|
|
1244
|
+
for poly in poly_by_nets[net]: # pragma no cover
|
|
1245
|
+
if int(void.GetPolygonData().GetIntersectionType(poly.GetPolygonData())) >= 2:
|
|
1246
|
+
try:
|
|
1247
|
+
id = delete_list.index(poly)
|
|
1248
|
+
except ValueError:
|
|
1249
|
+
id = -1
|
|
1250
|
+
if id >= 0:
|
|
1251
|
+
delete_list.pop(id)
|
|
1252
|
+
for poly in delete_list:
|
|
1253
|
+
poly.Delete()
|
|
1191
1254
|
|
|
1192
1255
|
if delete_padstack_gemometries:
|
|
1193
1256
|
self._logger.info("Deleting Padstack Definitions")
|