pyedb 0.42.0__py3-none-any.whl → 0.44.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_boundaries.py +155 -72
- pyedb/configuration/cfg_components.py +1 -1
- pyedb/configuration/cfg_general.py +34 -16
- pyedb/configuration/cfg_modeler.py +162 -67
- pyedb/configuration/cfg_nets.py +33 -17
- pyedb/configuration/cfg_operations.py +63 -31
- pyedb/configuration/cfg_package_definition.py +113 -52
- pyedb/configuration/cfg_padstacks.py +611 -256
- pyedb/configuration/cfg_pin_groups.py +75 -33
- pyedb/configuration/cfg_ports_sources.py +75 -15
- pyedb/configuration/cfg_s_parameter_models.py +125 -70
- pyedb/configuration/cfg_setup.py +301 -257
- pyedb/configuration/cfg_stackup.py +166 -90
- pyedb/configuration/configuration.py +342 -209
- pyedb/dotnet/database/edb_data/design_options.py +19 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +16 -6
- pyedb/dotnet/database/geometry/polygon_data.py +4 -2
- pyedb/dotnet/database/padstack.py +6 -2
- pyedb/dotnet/database/sim_setup_data/data/sweep_data.py +63 -10
- pyedb/dotnet/database/utilities/simulation_setup.py +14 -30
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +30 -0
- pyedb/dotnet/edb.py +75 -105
- pyedb/grpc/database/components.py +1 -1
- pyedb/grpc/database/definition/component_def.py +15 -0
- pyedb/grpc/database/definition/component_pin.py +1 -1
- pyedb/grpc/database/definition/materials.py +27 -0
- pyedb/grpc/database/definition/package_def.py +20 -2
- pyedb/grpc/database/definition/padstack_def.py +5 -2
- pyedb/grpc/database/hierarchy/component.py +4 -2
- pyedb/grpc/database/hierarchy/pingroup.py +12 -8
- pyedb/grpc/database/layers/layer.py +28 -0
- pyedb/grpc/database/layers/stackup_layer.py +281 -40
- pyedb/grpc/database/layout/layout.py +12 -6
- pyedb/grpc/database/modeler.py +8 -8
- pyedb/grpc/database/primitive/bondwire.py +3 -3
- pyedb/grpc/database/primitive/circle.py +1 -1
- pyedb/grpc/database/primitive/padstack_instance.py +13 -3
- pyedb/grpc/database/primitive/path.py +2 -2
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +1 -1
- pyedb/grpc/database/primitive/rectangle.py +2 -2
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +73 -30
- pyedb/grpc/database/source_excitations.py +7 -7
- pyedb/grpc/database/stackup.py +14 -6
- pyedb/grpc/database/terminal/bundle_terminal.py +3 -3
- pyedb/grpc/database/terminal/edge_terminal.py +2 -2
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +42 -2
- pyedb/grpc/database/terminal/pingroup_terminal.py +35 -2
- pyedb/grpc/database/terminal/point_terminal.py +10 -1
- pyedb/grpc/database/terminal/terminal.py +4 -4
- pyedb/grpc/database/utility/hfss_extent_info.py +14 -10
- pyedb/grpc/edb.py +8 -8
- pyedb/misc/misc.py +13 -0
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/METADATA +1 -1
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/RECORD +58 -58
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/LICENSE +0 -0
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/WHEEL +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
from ansys.edb.core.hierarchy.pin_group import PinGroup as GrpcPinGroup
|
|
25
|
-
from ansys.edb.core.terminal.
|
|
25
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
26
26
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
27
27
|
|
|
28
28
|
from pyedb.generic.general_methods import generate_unique_name
|
|
@@ -74,9 +74,9 @@ class PinGroup(GrpcPinGroup):
|
|
|
74
74
|
|
|
75
75
|
Returns
|
|
76
76
|
-------
|
|
77
|
-
|
|
77
|
+
Dict[:class:`PadstackInstance <pyedb.grpc.database.primitive.padstack_instance.PadstackInstance>`].
|
|
78
78
|
"""
|
|
79
|
-
return
|
|
79
|
+
return {i.name: PadstackInstance(self._pedb, i) for i in super().pins}
|
|
80
80
|
|
|
81
81
|
@property
|
|
82
82
|
def net(self):
|
|
@@ -105,11 +105,15 @@ class PinGroup(GrpcPinGroup):
|
|
|
105
105
|
"""
|
|
106
106
|
return self.net.name
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
@property
|
|
109
|
+
def terminal(self):
|
|
110
|
+
"""Terminal."""
|
|
111
|
+
term = self.pin_group_terminal
|
|
112
|
+
if not term.is_null:
|
|
113
|
+
term = PinGroupTerminal(self._pedb, term)
|
|
114
|
+
return term
|
|
115
|
+
else:
|
|
116
|
+
return None
|
|
113
117
|
|
|
114
118
|
def create_terminal(self, name=None):
|
|
115
119
|
"""Create a terminal.
|
|
@@ -52,6 +52,34 @@ class Layer(GrpcLayer):
|
|
|
52
52
|
else:
|
|
53
53
|
self._pedb.logger.error(f"{k} is not a valid layer attribute")
|
|
54
54
|
|
|
55
|
+
@property
|
|
56
|
+
def properties(self):
|
|
57
|
+
from ansys.edb.core.layer.stackup_layer import StackupLayer as GrpcStackupLayer
|
|
58
|
+
|
|
59
|
+
from pyedb.grpc.database.stackup import StackupLayer
|
|
60
|
+
|
|
61
|
+
if isinstance(self.cast(), GrpcStackupLayer):
|
|
62
|
+
return StackupLayer(self._pedb, self.cast()).properties
|
|
63
|
+
else:
|
|
64
|
+
data = {"name": self.name, "type": self.type, "color": self.color}
|
|
65
|
+
return data
|
|
66
|
+
|
|
67
|
+
@properties.setter
|
|
68
|
+
def properties(self, params):
|
|
69
|
+
name = params.get("name", "")
|
|
70
|
+
if name:
|
|
71
|
+
self.name = name
|
|
72
|
+
type = params.get("type", "")
|
|
73
|
+
if type:
|
|
74
|
+
self.type = type
|
|
75
|
+
color = params.get("color", "")
|
|
76
|
+
if color:
|
|
77
|
+
self.color = color
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def type(self):
|
|
81
|
+
return super().type.name.lower().split("_")[0]
|
|
82
|
+
|
|
55
83
|
@property
|
|
56
84
|
def _layer_name_mapping_reversed(self):
|
|
57
85
|
return {j: i for i, j in self._layer_name_mapping.items()}
|
|
@@ -56,13 +56,77 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
56
56
|
str
|
|
57
57
|
Layer name.
|
|
58
58
|
"""
|
|
59
|
-
return super().type.name.lower()
|
|
59
|
+
return super().type.name.lower().split("_")[0]
|
|
60
60
|
|
|
61
61
|
@type.setter
|
|
62
62
|
def type(self, value):
|
|
63
63
|
if value in self._stackup_layer_mapping:
|
|
64
64
|
super(StackupLayer, self.__class__).type.__set__(self, self._stackup_layer_mapping[value])
|
|
65
65
|
|
|
66
|
+
def update(self, **kwargs):
|
|
67
|
+
for k, v in kwargs.items():
|
|
68
|
+
if k in dir(self):
|
|
69
|
+
self.__setattr__(k, v)
|
|
70
|
+
elif k == "roughness":
|
|
71
|
+
self.roughness_enabled = v["enabled"]
|
|
72
|
+
if "top" in v:
|
|
73
|
+
top_roughness = v["top"]
|
|
74
|
+
if top_roughness:
|
|
75
|
+
if top_roughness["model"] == "huray":
|
|
76
|
+
nodule_radius = top_roughness["nodule_radius"]
|
|
77
|
+
surface_ratio = top_roughness["surface_ratio"]
|
|
78
|
+
self.assign_roughness_model(
|
|
79
|
+
model_type="huray",
|
|
80
|
+
huray_radius=nodule_radius,
|
|
81
|
+
huray_surface_ratio=surface_ratio,
|
|
82
|
+
apply_on_surface="top",
|
|
83
|
+
)
|
|
84
|
+
elif top_roughness["model"] == "groisse":
|
|
85
|
+
roughness = top_roughness["roughness"]
|
|
86
|
+
self.assign_roughness_model(
|
|
87
|
+
model_type="groisse", groisse_roughness=roughness, apply_on_surface="top"
|
|
88
|
+
)
|
|
89
|
+
if "bottom" in v:
|
|
90
|
+
bottom_roughness = v["bottom"]
|
|
91
|
+
if bottom_roughness:
|
|
92
|
+
if bottom_roughness["model"] == "huray":
|
|
93
|
+
nodule_radius = bottom_roughness["nodule_radius"]
|
|
94
|
+
surface_ratio = bottom_roughness["surface_ratio"]
|
|
95
|
+
self.assign_roughness_model(
|
|
96
|
+
model_type="huray",
|
|
97
|
+
huray_radius=nodule_radius,
|
|
98
|
+
huray_surface_ratio=surface_ratio,
|
|
99
|
+
apply_on_surface="bottom",
|
|
100
|
+
)
|
|
101
|
+
elif bottom_roughness["model"] == "groisse":
|
|
102
|
+
roughness = bottom_roughness["roughness"]
|
|
103
|
+
self.assign_roughness_model(
|
|
104
|
+
model_type="groisse", groisse_roughness=roughness, apply_on_surface="bottom"
|
|
105
|
+
)
|
|
106
|
+
if "side" in v:
|
|
107
|
+
side_roughness = v["side"]
|
|
108
|
+
if side_roughness:
|
|
109
|
+
if side_roughness["model"] == "huray":
|
|
110
|
+
nodule_radius = side_roughness["nodule_radius"]
|
|
111
|
+
surface_ratio = side_roughness["surface_ratio"]
|
|
112
|
+
self.assign_roughness_model(
|
|
113
|
+
model_type="huray",
|
|
114
|
+
huray_radius=nodule_radius,
|
|
115
|
+
huray_surface_ratio=surface_ratio,
|
|
116
|
+
apply_on_surface="side",
|
|
117
|
+
)
|
|
118
|
+
elif side_roughness["model"] == "groisse":
|
|
119
|
+
roughness = side_roughness["roughness"]
|
|
120
|
+
self.assign_roughness_model(
|
|
121
|
+
model_type="groisse", groisse_roughness=roughness, apply_on_surface="side"
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
elif k == "etching":
|
|
125
|
+
self.etch_factor_enabled = v["enabled"]
|
|
126
|
+
self.etch_factor = float(v["factor"])
|
|
127
|
+
else:
|
|
128
|
+
self._pedb.logger.error(f"{k} is not a valid layer attribute")
|
|
129
|
+
|
|
66
130
|
def _create(self, layer_type):
|
|
67
131
|
if layer_type in self._stackup_layer_mapping:
|
|
68
132
|
layer_type = self._stackup_layer_mapping[layer_type]
|
|
@@ -99,12 +163,12 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
99
163
|
str
|
|
100
164
|
Material name.
|
|
101
165
|
"""
|
|
102
|
-
if self.
|
|
166
|
+
if self.type == "signal":
|
|
103
167
|
return self.get_fill_material()
|
|
104
168
|
|
|
105
169
|
@fill_material.setter
|
|
106
170
|
def fill_material(self, value):
|
|
107
|
-
if self.
|
|
171
|
+
if self.type == "signal":
|
|
108
172
|
self.set_fill_material(value)
|
|
109
173
|
|
|
110
174
|
@property
|
|
@@ -258,16 +322,24 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
258
322
|
float
|
|
259
323
|
Nodule radius value.
|
|
260
324
|
"""
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
325
|
+
try:
|
|
326
|
+
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
327
|
+
if len(top_roughness_model) == 2:
|
|
328
|
+
return top_roughness_model[0].value
|
|
329
|
+
else:
|
|
330
|
+
return None
|
|
331
|
+
except:
|
|
265
332
|
return None
|
|
266
333
|
|
|
267
334
|
@top_hallhuray_nodule_radius.setter
|
|
268
335
|
def top_hallhuray_nodule_radius(self, value):
|
|
269
|
-
|
|
270
|
-
|
|
336
|
+
try:
|
|
337
|
+
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
338
|
+
if len(top_roughness_model) == 2:
|
|
339
|
+
top_roughness_model[0] = GrpcValue(value)
|
|
340
|
+
self.set_roughness_model(top_roughness_model, GrpcRoughnessRegion.TOP)
|
|
341
|
+
except:
|
|
342
|
+
pass
|
|
271
343
|
|
|
272
344
|
@property
|
|
273
345
|
def top_hallhuray_surface_ratio(self):
|
|
@@ -278,16 +350,24 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
278
350
|
float
|
|
279
351
|
Surface ratio.
|
|
280
352
|
"""
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
353
|
+
try:
|
|
354
|
+
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
355
|
+
if len(top_roughness_model) == 2:
|
|
356
|
+
return top_roughness_model[1].value
|
|
357
|
+
else:
|
|
358
|
+
return None
|
|
359
|
+
except:
|
|
285
360
|
return None
|
|
286
361
|
|
|
287
362
|
@top_hallhuray_surface_ratio.setter
|
|
288
363
|
def top_hallhuray_surface_ratio(self, value):
|
|
289
|
-
|
|
290
|
-
|
|
364
|
+
try:
|
|
365
|
+
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
366
|
+
if len(top_roughness_model) == 2:
|
|
367
|
+
top_roughness_model[1] = GrpcValue(value)
|
|
368
|
+
self.set_roughness_model(top_roughness_model, GrpcRoughnessRegion.TOP)
|
|
369
|
+
except:
|
|
370
|
+
pass
|
|
291
371
|
|
|
292
372
|
@property
|
|
293
373
|
def bottom_hallhuray_nodule_radius(self):
|
|
@@ -298,15 +378,24 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
298
378
|
float
|
|
299
379
|
Nodule radius.
|
|
300
380
|
"""
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
381
|
+
try:
|
|
382
|
+
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
383
|
+
if len(bottom_roughness_model) == 2:
|
|
384
|
+
return round(bottom_roughness_model[0].value, 9)
|
|
385
|
+
else:
|
|
386
|
+
return None
|
|
387
|
+
except:
|
|
388
|
+
return None
|
|
305
389
|
|
|
306
390
|
@bottom_hallhuray_nodule_radius.setter
|
|
307
391
|
def bottom_hallhuray_nodule_radius(self, value):
|
|
308
|
-
|
|
309
|
-
|
|
392
|
+
try:
|
|
393
|
+
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
394
|
+
if len(bottom_roughness_model) == 2:
|
|
395
|
+
bottom_roughness_model[0] = GrpcValue(value)
|
|
396
|
+
self.set_roughness_model(bottom_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
397
|
+
except:
|
|
398
|
+
pass
|
|
310
399
|
|
|
311
400
|
@property
|
|
312
401
|
def bottom_hallhuray_surface_ratio(self):
|
|
@@ -317,15 +406,24 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
317
406
|
float
|
|
318
407
|
Surface ratio value.
|
|
319
408
|
"""
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
409
|
+
try:
|
|
410
|
+
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
411
|
+
if len(bottom_roughness_model) == 2:
|
|
412
|
+
return bottom_roughness_model[1].value
|
|
413
|
+
else:
|
|
414
|
+
return None
|
|
415
|
+
except:
|
|
416
|
+
return None
|
|
324
417
|
|
|
325
418
|
@bottom_hallhuray_surface_ratio.setter
|
|
326
419
|
def bottom_hallhuray_surface_ratio(self, value):
|
|
327
|
-
|
|
328
|
-
|
|
420
|
+
try:
|
|
421
|
+
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
422
|
+
if len(bottom_roughness_model) == 2:
|
|
423
|
+
bottom_roughness_model[1] = GrpcValue(value)
|
|
424
|
+
self.set_roughness_model(bottom_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
425
|
+
except:
|
|
426
|
+
pass
|
|
329
427
|
|
|
330
428
|
@property
|
|
331
429
|
def side_hallhuray_nodule_radius(self):
|
|
@@ -337,15 +435,23 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
337
435
|
Nodule radius value.
|
|
338
436
|
|
|
339
437
|
"""
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
438
|
+
try:
|
|
439
|
+
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
440
|
+
if len(side_roughness_model) == 2:
|
|
441
|
+
return round(side_roughness_model[0].value, 9)
|
|
442
|
+
return None
|
|
443
|
+
except:
|
|
444
|
+
return None
|
|
344
445
|
|
|
345
446
|
@side_hallhuray_nodule_radius.setter
|
|
346
447
|
def side_hallhuray_nodule_radius(self, value):
|
|
347
|
-
|
|
348
|
-
|
|
448
|
+
try:
|
|
449
|
+
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
450
|
+
if len(side_roughness_model) == 2:
|
|
451
|
+
side_roughness_model[0] = GrpcValue(value)
|
|
452
|
+
self.set_roughness_model(side_roughness_model, GrpcRoughnessRegion.SIDE)
|
|
453
|
+
except:
|
|
454
|
+
pass
|
|
349
455
|
|
|
350
456
|
@property
|
|
351
457
|
def side_hallhuray_surface_ratio(self):
|
|
@@ -356,16 +462,107 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
356
462
|
float
|
|
357
463
|
surface ratio.
|
|
358
464
|
"""
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
465
|
+
try:
|
|
466
|
+
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
467
|
+
if len(side_roughness_model) == 2:
|
|
468
|
+
return side_roughness_model[1].value
|
|
469
|
+
return None
|
|
470
|
+
except:
|
|
363
471
|
return None
|
|
364
472
|
|
|
365
473
|
@side_hallhuray_surface_ratio.setter
|
|
366
474
|
def side_hallhuray_surface_ratio(self, value):
|
|
367
|
-
|
|
368
|
-
|
|
475
|
+
try:
|
|
476
|
+
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
477
|
+
if len(side_roughness_model) == 2:
|
|
478
|
+
side_roughness_model[1] = GrpcValue(value)
|
|
479
|
+
self.set_roughness_model(side_roughness_model, GrpcRoughnessRegion.SIDE)
|
|
480
|
+
except:
|
|
481
|
+
pass
|
|
482
|
+
|
|
483
|
+
@property
|
|
484
|
+
def top_groisse_roughness(self):
|
|
485
|
+
"""Groisse model on layer top.
|
|
486
|
+
|
|
487
|
+
Returns
|
|
488
|
+
-------
|
|
489
|
+
float
|
|
490
|
+
Roughness value.
|
|
491
|
+
"""
|
|
492
|
+
try:
|
|
493
|
+
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
494
|
+
if isinstance(top_roughness_model, GrpcValue):
|
|
495
|
+
return top_roughness_model.value
|
|
496
|
+
else:
|
|
497
|
+
return None
|
|
498
|
+
except:
|
|
499
|
+
return None
|
|
500
|
+
|
|
501
|
+
@top_groisse_roughness.setter
|
|
502
|
+
def top_groisse_roughness(self, value):
|
|
503
|
+
try:
|
|
504
|
+
top_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.TOP)
|
|
505
|
+
if isinstance(top_roughness_model, GrpcValue):
|
|
506
|
+
top_roughness_model = GrpcValue(value)
|
|
507
|
+
self.set_roughness_model(top_roughness_model, GrpcRoughnessRegion.TOP)
|
|
508
|
+
except:
|
|
509
|
+
pass
|
|
510
|
+
|
|
511
|
+
@property
|
|
512
|
+
def bottom_groisse_roughness(self):
|
|
513
|
+
"""Groisse model on layer bottom.
|
|
514
|
+
|
|
515
|
+
Returns
|
|
516
|
+
-------
|
|
517
|
+
float
|
|
518
|
+
Roughness value.
|
|
519
|
+
"""
|
|
520
|
+
try:
|
|
521
|
+
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
522
|
+
if isinstance(bottom_roughness_model, GrpcValue):
|
|
523
|
+
return bottom_roughness_model.value
|
|
524
|
+
else:
|
|
525
|
+
return None
|
|
526
|
+
except:
|
|
527
|
+
return None
|
|
528
|
+
|
|
529
|
+
@bottom_groisse_roughness.setter
|
|
530
|
+
def bottom_groisse_roughness(self, value):
|
|
531
|
+
try:
|
|
532
|
+
bottom_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
533
|
+
if isinstance(bottom_roughness_model, GrpcValue):
|
|
534
|
+
bottom_roughness_model = GrpcValue(value)
|
|
535
|
+
self.set_roughness_model(bottom_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
536
|
+
except:
|
|
537
|
+
pass
|
|
538
|
+
|
|
539
|
+
@property
|
|
540
|
+
def side_groisse_roughness(self):
|
|
541
|
+
"""Groisse model on layer bottom.
|
|
542
|
+
|
|
543
|
+
Returns
|
|
544
|
+
-------
|
|
545
|
+
float
|
|
546
|
+
Roughness value.
|
|
547
|
+
"""
|
|
548
|
+
try:
|
|
549
|
+
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.SIDE)
|
|
550
|
+
if isinstance(side_roughness_model, GrpcValue):
|
|
551
|
+
return side_roughness_model.value
|
|
552
|
+
else:
|
|
553
|
+
return None
|
|
554
|
+
except:
|
|
555
|
+
return None
|
|
556
|
+
|
|
557
|
+
@side_groisse_roughness.setter
|
|
558
|
+
def side_groisse_roughness(self, value):
|
|
559
|
+
try:
|
|
560
|
+
side_roughness_model = self.get_roughness_model(GrpcRoughnessRegion.BOTTOM)
|
|
561
|
+
if isinstance(side_roughness_model, GrpcValue):
|
|
562
|
+
side_roughness_model = GrpcValue(value)
|
|
563
|
+
self.set_roughness_model(side_roughness_model, GrpcRoughnessRegion.BOTTOM)
|
|
564
|
+
except Exception as e:
|
|
565
|
+
self._pedb.logger.error(e)
|
|
369
566
|
|
|
370
567
|
def assign_roughness_model(
|
|
371
568
|
self,
|
|
@@ -400,7 +597,7 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
400
597
|
elif apply_on_surface == "bottom":
|
|
401
598
|
regions = [GrpcRoughnessRegion.BOTTOM]
|
|
402
599
|
elif apply_on_surface == "side":
|
|
403
|
-
regions = [GrpcRoughnessRegion.
|
|
600
|
+
regions = [GrpcRoughnessRegion.SIDE]
|
|
404
601
|
self.roughness_enabled = True
|
|
405
602
|
for r in regions:
|
|
406
603
|
if model_type == "huray":
|
|
@@ -408,3 +605,47 @@ class StackupLayer(GrpcStackupLayer):
|
|
|
408
605
|
else:
|
|
409
606
|
model = GrpcValue(groisse_roughness)
|
|
410
607
|
self.set_roughness_model(model, r)
|
|
608
|
+
|
|
609
|
+
@property
|
|
610
|
+
def properties(self):
|
|
611
|
+
data = {"name": self.name, "type": self.type, "color": self.color}
|
|
612
|
+
if self.type == "signal" or self.type == "dielectric":
|
|
613
|
+
data["material"] = self.material
|
|
614
|
+
data["thickness"] = self.thickness
|
|
615
|
+
if self.type == "signal":
|
|
616
|
+
data["fill_material"] = self.fill_material
|
|
617
|
+
roughness = {"top": {}, "bottom": {}, "side": {}}
|
|
618
|
+
if self.top_hallhuray_nodule_radius:
|
|
619
|
+
roughness["top"]["model"] = "huray"
|
|
620
|
+
roughness["top"]["nodule_radius"] = self.top_hallhuray_nodule_radius
|
|
621
|
+
roughness["top"]["surface_ratio"] = self.top_hallhuray_surface_ratio
|
|
622
|
+
|
|
623
|
+
elif self.top_groisse_roughness:
|
|
624
|
+
roughness["top"]["model"] = "groisse"
|
|
625
|
+
roughness["top"]["roughness"] = self.top_groisse_roughness
|
|
626
|
+
|
|
627
|
+
if self.bottom_hallhuray_nodule_radius:
|
|
628
|
+
roughness["bottom"]["model"] = "huray"
|
|
629
|
+
roughness["bottom"]["nodule_radius"] = self.bottom_hallhuray_nodule_radius
|
|
630
|
+
roughness["bottom"]["surface_ratio"] = self.bottom_hallhuray_surface_ratio
|
|
631
|
+
|
|
632
|
+
elif self.bottom_groisse_roughness:
|
|
633
|
+
roughness["bottom"]["model"] = "groisse"
|
|
634
|
+
roughness["bottom"]["roughness"] = self.bottom_groisse_roughness
|
|
635
|
+
|
|
636
|
+
if self.side_hallhuray_nodule_radius:
|
|
637
|
+
roughness["side"]["model"] = "huray"
|
|
638
|
+
roughness["side"]["nodule_radius"] = self.side_hallhuray_nodule_radius
|
|
639
|
+
roughness["side"]["surface_ratio"] = self.side_hallhuray_surface_ratio
|
|
640
|
+
|
|
641
|
+
elif self.side_groisse_roughness:
|
|
642
|
+
roughness["side"]["model"] = "groisse"
|
|
643
|
+
roughness["side"]["roughness"] = self.side_groisse_roughness
|
|
644
|
+
|
|
645
|
+
if roughness["top"] or roughness["bottom"] or roughness["side"]:
|
|
646
|
+
roughness["enabled"] = True
|
|
647
|
+
else:
|
|
648
|
+
roughness["enabled"] = False
|
|
649
|
+
data["roughness"] = roughness
|
|
650
|
+
data["etching"] = {"enabled": self.etch_factor_enabled, "factor": self.etch_factor}
|
|
651
|
+
return data
|
|
@@ -26,7 +26,13 @@ This module contains these classes: `EdbLayout` and `Shape`.
|
|
|
26
26
|
from typing import Union
|
|
27
27
|
|
|
28
28
|
from ansys.edb.core.layout.layout import Layout as GrpcLayout
|
|
29
|
+
import ansys.edb.core.primitive.bondwire
|
|
30
|
+
import ansys.edb.core.primitive.circle
|
|
31
|
+
import ansys.edb.core.primitive.padstack_instance
|
|
32
|
+
import ansys.edb.core.primitive.path
|
|
33
|
+
import ansys.edb.core.primitive.polygon
|
|
29
34
|
import ansys.edb.core.primitive.primitive
|
|
35
|
+
import ansys.edb.core.primitive.rectangle
|
|
30
36
|
|
|
31
37
|
from pyedb.grpc.database.hierarchy.component import Component
|
|
32
38
|
from pyedb.grpc.database.hierarchy.pingroup import PinGroup
|
|
@@ -69,17 +75,17 @@ class Layout(GrpcLayout):
|
|
|
69
75
|
def primitives(self):
|
|
70
76
|
prims = []
|
|
71
77
|
for prim in super().primitives:
|
|
72
|
-
if isinstance(prim, ansys.edb.core.primitive.
|
|
78
|
+
if isinstance(prim, ansys.edb.core.primitive.path.Path):
|
|
73
79
|
prims.append(Path(self._pedb, prim))
|
|
74
|
-
elif isinstance(prim, ansys.edb.core.primitive.
|
|
80
|
+
elif isinstance(prim, ansys.edb.core.primitive.polygon.Polygon):
|
|
75
81
|
prims.append(Polygon(self._pedb, prim))
|
|
76
|
-
elif isinstance(prim, ansys.edb.core.primitive.
|
|
82
|
+
elif isinstance(prim, ansys.edb.core.primitive.padstack_instance.PadstackInstance):
|
|
77
83
|
prims.append(PadstackInstance(self._pedb, prim))
|
|
78
|
-
elif isinstance(prim, ansys.edb.core.primitive.
|
|
84
|
+
elif isinstance(prim, ansys.edb.core.primitive.rectangle.Rectangle):
|
|
79
85
|
prims.append(Rectangle(self._pedb, prim))
|
|
80
|
-
elif isinstance(prim, ansys.edb.core.primitive.
|
|
86
|
+
elif isinstance(prim, ansys.edb.core.primitive.circle.Circle):
|
|
81
87
|
prims.append(Circle(self._pedb, prim))
|
|
82
|
-
elif isinstance(prim, ansys.edb.core.primitive.
|
|
88
|
+
elif isinstance(prim, ansys.edb.core.primitive.bondwire.Bondwire):
|
|
83
89
|
prims.append(Bondwire(self._pedb, prim))
|
|
84
90
|
return prims
|
|
85
91
|
|
pyedb/grpc/database/modeler.py
CHANGED
|
@@ -33,12 +33,12 @@ from ansys.edb.core.geometry.polygon_data import (
|
|
|
33
33
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
34
34
|
from ansys.edb.core.hierarchy.pin_group import PinGroup as GrpcPinGroup
|
|
35
35
|
from ansys.edb.core.inner.exceptions import InvalidArgumentException
|
|
36
|
-
from ansys.edb.core.primitive.
|
|
36
|
+
from ansys.edb.core.primitive.bondwire import BondwireType as GrpcBondwireType
|
|
37
|
+
from ansys.edb.core.primitive.path import PathCornerType as GrpcPathCornerType
|
|
38
|
+
from ansys.edb.core.primitive.path import PathEndCapType as GrpcPathEndCapType
|
|
39
|
+
from ansys.edb.core.primitive.rectangle import (
|
|
37
40
|
RectangleRepresentationType as GrpcRectangleRepresentationType,
|
|
38
41
|
)
|
|
39
|
-
from ansys.edb.core.primitive.primitive import BondwireType as GrpcBondwireType
|
|
40
|
-
from ansys.edb.core.primitive.primitive import PathCornerType as GrpcPathCornerType
|
|
41
|
-
from ansys.edb.core.primitive.primitive import PathEndCapType as GrpcPathEndCapType
|
|
42
42
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
43
43
|
|
|
44
44
|
from pyedb.grpc.database.primitive.bondwire import Bondwire
|
|
@@ -314,10 +314,10 @@ class Modeler(object):
|
|
|
314
314
|
list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
|
|
315
315
|
List of primitives, polygons, paths and rectangles.
|
|
316
316
|
"""
|
|
317
|
-
from ansys.edb.core.primitive.
|
|
318
|
-
from ansys.edb.core.primitive.
|
|
319
|
-
from ansys.edb.core.primitive.
|
|
320
|
-
from ansys.edb.core.primitive.
|
|
317
|
+
from ansys.edb.core.primitive.circle import Circle as GrpcCircle
|
|
318
|
+
from ansys.edb.core.primitive.path import Path as GrpcPath
|
|
319
|
+
from ansys.edb.core.primitive.polygon import Polygon as GrpcPolygon
|
|
320
|
+
from ansys.edb.core.primitive.rectangle import Rectangle as GrpcRectangle
|
|
321
321
|
|
|
322
322
|
if isinstance(layer, str) and layer not in list(self._pedb.stackup.signal_layers.keys()):
|
|
323
323
|
layer = None
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
from ansys.edb.core.primitive.
|
|
23
|
+
from ansys.edb.core.primitive.bondwire import (
|
|
24
24
|
BondwireCrossSectionType as GrpcBondwireCrossSectionType,
|
|
25
25
|
)
|
|
26
|
-
from ansys.edb.core.primitive.
|
|
27
|
-
from ansys.edb.core.primitive.
|
|
26
|
+
from ansys.edb.core.primitive.bondwire import Bondwire as GrpcBondWire
|
|
27
|
+
from ansys.edb.core.primitive.bondwire import BondwireType as GrpcBondWireType
|
|
28
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
29
|
|
|
30
30
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
from ansys.edb.core.primitive.
|
|
24
|
+
from ansys.edb.core.primitive.circle import Circle as GrpcCircle
|
|
25
25
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
26
26
|
|
|
27
27
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
@@ -27,8 +27,12 @@ from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
|
27
27
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
28
28
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
29
29
|
from ansys.edb.core.hierarchy.pin_group import PinGroup as GrpcPinGroup
|
|
30
|
-
from ansys.edb.core.primitive.
|
|
31
|
-
|
|
30
|
+
from ansys.edb.core.primitive.padstack_instance import (
|
|
31
|
+
PadstackInstance as GrpcPadstackInstance,
|
|
32
|
+
)
|
|
33
|
+
from ansys.edb.core.terminal.pin_group_terminal import (
|
|
34
|
+
PinGroupTerminal as GrpcPinGroupTerminal,
|
|
35
|
+
)
|
|
32
36
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
33
37
|
|
|
34
38
|
from pyedb.grpc.database.definition.padstack_def import PadstackDef
|
|
@@ -98,7 +102,9 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
98
102
|
PadstackInstanceTerminal,
|
|
99
103
|
)
|
|
100
104
|
|
|
101
|
-
term =
|
|
105
|
+
term = self.get_padstack_instance_terminal()
|
|
106
|
+
if not term.is_null:
|
|
107
|
+
term = PadstackInstanceTerminal(self._pedb, term)
|
|
102
108
|
return term if not term.is_null else None
|
|
103
109
|
|
|
104
110
|
def create_terminal(self, name=None):
|
|
@@ -661,6 +667,10 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
661
667
|
name = self.get_product_property(GrpcProductIdType.DESIGNER, 11)
|
|
662
668
|
return str(name).strip("'")
|
|
663
669
|
|
|
670
|
+
@aedt_name.setter
|
|
671
|
+
def aedt_name(self, value):
|
|
672
|
+
self.set_product_property(GrpcProductIdType.DESIGNER, 11, value)
|
|
673
|
+
|
|
664
674
|
def get_backdrill_type(self, from_bottom=True):
|
|
665
675
|
"""Return backdrill type
|
|
666
676
|
Parameters
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
import math
|
|
23
23
|
|
|
24
24
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
25
|
-
from ansys.edb.core.primitive.
|
|
26
|
-
from ansys.edb.core.primitive.
|
|
25
|
+
from ansys.edb.core.primitive.path import Path as GrpcPath
|
|
26
|
+
from ansys.edb.core.primitive.path import PathCornerType as GrpcPatCornerType
|
|
27
27
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
28
28
|
|
|
29
29
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
@@ -25,7 +25,7 @@ import math
|
|
|
25
25
|
|
|
26
26
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
27
27
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
28
|
-
from ansys.edb.core.primitive.
|
|
28
|
+
from ansys.edb.core.primitive.polygon import Polygon as GrpcPolygon
|
|
29
29
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
30
30
|
|
|
31
31
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
@@ -64,7 +64,7 @@ class Polygon(GrpcPolygon, Primitive):
|
|
|
64
64
|
|
|
65
65
|
Returns
|
|
66
66
|
-------
|
|
67
|
-
List[:class:`Polygon <ansys.edb.core.primitive.
|
|
67
|
+
List[:class:`Polygon <ansys.edb.core.primitive.polygon.Polygon>`]
|
|
68
68
|
All new polygons created from the removal operation.
|
|
69
69
|
|
|
70
70
|
"""
|
|
@@ -84,7 +84,7 @@ class Polygon(GrpcPolygon, Primitive):
|
|
|
84
84
|
|
|
85
85
|
Returns
|
|
86
86
|
-------
|
|
87
|
-
:class:`Polygon <ansys.edb.core.primitive.
|
|
87
|
+
:class:`Polygon <ansys.edb.core.primitive.polygon.Polygon>`
|
|
88
88
|
Cloned polygon.
|
|
89
89
|
|
|
90
90
|
"""
|