pyedb 0.43.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 +20 -14
- pyedb/configuration/cfg_components.py +1 -1
- pyedb/configuration/cfg_general.py +6 -4
- pyedb/configuration/cfg_modeler.py +1 -0
- pyedb/configuration/cfg_package_definition.py +41 -1
- pyedb/configuration/cfg_padstacks.py +611 -256
- pyedb/configuration/cfg_ports_sources.py +75 -15
- pyedb/configuration/cfg_s_parameter_models.py +30 -0
- pyedb/configuration/cfg_setup.py +94 -21
- pyedb/configuration/cfg_stackup.py +44 -0
- pyedb/dotnet/database/edb_data/design_options.py +19 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +9 -4
- pyedb/dotnet/database/geometry/polygon_data.py +4 -2
- pyedb/dotnet/database/padstack.py +6 -2
- pyedb/dotnet/database/utilities/simulation_setup.py +7 -17
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +30 -0
- 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.43.0.dist-info → pyedb-0.44.0.dist-info}/METADATA +1 -1
- {pyedb-0.43.0.dist-info → pyedb-0.44.0.dist-info}/RECORD +52 -52
- {pyedb-0.43.0.dist-info → pyedb-0.44.0.dist-info}/LICENSE +0 -0
- {pyedb-0.43.0.dist-info → pyedb-0.44.0.dist-info}/WHEEL +0 -0
|
@@ -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
|
"""
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
24
24
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
25
|
-
from ansys.edb.core.primitive.
|
|
25
|
+
from ansys.edb.core.primitive.circle import Circle as GrpcCircle
|
|
26
26
|
from ansys.edb.core.primitive.primitive import Primitive as GrpcPrimitive
|
|
27
27
|
|
|
28
28
|
from pyedb.misc.utilities import compute_arc_points
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
from ansys.edb.core.primitive.
|
|
24
|
+
from ansys.edb.core.primitive.rectangle import (
|
|
25
25
|
RectangleRepresentationType as GrpcRectangleRepresentationType,
|
|
26
26
|
)
|
|
27
|
-
from ansys.edb.core.primitive.
|
|
27
|
+
from ansys.edb.core.primitive.rectangle import Rectangle as GrpcRectangle
|
|
28
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
29
|
|
|
30
30
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
@@ -293,7 +293,14 @@ class HfssSimulationSetup(GrpcHfssSimulationSetup):
|
|
|
293
293
|
return mesh_operation
|
|
294
294
|
|
|
295
295
|
def add_sweep(
|
|
296
|
-
self,
|
|
296
|
+
self,
|
|
297
|
+
name=None,
|
|
298
|
+
distribution="linear",
|
|
299
|
+
start_freq="0GHz",
|
|
300
|
+
stop_freq="20GHz",
|
|
301
|
+
step="10MHz",
|
|
302
|
+
discrete=False,
|
|
303
|
+
frequency_set=None,
|
|
297
304
|
):
|
|
298
305
|
"""Add a HFSS frequency sweep.
|
|
299
306
|
|
|
@@ -317,39 +324,75 @@ class HfssSimulationSetup(GrpcHfssSimulationSetup):
|
|
|
317
324
|
distribution. Must be integer in that case.
|
|
318
325
|
discrete : bool, optional
|
|
319
326
|
Whether the sweep is discrete. The default is ``False``.
|
|
327
|
+
frequency_set : List, optional
|
|
328
|
+
Frequency set is a list adding one or more frequency sweeps. If ``frequency_set`` is provided, the other
|
|
329
|
+
arguments are ignored except ``discrete``. Default value is ``None``.
|
|
330
|
+
example of frequency_set : [['linear_scale', '50MHz', '200MHz', '10MHz']].
|
|
320
331
|
|
|
321
332
|
Returns
|
|
322
333
|
-------
|
|
323
334
|
bool
|
|
324
335
|
"""
|
|
325
336
|
init_sweep_count = len(self.sweep_data)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
if frequency_set:
|
|
338
|
+
for sweep in frequency_set:
|
|
339
|
+
if "linear_scale" in sweep:
|
|
340
|
+
distribution = "LIN"
|
|
341
|
+
elif "linear_count" in sweep:
|
|
342
|
+
distribution = "LINC"
|
|
343
|
+
elif "exponential" in sweep:
|
|
344
|
+
distribution = "ESTP"
|
|
345
|
+
elif "log_scale" in sweep:
|
|
346
|
+
distribution = "DEC"
|
|
347
|
+
elif "octave_count" in sweep:
|
|
348
|
+
distribution = "OCT"
|
|
349
|
+
else:
|
|
350
|
+
distribution = "LIN"
|
|
351
|
+
start_freq = self._pedb.number_with_units(sweep[1], "Hz")
|
|
352
|
+
stop_freq = self._pedb.number_with_units(sweep[2], "Hz")
|
|
353
|
+
step = str(sweep[3])
|
|
354
|
+
if not name:
|
|
355
|
+
name = f"sweep_{init_sweep_count + 1}"
|
|
356
|
+
sweep_data = [
|
|
357
|
+
SweepData(
|
|
358
|
+
self._pedb, name=name, distribution=distribution, start_f=start_freq, end_f=stop_freq, step=step
|
|
359
|
+
)
|
|
360
|
+
]
|
|
361
|
+
if discrete:
|
|
362
|
+
sweep_data[0].type = sweep_data[0].type.DISCRETE_SWEEP
|
|
363
|
+
for sweep in self.sweep_data:
|
|
364
|
+
sweep_data.append(sweep)
|
|
365
|
+
self.sweep_data = sweep_data
|
|
339
366
|
else:
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
367
|
+
start_freq = self._pedb.number_with_units(start_freq, "Hz")
|
|
368
|
+
stop_freq = self._pedb.number_with_units(stop_freq, "Hz")
|
|
369
|
+
step = str(step)
|
|
370
|
+
if distribution.lower() == "linear":
|
|
371
|
+
distribution = "LIN"
|
|
372
|
+
elif distribution.lower() == "linear_count":
|
|
373
|
+
distribution = "LINC"
|
|
374
|
+
elif distribution.lower() == "exponential":
|
|
375
|
+
distribution = "ESTP"
|
|
376
|
+
elif distribution.lower() == "decade_count":
|
|
377
|
+
distribution = "DEC"
|
|
378
|
+
elif distribution.lower() == "octave_count":
|
|
379
|
+
distribution = "OCT"
|
|
380
|
+
else:
|
|
381
|
+
distribution = "LIN"
|
|
382
|
+
if not name:
|
|
383
|
+
name = f"sweep_{init_sweep_count + 1}"
|
|
384
|
+
sweep_data = [
|
|
385
|
+
SweepData(
|
|
386
|
+
self._pedb, name=name, distribution=distribution, start_f=start_freq, end_f=stop_freq, step=step
|
|
387
|
+
)
|
|
388
|
+
]
|
|
389
|
+
if discrete:
|
|
390
|
+
sweep_data[0].type = sweep_data[0].type.DISCRETE_SWEEP
|
|
391
|
+
for sweep in self.sweep_data:
|
|
392
|
+
sweep_data.append(sweep)
|
|
393
|
+
self.sweep_data = sweep_data
|
|
394
|
+
if len(self.sweep_data) == init_sweep_count + 1:
|
|
395
|
+
return True
|
|
396
|
+
else:
|
|
397
|
+
self._pedb.logger.error("Failed to add frequency sweep data")
|
|
398
|
+
return False
|
|
@@ -20,14 +20,14 @@
|
|
|
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 typing import Union
|
|
23
|
+
from typing import List, Set, Union
|
|
24
24
|
|
|
25
25
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
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.terminal.
|
|
29
|
-
from ansys.edb.core.terminal.
|
|
30
|
-
from ansys.edb.core.terminal.
|
|
28
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeTerminal as GrpcEdgeTerminal
|
|
29
|
+
from ansys.edb.core.terminal.edge_terminal import PrimitiveEdge as GrpcPrimitiveEdge
|
|
30
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
31
31
|
from ansys.edb.core.utility.rlc import Rlc as GrpcRlc
|
|
32
32
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
33
33
|
|
|
@@ -267,8 +267,8 @@ class SourceExcitation:
|
|
|
267
267
|
return term or False
|
|
268
268
|
|
|
269
269
|
def _get_pins_for_ports(
|
|
270
|
-
self, pins: Union[int, str, PadstackInstance,
|
|
271
|
-
) ->
|
|
270
|
+
self, pins: Union[int, str, PadstackInstance, List[Union[int, str, PadstackInstance]]], comp: Component
|
|
271
|
+
) -> List[PadstackInstance]:
|
|
272
272
|
if not isinstance(pins, list):
|
|
273
273
|
pins = [pins]
|
|
274
274
|
result = []
|
|
@@ -506,7 +506,7 @@ class SourceExcitation:
|
|
|
506
506
|
return True
|
|
507
507
|
|
|
508
508
|
@staticmethod
|
|
509
|
-
def _normalize_net_list(net_list) ->
|
|
509
|
+
def _normalize_net_list(net_list) -> Set[str]:
|
|
510
510
|
if not isinstance(net_list, list):
|
|
511
511
|
net_list = [net_list]
|
|
512
512
|
nets = set()
|
pyedb/grpc/database/stackup.py
CHANGED
|
@@ -170,11 +170,19 @@ class LayerCollection(GrpcLayerCollection):
|
|
|
170
170
|
if "thickness" in kwargs:
|
|
171
171
|
thickness = GrpcValue(kwargs["thickness"])
|
|
172
172
|
elevation = GrpcValue(0.0)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
_layer_type =
|
|
173
|
+
if "type" in kwargs:
|
|
174
|
+
_l_map = {"signal": GrpcLayerType.SIGNAL_LAYER, "dielectric": GrpcLayerType.DIELECTRIC_LAYER}
|
|
175
|
+
_layer_type = _l_map[kwargs["type"]]
|
|
176
|
+
else:
|
|
177
|
+
_layer_type = GrpcLayerType.SIGNAL_LAYER
|
|
178
|
+
if layer_type.lower() == "dielectric":
|
|
179
|
+
_layer_type = GrpcLayerType.DIELECTRIC_LAYER
|
|
180
|
+
if "material" in kwargs:
|
|
181
|
+
material = kwargs["material"]
|
|
182
|
+
else:
|
|
183
|
+
material = "copper"
|
|
176
184
|
layer = GrpcStackupLayer.create(
|
|
177
|
-
name=name, layer_type=_layer_type, thickness=thickness, material=
|
|
185
|
+
name=name, layer_type=_layer_type, thickness=thickness, material=material, elevation=elevation
|
|
178
186
|
)
|
|
179
187
|
return self._layer_collection.add_layer_below(layer, base_layer_name)
|
|
180
188
|
|
|
@@ -695,8 +703,8 @@ class Stackup(LayerCollection):
|
|
|
695
703
|
|
|
696
704
|
"""
|
|
697
705
|
new_layer_collection = LayerCollection.create()
|
|
698
|
-
for lyr in self.layers:
|
|
699
|
-
if not (
|
|
706
|
+
for layer_name, lyr in self.layers.items():
|
|
707
|
+
if not (layer_name == name):
|
|
700
708
|
new_layer_collection.add_layer_bottom(lyr)
|
|
701
709
|
|
|
702
710
|
self._pedb.layout.layer_collection = new_layer_collection
|
|
@@ -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.terminal.
|
|
23
|
+
from ansys.edb.core.terminal.bundle_terminal import BundleTerminal as GrpcBundleTerminal
|
|
24
|
+
from ansys.edb.core.terminal.terminal import (
|
|
24
25
|
SourceTermToGroundType as GrpcSourceTermToGroundType,
|
|
25
26
|
)
|
|
26
|
-
from ansys.edb.core.terminal.
|
|
27
|
-
from ansys.edb.core.terminal.terminals import HfssPIType as GrpcHfssPIType
|
|
27
|
+
from ansys.edb.core.terminal.terminal import HfssPIType as GrpcHfssPIType
|
|
28
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
29
|
|
|
30
30
|
from pyedb.grpc.database.hierarchy.component import Component
|
|
@@ -20,8 +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
|
-
from ansys.edb.core.terminal.
|
|
24
|
-
from ansys.edb.core.terminal.
|
|
23
|
+
from ansys.edb.core.terminal.bundle_terminal import BundleTerminal as GrpcBundleTerminal
|
|
24
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeTerminal as GrpcEdgeTerminal
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class EdgeTerminal(GrpcEdgeTerminal):
|
|
@@ -20,10 +20,12 @@
|
|
|
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.terminal.
|
|
23
|
+
from ansys.edb.core.terminal.padstack_instance_terminal import (
|
|
24
24
|
PadstackInstanceTerminal as GrpcPadstackInstanceTerminal,
|
|
25
25
|
)
|
|
26
|
-
from ansys.edb.core.terminal.
|
|
26
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
|
+
|
|
28
|
+
from pyedb.misc.misc import deprecated_property
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
@@ -45,6 +47,18 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
45
47
|
pos_x, pos_y, rotation = self.padstack_instance.get_position_and_rotation()
|
|
46
48
|
return [pos_x.value, pos_y.value]
|
|
47
49
|
|
|
50
|
+
@property
|
|
51
|
+
def padstack_instance(self):
|
|
52
|
+
from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
|
|
53
|
+
|
|
54
|
+
return PadstackInstance(self._pedb, super().padstack_instance)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def component(self):
|
|
58
|
+
from pyedb.grpc.database.hierarchy.component import Component
|
|
59
|
+
|
|
60
|
+
return Component(self._pedb, super().component)
|
|
61
|
+
|
|
48
62
|
@property
|
|
49
63
|
def location(self):
|
|
50
64
|
"""Terminal position.
|
|
@@ -169,3 +183,29 @@ class PadstackInstanceTerminal(GrpcPadstackInstanceTerminal):
|
|
|
169
183
|
"pec": GrpcBoundaryType.PEC,
|
|
170
184
|
}
|
|
171
185
|
super(PadstackInstanceTerminal, self.__class__).boundary_type.__set__(self, mapping[value.name.lower()])
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def is_port(self):
|
|
189
|
+
if self.boundary_type == "port":
|
|
190
|
+
return True
|
|
191
|
+
return False
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
@deprecated_property
|
|
195
|
+
def ref_terminal(self):
|
|
196
|
+
"""Return reference terminal.
|
|
197
|
+
|
|
198
|
+
..deprecated:: 0.43.0
|
|
199
|
+
Use: func:`reference_terminal` property instead.
|
|
200
|
+
"""
|
|
201
|
+
self._pedb.logger.warning("ref_terminal property is deprecated, use reference_terminal property instead.")
|
|
202
|
+
return self.reference_terminal
|
|
203
|
+
|
|
204
|
+
@ref_terminal.setter
|
|
205
|
+
def ref_terminal(self, value):
|
|
206
|
+
if isinstance(value, PadstackInstanceTerminal):
|
|
207
|
+
self.reference_terminal = value
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def terminal_type(self):
|
|
211
|
+
return "PadstackInstanceTerminal"
|
|
@@ -20,10 +20,13 @@
|
|
|
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.terminal.
|
|
24
|
-
|
|
23
|
+
from ansys.edb.core.terminal.pin_group_terminal import (
|
|
24
|
+
PinGroupTerminal as GrpcPinGroupTerminal,
|
|
25
|
+
)
|
|
26
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
25
27
|
|
|
26
28
|
from pyedb.grpc.database.net.net import Net
|
|
29
|
+
from pyedb.misc.misc import deprecated_property
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
@@ -56,6 +59,12 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
56
59
|
value = GrpcBoundaryType.VOLTAGE_PROBE
|
|
57
60
|
super(PinGroupTerminal, self.__class__).boundary_type.__set__(self, value)
|
|
58
61
|
|
|
62
|
+
@property
|
|
63
|
+
def is_port(self):
|
|
64
|
+
if self.boundary_type == "port":
|
|
65
|
+
return True
|
|
66
|
+
return False
|
|
67
|
+
|
|
59
68
|
@property
|
|
60
69
|
def magnitude(self):
|
|
61
70
|
"""Source magnitude.
|
|
@@ -160,3 +169,27 @@ class PinGroupTerminal(GrpcPinGroupTerminal):
|
|
|
160
169
|
from pyedb.grpc.database.hierarchy.pingroup import PinGroup
|
|
161
170
|
|
|
162
171
|
return PinGroup(self._pedb, super().pin_group)
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
def terminal_type(self):
|
|
175
|
+
return "PinGroupTerminal"
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
@deprecated_property
|
|
179
|
+
def ref_terminal(self):
|
|
180
|
+
"""Property keeping DotNet compatibility
|
|
181
|
+
|
|
182
|
+
..deprecated:: 0.43.0
|
|
183
|
+
Use: func:`reference_terminal` property instead.
|
|
184
|
+
|
|
185
|
+
"""
|
|
186
|
+
self._pedb.logger.warning("ref_terminal property is deprecated, use reference_terminal property instead.")
|
|
187
|
+
return self.reference_terminal
|
|
188
|
+
|
|
189
|
+
@ref_terminal.setter
|
|
190
|
+
def ref_terminal(self, value):
|
|
191
|
+
self.reference_terminal = value
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def hfss_type(self):
|
|
195
|
+
return "circuit"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
24
|
-
from ansys.edb.core.terminal.
|
|
24
|
+
from ansys.edb.core.terminal.point_terminal import PointTerminal as GrpcPointTerminal
|
|
25
25
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
26
26
|
|
|
27
27
|
|
|
@@ -97,3 +97,12 @@ class PointTerminal(GrpcPointTerminal):
|
|
|
97
97
|
@reference_terminal.setter
|
|
98
98
|
def reference_terminal(self, value):
|
|
99
99
|
super(PointTerminal, self.__class__).reference_terminal.__set__(self, value)
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def terminal_type(self):
|
|
103
|
+
return "PointTerminal"
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def is_port(self):
|
|
107
|
+
"""Adding DotNet compatibility."""
|
|
108
|
+
return True
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
import re
|
|
24
24
|
|
|
25
|
-
from ansys.edb.core.terminal.
|
|
26
|
-
from ansys.edb.core.terminal.
|
|
27
|
-
from ansys.edb.core.terminal.
|
|
28
|
-
from ansys.edb.core.terminal.
|
|
25
|
+
from ansys.edb.core.terminal.edge_terminal import EdgeType as GrpcEdgeType
|
|
26
|
+
from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
|
|
27
|
+
from ansys.edb.core.terminal.terminal import Terminal as GrpcTerminal
|
|
28
|
+
from ansys.edb.core.terminal.terminal import TerminalType as GrpcTerminalType
|
|
29
29
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
30
30
|
|
|
31
31
|
from pyedb.dotnet.database.edb_data.padstacks_data import EDBPadstackInstance
|
|
@@ -20,7 +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.utility.hfss_extent_info import (
|
|
24
|
+
HFSSExtentInfoType as GrpcHfssExtentInfoType,
|
|
25
|
+
)
|
|
23
26
|
from ansys.edb.core.utility.hfss_extent_info import HfssExtentInfo as GrpcHfssExtentInfo
|
|
27
|
+
from ansys.edb.core.utility.hfss_extent_info import OpenRegionType as GrpcOpenRegionType
|
|
24
28
|
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
25
29
|
|
|
26
30
|
|
|
@@ -37,14 +41,14 @@ class HfssExtentInfo(GrpcHfssExtentInfo):
|
|
|
37
41
|
self._pedb = pedb
|
|
38
42
|
super().__init__()
|
|
39
43
|
self.extent_type_mapping = {
|
|
40
|
-
"bounding_box":
|
|
41
|
-
"conforming":
|
|
42
|
-
"convex_hull":
|
|
43
|
-
"polygon":
|
|
44
|
+
"bounding_box": GrpcHfssExtentInfoType.BOUNDING_BOX,
|
|
45
|
+
"conforming": GrpcHfssExtentInfoType.CONFORMING,
|
|
46
|
+
"convex_hull": GrpcHfssExtentInfoType.CONVEX_HUL,
|
|
47
|
+
"polygon": GrpcHfssExtentInfoType.POLYGON,
|
|
44
48
|
}
|
|
45
49
|
self._open_region_type = {
|
|
46
|
-
"radiation":
|
|
47
|
-
"pml":
|
|
50
|
+
"radiation": GrpcOpenRegionType.RADIATION,
|
|
51
|
+
"pml": GrpcOpenRegionType.PML,
|
|
48
52
|
}
|
|
49
53
|
self.hfss_extent_type = self._hfss_extent_info.extent_type
|
|
50
54
|
|
|
@@ -258,13 +262,13 @@ class HfssExtentInfo(GrpcHfssExtentInfo):
|
|
|
258
262
|
hfss_extent = self._hfss_extent_info
|
|
259
263
|
if isinstance(value, str):
|
|
260
264
|
if value.lower() == "bounding_box":
|
|
261
|
-
value =
|
|
265
|
+
value = GrpcHfssExtentInfoType.BOUNDING_BOX
|
|
262
266
|
elif value.lower() == "conforming":
|
|
263
|
-
value =
|
|
267
|
+
value = GrpcHfssExtentInfoType.CONFORMING
|
|
264
268
|
elif value.lower() == "convex_hul":
|
|
265
|
-
value =
|
|
269
|
+
value = GrpcHfssExtentInfoType.CONVEX_HUL
|
|
266
270
|
elif value.lower() == "polygon":
|
|
267
|
-
value =
|
|
271
|
+
value = GrpcHfssExtentInfoType.POLYGON
|
|
268
272
|
else:
|
|
269
273
|
raise f"Invalid extent type : {value}"
|
|
270
274
|
hfss_extent.extent_type = value
|