pyedb 0.52.0__py3-none-any.whl → 0.54.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_common.py +12 -15
- pyedb/configuration/cfg_data.py +2 -2
- pyedb/configuration/cfg_modeler.py +163 -234
- pyedb/configuration/cfg_ports_sources.py +6 -8
- pyedb/configuration/cfg_stackup.py +62 -249
- pyedb/configuration/configuration.py +272 -170
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +1 -1
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +1 -1
- pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
- pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
- pyedb/dotnet/database/cell/terminal/terminal.py +24 -26
- pyedb/dotnet/database/components.py +33 -27
- pyedb/dotnet/database/definition/component_def.py +3 -3
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +1 -1
- pyedb/dotnet/database/dotnet/database.py +47 -38
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +17 -15
- pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
- pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +7 -3
- pyedb/dotnet/database/geometry/point_data.py +1 -1
- pyedb/dotnet/database/geometry/polygon_data.py +2 -4
- pyedb/dotnet/database/hfss.py +7 -7
- pyedb/dotnet/database/materials.py +2 -2
- pyedb/dotnet/database/modeler.py +8 -11
- pyedb/dotnet/database/nets.py +1 -1
- pyedb/dotnet/database/padstack.py +72 -1
- pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
- pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
- pyedb/dotnet/database/siwave.py +19 -5
- pyedb/dotnet/database/stackup.py +80 -137
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +1 -1
- pyedb/dotnet/database/utilities/simulation_setup.py +1 -1
- pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +894 -0
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +15 -0
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +58 -45
- pyedb/generic/design_types.py +39 -1
- pyedb/generic/grpc_warnings.py +5 -0
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +155 -98
- pyedb/grpc/database/control_file.py +240 -193
- pyedb/grpc/database/definition/materials.py +23 -30
- pyedb/grpc/database/definition/package_def.py +15 -15
- pyedb/grpc/database/definition/padstack_def.py +51 -51
- pyedb/grpc/database/definitions.py +7 -5
- pyedb/grpc/database/geometry/arc_data.py +7 -5
- pyedb/grpc/database/geometry/point_3d_data.py +8 -7
- pyedb/grpc/database/geometry/polygon_data.py +3 -2
- pyedb/grpc/database/hierarchy/component.py +43 -38
- pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
- pyedb/grpc/database/hierarchy/pingroup.py +9 -9
- pyedb/grpc/database/layers/stackup_layer.py +45 -44
- pyedb/grpc/database/layout/layout.py +9 -8
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +13 -12
- pyedb/grpc/database/modeler.py +156 -131
- pyedb/grpc/database/nets.py +42 -31
- pyedb/grpc/database/padstacks.py +270 -175
- pyedb/grpc/database/ports/ports.py +5 -6
- pyedb/grpc/database/primitive/bondwire.py +8 -7
- pyedb/grpc/database/primitive/circle.py +4 -4
- pyedb/grpc/database/primitive/padstack_instance.py +18 -18
- pyedb/grpc/database/primitive/path.py +7 -7
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +13 -17
- pyedb/grpc/database/primitive/rectangle.py +13 -13
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
- pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +961 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +44 -24
- pyedb/grpc/database/source_excitations.py +333 -229
- pyedb/grpc/database/stackup.py +164 -147
- pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
- pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
- pyedb/grpc/database/terminal/point_terminal.py +4 -3
- pyedb/grpc/database/terminal/terminal.py +9 -9
- pyedb/grpc/database/utility/value.py +109 -0
- pyedb/grpc/edb.py +129 -45
- pyedb/grpc/edb_init.py +0 -7
- pyedb/siwave_core/cpa/simulation_setup_data_model.py +132 -0
- pyedb/siwave_core/product_properties.py +198 -0
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +15 -13
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +97 -89
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +1 -1
- {pyedb-0.52.0.dist-info → pyedb-0.54.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -280,6 +280,21 @@ class SiwaveSimulationSetup(SimulationSetup):
|
|
|
280
280
|
"""List of frequency sweeps."""
|
|
281
281
|
return {i.name: i for i in self._siwave_sweeps_list}
|
|
282
282
|
|
|
283
|
+
@property
|
|
284
|
+
def dc_settings(self):
|
|
285
|
+
"""SIwave DC setting."""
|
|
286
|
+
return DCSettings(self)
|
|
287
|
+
|
|
288
|
+
@property
|
|
289
|
+
def dc_advanced_settings(self):
|
|
290
|
+
"""Siwave DC advanced settings.
|
|
291
|
+
|
|
292
|
+
Returns
|
|
293
|
+
-------
|
|
294
|
+
:class:`pyedb.dotnet.database.edb_data.siwave_simulation_setup_data.SiwaveDCAdvancedSettings`
|
|
295
|
+
"""
|
|
296
|
+
return DCAdvancedSettings(self)
|
|
297
|
+
|
|
283
298
|
|
|
284
299
|
class SiwaveDCSimulationSetup(SimulationSetup):
|
|
285
300
|
"""Manages EDB methods for SIwave DC simulation setup."""
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Value(float):
|
|
25
|
+
"""Class defining Edb Value properties."""
|
|
26
|
+
|
|
27
|
+
def __new__(cls, pedb, edb_obj):
|
|
28
|
+
temp = super().__new__(cls, float(round(edb_obj.ToDouble(), 9)))
|
|
29
|
+
temp._pedb = pedb
|
|
30
|
+
temp._edb_obj = edb_obj
|
|
31
|
+
return temp
|
|
32
|
+
|
|
33
|
+
def __str__(self):
|
|
34
|
+
"""Returns the string of the variable.
|
|
35
|
+
|
|
36
|
+
Returns
|
|
37
|
+
-------
|
|
38
|
+
str
|
|
39
|
+
"""
|
|
40
|
+
return self._edb_obj.ToString()
|
|
41
|
+
|
|
42
|
+
def __add__(self, other):
|
|
43
|
+
"""Adds two Edb Values."""
|
|
44
|
+
edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})+({str(other)})")
|
|
45
|
+
return self.__class__(self._pedb, edb_object)
|
|
46
|
+
|
|
47
|
+
def __radd__(self, other):
|
|
48
|
+
edb_object = self._pedb.core.utility.value(f"({str(other)})+({self._edb_obj.ToString()})")
|
|
49
|
+
return self.__class__(self._pedb, edb_object)
|
|
50
|
+
|
|
51
|
+
def __sub__(self, other):
|
|
52
|
+
"""Subtracts two Edb Values."""
|
|
53
|
+
edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})-({str(other)})")
|
|
54
|
+
return self.__class__(self._pedb, edb_object)
|
|
55
|
+
|
|
56
|
+
def __rsub__(self, other):
|
|
57
|
+
edb_object = self._pedb.core.utility.value(f"({str(other)})-({self._edb_obj.ToString()})")
|
|
58
|
+
return self.__class__(self._pedb, edb_object)
|
|
59
|
+
|
|
60
|
+
def __mul__(self, other):
|
|
61
|
+
"""Multiplies two Edb Values."""
|
|
62
|
+
edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})*({str(other)})")
|
|
63
|
+
return self.__class__(self._pedb, edb_object)
|
|
64
|
+
|
|
65
|
+
def __rmul__(self, other):
|
|
66
|
+
edb_object = self._pedb.core.utility.value(f"({str(other)})*({self._edb_obj.ToString()})")
|
|
67
|
+
return self.__class__(self._pedb, edb_object)
|
|
68
|
+
|
|
69
|
+
def __truediv__(self, other):
|
|
70
|
+
"""Divides two Edb Values."""
|
|
71
|
+
edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})/({str(other)})")
|
|
72
|
+
return self.__class__(self._pedb, edb_object)
|
|
73
|
+
|
|
74
|
+
def __rtruediv__(self, other):
|
|
75
|
+
edb_object = self._pedb.core.utility.value(f"({str(other)})/({self._edb_obj.ToString()})")
|
|
76
|
+
return self.__class__(self._pedb, edb_object)
|
|
77
|
+
|
|
78
|
+
def sqrt(self):
|
|
79
|
+
"""Square root of the value."""
|
|
80
|
+
edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})**0.5")
|
|
81
|
+
return self.__class__(self._pedb, edb_object)
|
|
82
|
+
|
|
83
|
+
def log10(self):
|
|
84
|
+
"""Base-10 logarithm of the value."""
|
|
85
|
+
edb_object = self._pedb.core.utility.value(f"log10({self._edb_obj.ToString()})")
|
|
86
|
+
return self.__class__(self._pedb, edb_object)
|
|
87
|
+
|
|
88
|
+
def sin(self):
|
|
89
|
+
"""Sine of the value."""
|
|
90
|
+
edb_object = self._pedb.core.utility.value(f"sin({self._edb_obj.ToString()})")
|
|
91
|
+
return self.__class__(self._pedb, edb_object)
|
|
92
|
+
|
|
93
|
+
def cos(self):
|
|
94
|
+
"""Cosine of the value."""
|
|
95
|
+
edb_object = self._pedb.core.utility.value(f"cos({self._edb_obj.ToString()})")
|
|
96
|
+
return self.__class__(self._pedb, edb_object)
|
|
97
|
+
|
|
98
|
+
def asin(self):
|
|
99
|
+
"""Arcsine of the value."""
|
|
100
|
+
edb_object = self._pedb.core.utility.value(f"asin({self._edb_obj.ToString()})")
|
|
101
|
+
return self.__class__(self._pedb, edb_object)
|
|
102
|
+
|
|
103
|
+
def acos(self):
|
|
104
|
+
"""Arccosine of the value."""
|
|
105
|
+
edb_object = self._pedb.core.utility.value(f"acos({self._edb_obj.ToString()})")
|
|
106
|
+
return self.__class__(self._pedb, edb_object)
|
|
107
|
+
|
|
108
|
+
def tan(self):
|
|
109
|
+
"""Tangent of the value."""
|
|
110
|
+
edb_object = self._pedb.core.utility.value(f"tan({self._edb_obj.ToString()})")
|
|
111
|
+
return self.__class__(self._pedb, edb_object)
|
|
112
|
+
|
|
113
|
+
def atan(self):
|
|
114
|
+
"""Arctangent of the value."""
|
|
115
|
+
edb_object = self._pedb.core.utility.value(f"atan({self._edb_obj.ToString()})")
|
|
116
|
+
return self.__class__(self._pedb, edb_object)
|
pyedb/dotnet/edb.py
CHANGED
|
@@ -92,6 +92,7 @@ from pyedb.dotnet.database.utilities.siwave_simulation_setup import (
|
|
|
92
92
|
SiwaveDCSimulationSetup,
|
|
93
93
|
SiwaveSimulationSetup,
|
|
94
94
|
)
|
|
95
|
+
from pyedb.dotnet.database.utilities.value import Value
|
|
95
96
|
from pyedb.edb_logger import pyedb_logger
|
|
96
97
|
from pyedb.generic.constants import AEDT_UNITS, SolverType, unit_converter
|
|
97
98
|
from pyedb.generic.general_methods import (
|
|
@@ -104,6 +105,7 @@ from pyedb.generic.process import SiwaveSolve
|
|
|
104
105
|
from pyedb.generic.settings import settings
|
|
105
106
|
from pyedb.ipc2581.ipc2581 import Ipc2581
|
|
106
107
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
108
|
+
from pyedb.siwave_core.product_properties import SIwaveProperties
|
|
107
109
|
from pyedb.workflow import Workflow
|
|
108
110
|
|
|
109
111
|
|
|
@@ -397,8 +399,14 @@ class Edb(Database):
|
|
|
397
399
|
|
|
398
400
|
@property
|
|
399
401
|
def pedb_class(self):
|
|
400
|
-
|
|
401
|
-
|
|
402
|
+
return pyedb.dotnet
|
|
403
|
+
|
|
404
|
+
def value(self, val):
|
|
405
|
+
"""Convert a value into a pyedb value."""
|
|
406
|
+
if isinstance(val, self._edb.Utility.Value):
|
|
407
|
+
return Value(self, val)
|
|
408
|
+
else:
|
|
409
|
+
return Value(self, self.core.utility.value(val))
|
|
402
410
|
|
|
403
411
|
@property
|
|
404
412
|
def grpc(self):
|
|
@@ -620,9 +628,7 @@ class Edb(Database):
|
|
|
620
628
|
return None
|
|
621
629
|
if not self.cellname:
|
|
622
630
|
self.cellname = generate_unique_name("Cell")
|
|
623
|
-
self._active_cell = self.
|
|
624
|
-
self.active_db, self.edb_api.cell.CellType.CircuitCell, self.cellname
|
|
625
|
-
)
|
|
631
|
+
self._active_cell = self.core.cell.create(self.active_db, self.core.cell.CellType.CircuitCell, self.cellname)
|
|
626
632
|
if self._active_cell:
|
|
627
633
|
self._init_objects()
|
|
628
634
|
return True
|
|
@@ -1366,7 +1372,7 @@ class Edb(Database):
|
|
|
1366
1372
|
Instance of `Edb.Utility.Value`
|
|
1367
1373
|
|
|
1368
1374
|
"""
|
|
1369
|
-
return self.
|
|
1375
|
+
return self.core.utility.value(val)
|
|
1370
1376
|
|
|
1371
1377
|
def point_3d(self, x, y, z=0.0):
|
|
1372
1378
|
"""Compute the Edb 3d Point Data.
|
|
@@ -1384,7 +1390,7 @@ class Edb(Database):
|
|
|
1384
1390
|
-------
|
|
1385
1391
|
``Geometry.Point3DData``.
|
|
1386
1392
|
"""
|
|
1387
|
-
return self.
|
|
1393
|
+
return self.core.geometry.point3d_data(x, y, z)
|
|
1388
1394
|
|
|
1389
1395
|
def point_data(self, x, y=None):
|
|
1390
1396
|
"""Compute the Edb Point Data.
|
|
@@ -1402,9 +1408,9 @@ class Edb(Database):
|
|
|
1402
1408
|
``Geometry.PointData``.
|
|
1403
1409
|
"""
|
|
1404
1410
|
if y is None:
|
|
1405
|
-
return self.
|
|
1411
|
+
return self.core.geometry.point_data(x)
|
|
1406
1412
|
else:
|
|
1407
|
-
return self.
|
|
1413
|
+
return self.core.geometry.point_data(x, y)
|
|
1408
1414
|
|
|
1409
1415
|
def _is_file_existing_and_released(self, filename):
|
|
1410
1416
|
if os.path.exists(filename):
|
|
@@ -1468,7 +1474,7 @@ class Edb(Database):
|
|
|
1468
1474
|
warnings.warn("Use new property :func:`close` instead.", DeprecationWarning)
|
|
1469
1475
|
return self.close()
|
|
1470
1476
|
|
|
1471
|
-
def close(self):
|
|
1477
|
+
def close(self, **kwargs):
|
|
1472
1478
|
"""Close EDB and cleanup variables.
|
|
1473
1479
|
|
|
1474
1480
|
Returns
|
|
@@ -1589,7 +1595,7 @@ class Edb(Database):
|
|
|
1589
1595
|
``True`` when successful, ``False`` when failed.
|
|
1590
1596
|
|
|
1591
1597
|
"""
|
|
1592
|
-
return self.
|
|
1598
|
+
return self.core.utility.utility.Command.Execute(func)
|
|
1593
1599
|
|
|
1594
1600
|
def import_cadence_file(self, inputBrd, WorkDir=None, anstranslator_full_path="", use_ppe=False):
|
|
1595
1601
|
"""Import a board file and generate an ``edb.def`` file in the working directory.
|
|
@@ -1638,7 +1644,7 @@ class Edb(Database):
|
|
|
1638
1644
|
):
|
|
1639
1645
|
if extent_type in [
|
|
1640
1646
|
"Conforming",
|
|
1641
|
-
self.
|
|
1647
|
+
self.core.geometry.extent_type.Conforming,
|
|
1642
1648
|
1,
|
|
1643
1649
|
]:
|
|
1644
1650
|
if use_pyaedt_extent:
|
|
@@ -1656,7 +1662,7 @@ class Edb(Database):
|
|
|
1656
1662
|
else:
|
|
1657
1663
|
_poly = self.layout.expanded_extent(
|
|
1658
1664
|
net_signals,
|
|
1659
|
-
self.
|
|
1665
|
+
self.core.geometry.extent_type.Conforming,
|
|
1660
1666
|
expansion_size,
|
|
1661
1667
|
False,
|
|
1662
1668
|
use_round_corner,
|
|
@@ -1664,12 +1670,12 @@ class Edb(Database):
|
|
|
1664
1670
|
)
|
|
1665
1671
|
elif extent_type in [
|
|
1666
1672
|
"Bounding",
|
|
1667
|
-
self.
|
|
1673
|
+
self.core.geometry.extent_type.BoundingBox,
|
|
1668
1674
|
0,
|
|
1669
1675
|
]:
|
|
1670
1676
|
_poly = self.layout.expanded_extent(
|
|
1671
1677
|
net_signals,
|
|
1672
|
-
self.
|
|
1678
|
+
self.core.geometry.extent_type.BoundingBox,
|
|
1673
1679
|
expansion_size,
|
|
1674
1680
|
False,
|
|
1675
1681
|
use_round_corner,
|
|
@@ -1690,14 +1696,14 @@ class Edb(Database):
|
|
|
1690
1696
|
else:
|
|
1691
1697
|
_poly = self.layout.expanded_extent(
|
|
1692
1698
|
net_signals,
|
|
1693
|
-
self.
|
|
1699
|
+
self.core.geometry.extent_type.Conforming,
|
|
1694
1700
|
expansion_size,
|
|
1695
1701
|
False,
|
|
1696
1702
|
use_round_corner,
|
|
1697
1703
|
1,
|
|
1698
1704
|
)
|
|
1699
1705
|
_poly_list = convert_py_list_to_net_list([_poly])
|
|
1700
|
-
_poly = self.
|
|
1706
|
+
_poly = self.core.geometry.polygon_data.get_convex_hull_of_polygons(_poly_list)
|
|
1701
1707
|
return _poly
|
|
1702
1708
|
|
|
1703
1709
|
def _create_conformal(
|
|
@@ -1772,7 +1778,7 @@ class Edb(Database):
|
|
|
1772
1778
|
pass
|
|
1773
1779
|
finally:
|
|
1774
1780
|
unite_polys.extend(list(obj_data))
|
|
1775
|
-
_poly_unite = self.
|
|
1781
|
+
_poly_unite = self.core.geometry.polygon_data.unite(unite_polys)
|
|
1776
1782
|
if len(_poly_unite) == 1:
|
|
1777
1783
|
self.logger.info("Correctly computed Extension at first iteration.")
|
|
1778
1784
|
return _poly_unite[0]
|
|
@@ -1797,20 +1803,20 @@ class Edb(Database):
|
|
|
1797
1803
|
pd = term._edb_object.GetParameters()[1]
|
|
1798
1804
|
locations.append([pd.X.ToDouble(), pd.Y.ToDouble()])
|
|
1799
1805
|
for point in locations:
|
|
1800
|
-
pointA = self.
|
|
1806
|
+
pointA = self.core.geometry.point_data(
|
|
1801
1807
|
self.edb_value(point[0] - expansion_size),
|
|
1802
1808
|
self.edb_value(point[1] - expansion_size),
|
|
1803
1809
|
)
|
|
1804
|
-
pointB = self.
|
|
1810
|
+
pointB = self.core.geometry.point_data(
|
|
1805
1811
|
self.edb_value(point[0] + expansion_size),
|
|
1806
1812
|
self.edb_value(point[1] + expansion_size),
|
|
1807
1813
|
)
|
|
1808
1814
|
|
|
1809
1815
|
points = Tuple[
|
|
1810
|
-
self.
|
|
1811
|
-
self.
|
|
1816
|
+
self.core.geometry.geometry.PointData,
|
|
1817
|
+
self.core.geometry.geometry.PointData,
|
|
1812
1818
|
](pointA, pointB)
|
|
1813
|
-
_polys.append(self.
|
|
1819
|
+
_polys.append(self.core.geometry.polygon_data.create_from_bbox(points))
|
|
1814
1820
|
return _polys
|
|
1815
1821
|
|
|
1816
1822
|
def _create_convex_hull(
|
|
@@ -1843,7 +1849,7 @@ class Edb(Database):
|
|
|
1843
1849
|
if smart_cut:
|
|
1844
1850
|
objs_data = self._smart_cut(reference_list, expansion_size)
|
|
1845
1851
|
_polys.extend(objs_data)
|
|
1846
|
-
_poly = self.
|
|
1852
|
+
_poly = self.core.geometry.polygon_data.get_convex_hull_of_polygons(convert_py_list_to_net_list(_polys))
|
|
1847
1853
|
_poly = _poly.Expand(expansion_size, tolerance, round_corner, round_extension)[0]
|
|
1848
1854
|
return _poly
|
|
1849
1855
|
|
|
@@ -1978,8 +1984,8 @@ class Edb(Database):
|
|
|
1978
1984
|
>>> edb.logger.info("Total legacy cutout time in min %s", end_time)
|
|
1979
1985
|
>>> edb.nets.plot(signal_list, None, color_by_net=True)
|
|
1980
1986
|
>>> edb.nets.plot(power_list, None, color_by_net=True)
|
|
1981
|
-
>>> edb.
|
|
1982
|
-
>>> edb.
|
|
1987
|
+
>>> edb.save()
|
|
1988
|
+
>>> edb.close()
|
|
1983
1989
|
|
|
1984
1990
|
|
|
1985
1991
|
"""
|
|
@@ -2051,12 +2057,12 @@ class Edb(Database):
|
|
|
2051
2057
|
)
|
|
2052
2058
|
if self.are_port_reference_terminals_connected():
|
|
2053
2059
|
if output_aedb_path:
|
|
2054
|
-
self.
|
|
2060
|
+
self.save_as(output_aedb_path)
|
|
2055
2061
|
else:
|
|
2056
|
-
self.
|
|
2062
|
+
self.save_as(legacy_path)
|
|
2057
2063
|
working_cutout = True
|
|
2058
2064
|
break
|
|
2059
|
-
self.
|
|
2065
|
+
self.close()
|
|
2060
2066
|
self.edbpath = legacy_path
|
|
2061
2067
|
self.open_edb()
|
|
2062
2068
|
i += 1
|
|
@@ -2091,8 +2097,8 @@ class Edb(Database):
|
|
|
2091
2097
|
inlcude_voids_in_extents=include_voids_in_extents,
|
|
2092
2098
|
)
|
|
2093
2099
|
if result and not open_cutout_at_end and self.edbpath != legacy_path:
|
|
2094
|
-
self.
|
|
2095
|
-
self.
|
|
2100
|
+
self.save()
|
|
2101
|
+
self.close()
|
|
2096
2102
|
self.edbpath = legacy_path
|
|
2097
2103
|
self.open_edb()
|
|
2098
2104
|
return result
|
|
@@ -2416,7 +2422,7 @@ class Edb(Database):
|
|
|
2416
2422
|
pins_to_preserve=pins_to_preserve,
|
|
2417
2423
|
inlcude_voids_in_extents=inlcude_voids_in_extents,
|
|
2418
2424
|
)
|
|
2419
|
-
if extent_type in ["Conforming", self.
|
|
2425
|
+
if extent_type in ["Conforming", self.core.geometry.extent_type.Conforming, 1]:
|
|
2420
2426
|
if extent_defeature > 0:
|
|
2421
2427
|
_poly = _poly.Defeature(extent_defeature)
|
|
2422
2428
|
_poly1 = _poly.CreateFromArcs(_poly.GetArcData(), True)
|
|
@@ -2681,14 +2687,10 @@ class Edb(Database):
|
|
|
2681
2687
|
via.pin.Delete()
|
|
2682
2688
|
if netlist:
|
|
2683
2689
|
nets = [net.net_obj for net in temp_edb.layout.nets if net.name in netlist]
|
|
2684
|
-
_poly = temp_edb.layout.expanded_extent(
|
|
2685
|
-
nets, self.edb_api.geometry.extent_type.Conforming, 0.0, True, True, 1
|
|
2686
|
-
)
|
|
2690
|
+
_poly = temp_edb.layout.expanded_extent(nets, self.core.geometry.extent_type.Conforming, 0.0, True, True, 1)
|
|
2687
2691
|
else:
|
|
2688
2692
|
nets = [net.api_object for net in temp_edb.layout.nets if "gnd" in net.name.lower()]
|
|
2689
|
-
_poly = temp_edb.layout.expanded_extent(
|
|
2690
|
-
nets, self.edb_api.geometry.extent_type.Conforming, 0.0, True, True, 1
|
|
2691
|
-
)
|
|
2693
|
+
_poly = temp_edb.layout.expanded_extent(nets, self.core.geometry.extent_type.Conforming, 0.0, True, True, 1)
|
|
2692
2694
|
temp_edb.close_edb()
|
|
2693
2695
|
if _poly:
|
|
2694
2696
|
return _poly
|
|
@@ -2789,9 +2791,7 @@ class Edb(Database):
|
|
|
2789
2791
|
p_missing = [i for i in pinstance_to_add if i.id not in ids]
|
|
2790
2792
|
self.logger.info("Added {} padstack instances after cutout".format(len(p_missing)))
|
|
2791
2793
|
for p in p_missing:
|
|
2792
|
-
position = self.
|
|
2793
|
-
self.edb_value(p.position[0]), self.edb_value(p.position[1])
|
|
2794
|
-
)
|
|
2794
|
+
position = self.core.geometry.point_data(self.edb_value(p.position[0]), self.edb_value(p.position[1]))
|
|
2795
2795
|
net = self.nets.find_or_create_net(p.net_name)
|
|
2796
2796
|
rotation = self.edb_value(p.rotation)
|
|
2797
2797
|
sign_layers = list(self.stackup.signal_layers.keys())
|
|
@@ -2808,7 +2808,7 @@ class Edb(Database):
|
|
|
2808
2808
|
for pad in list(self.padstacks.definitions.keys()):
|
|
2809
2809
|
if pad == p.padstack_definition:
|
|
2810
2810
|
padstack = self.padstacks.definitions[pad].edb_padstack
|
|
2811
|
-
padstack_instance = self.
|
|
2811
|
+
padstack_instance = self.core.cell.primitive.padstack_instance.create(
|
|
2812
2812
|
_cutout.GetLayout(),
|
|
2813
2813
|
net,
|
|
2814
2814
|
p.name,
|
|
@@ -2831,7 +2831,7 @@ class Edb(Database):
|
|
|
2831
2831
|
center_y,
|
|
2832
2832
|
radius,
|
|
2833
2833
|
) = void_circle.primitive_object.GetParameters(0.0, 0.0, 0.0)
|
|
2834
|
-
cloned_circle = self.
|
|
2834
|
+
cloned_circle = self.core.cell.primitive.circle.create(
|
|
2835
2835
|
layout,
|
|
2836
2836
|
void_circle.layer_name,
|
|
2837
2837
|
void_circle.net,
|
|
@@ -2841,7 +2841,7 @@ class Edb(Database):
|
|
|
2841
2841
|
)
|
|
2842
2842
|
cloned_circle.SetIsNegative(True)
|
|
2843
2843
|
elif void_circle.type == "Polygon":
|
|
2844
|
-
cloned_polygon = self.
|
|
2844
|
+
cloned_polygon = self.core.cell.primitive.polygon.create(
|
|
2845
2845
|
layout,
|
|
2846
2846
|
void_circle.layer_name,
|
|
2847
2847
|
void_circle.net,
|
|
@@ -3458,7 +3458,7 @@ class Edb(Database):
|
|
|
3458
3458
|
self.logger.info("Cutout processed.")
|
|
3459
3459
|
old_cell = self.active_cell.FindByName(
|
|
3460
3460
|
self.db,
|
|
3461
|
-
self.
|
|
3461
|
+
self.core.cell.CellType.CircuitCell,
|
|
3462
3462
|
old_cell_name,
|
|
3463
3463
|
)
|
|
3464
3464
|
if old_cell:
|
|
@@ -3696,6 +3696,7 @@ class Edb(Database):
|
|
|
3696
3696
|
Dict[str, :class:`legacy.database.edb_data.siwave_simulation_setup_data.SiwaveSYZSimulationSetup`]
|
|
3697
3697
|
|
|
3698
3698
|
"""
|
|
3699
|
+
|
|
3699
3700
|
setups = {}
|
|
3700
3701
|
for i in list(self.active_cell.SimulationSetups):
|
|
3701
3702
|
if i.GetType().ToString().endswith("kHFSS"):
|
|
@@ -3708,6 +3709,18 @@ class Edb(Database):
|
|
|
3708
3709
|
setups[i.GetName()] = RaptorXSimulationSetup(self, i)
|
|
3709
3710
|
elif i.GetType().ToString().endswith("kHFSSPI"):
|
|
3710
3711
|
setups[i.GetName()] = HFSSPISimulationSetup(self, i)
|
|
3712
|
+
try:
|
|
3713
|
+
cpa_setup_name = self.active_cell.GetProductProperty(
|
|
3714
|
+
self._edb.ProductId.SIWave, SIwaveProperties.CPA_SIM_NAME
|
|
3715
|
+
)[-1]
|
|
3716
|
+
except:
|
|
3717
|
+
cpa_setup_name = ""
|
|
3718
|
+
if cpa_setup_name:
|
|
3719
|
+
from pyedb.dotnet.database.utilities.siwave_cpa_simulation_setup import (
|
|
3720
|
+
SIWaveCPASimulationSetup,
|
|
3721
|
+
)
|
|
3722
|
+
|
|
3723
|
+
setups[cpa_setup_name] = SIWaveCPASimulationSetup(self, cpa_setup_name)
|
|
3711
3724
|
return setups
|
|
3712
3725
|
|
|
3713
3726
|
@property
|
pyedb/generic/design_types.py
CHANGED
|
@@ -19,6 +19,30 @@
|
|
|
19
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
|
+
from typing import TYPE_CHECKING, Literal, Union, overload
|
|
23
|
+
import warnings
|
|
24
|
+
|
|
25
|
+
from pyedb.generic.grpc_warnings import GRPC_GENERAL_WARNING
|
|
26
|
+
from pyedb.misc.misc import list_installed_ansysem
|
|
27
|
+
|
|
28
|
+
if TYPE_CHECKING:
|
|
29
|
+
from pyedb.dotnet.edb import Edb as EdbDotnet
|
|
30
|
+
from pyedb.grpc.edb import Edb as EdbGrpc
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@overload
|
|
34
|
+
def Edb(*, grpc: Literal[True], **kwargs) -> "EdbGrpc":
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@overload
|
|
39
|
+
def Edb(*, grpc: Literal[False] = False, **kwargs) -> "EdbDotnet":
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@overload
|
|
44
|
+
def Edb(*, grpc: bool, **kwargs) -> Union["EdbGrpc", "EdbDotnet"]:
|
|
45
|
+
...
|
|
22
46
|
|
|
23
47
|
|
|
24
48
|
# lazy imports
|
|
@@ -234,7 +258,21 @@ def Edb(
|
|
|
234
258
|
|
|
235
259
|
"""
|
|
236
260
|
|
|
261
|
+
if not edbversion: # pragma: no cover
|
|
262
|
+
try:
|
|
263
|
+
version = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
264
|
+
except IndexError:
|
|
265
|
+
raise Exception("No ANSYSEM_ROOTxxx is found.")
|
|
266
|
+
else:
|
|
267
|
+
version = edbversion
|
|
268
|
+
|
|
237
269
|
# Use EDB legacy (default choice)
|
|
270
|
+
if float(version) >= 2025.2:
|
|
271
|
+
if not grpc:
|
|
272
|
+
warnings.warn(GRPC_GENERAL_WARNING, UserWarning)
|
|
273
|
+
else:
|
|
274
|
+
if grpc:
|
|
275
|
+
raise ValueError(f"gRPC flag was enabled however your ANSYS AEDT version {version} is not compatible")
|
|
238
276
|
if grpc:
|
|
239
277
|
from pyedb.grpc.edb import Edb as app
|
|
240
278
|
else:
|
|
@@ -243,7 +281,7 @@ def Edb(
|
|
|
243
281
|
edbpath=edbpath,
|
|
244
282
|
cellname=cellname,
|
|
245
283
|
isreadonly=isreadonly,
|
|
246
|
-
edbversion=
|
|
284
|
+
edbversion=version,
|
|
247
285
|
isaedtowned=isaedtowned,
|
|
248
286
|
oproject=oproject,
|
|
249
287
|
student_version=student_version,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
GRPC_GENERAL_WARNING = (
|
|
2
|
+
"Your ANSYS AEDT version is eligible to gRPC version."
|
|
3
|
+
"You might consider switching to that version for better user experience."
|
|
4
|
+
"For more information please check this link: https://edb.docs.pyansys.com/version/dev/grpc_api/index.html"
|
|
5
|
+
)
|
pyedb/grpc/__init__.py
ADDED
|
File without changes
|