pyedb 0.53.0__py3-none-any.whl → 0.55.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 -8
- pyedb/configuration/cfg_boundaries.py +69 -151
- pyedb/configuration/cfg_components.py +201 -460
- pyedb/configuration/cfg_data.py +4 -2
- pyedb/configuration/cfg_general.py +13 -36
- pyedb/configuration/cfg_modeler.py +2 -1
- pyedb/configuration/cfg_nets.py +21 -35
- pyedb/configuration/cfg_operations.py +22 -151
- pyedb/configuration/cfg_package_definition.py +56 -112
- pyedb/configuration/cfg_padstacks.py +292 -688
- pyedb/configuration/cfg_pin_groups.py +32 -79
- pyedb/configuration/cfg_ports_sources.py +20 -9
- pyedb/configuration/cfg_s_parameter_models.py +67 -172
- pyedb/configuration/cfg_setup.py +102 -295
- pyedb/configuration/configuration.py +66 -6
- pyedb/dotnet/database/cell/connectable.py +38 -9
- pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/database/cell/layout.py +64 -3
- pyedb/dotnet/database/cell/layout_obj.py +3 -3
- pyedb/dotnet/database/cell/primitive/path.py +6 -8
- pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
- pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
- pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
- 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 +26 -28
- pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
- pyedb/dotnet/database/components.py +99 -91
- pyedb/dotnet/database/definition/component_def.py +4 -4
- pyedb/dotnet/database/definition/component_model.py +1 -1
- pyedb/dotnet/database/definition/package_def.py +2 -3
- pyedb/dotnet/database/dotnet/database.py +27 -218
- pyedb/dotnet/database/dotnet/primitive.py +16 -16
- pyedb/dotnet/database/edb_data/control_file.py +5 -5
- pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
- pyedb/dotnet/database/edb_data/layer_data.py +35 -35
- pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
- pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/database/edb_data/sources.py +6 -6
- pyedb/dotnet/database/edb_data/variables.py +8 -4
- pyedb/dotnet/database/geometry/point_data.py +14 -10
- pyedb/dotnet/database/geometry/polygon_data.py +3 -5
- pyedb/dotnet/database/hfss.py +50 -52
- pyedb/dotnet/database/layout_validation.py +14 -11
- pyedb/dotnet/database/materials.py +10 -11
- pyedb/dotnet/database/modeler.py +104 -101
- pyedb/dotnet/database/nets.py +20 -23
- pyedb/dotnet/database/padstack.py +156 -84
- 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 +47 -47
- pyedb/dotnet/database/stackup.py +152 -87
- pyedb/dotnet/database/utilities/heatsink.py +4 -4
- pyedb/dotnet/database/utilities/obj_base.py +3 -3
- pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
- pyedb/dotnet/database/utilities/value.py +116 -0
- pyedb/dotnet/edb.py +248 -170
- pyedb/edb_logger.py +12 -27
- pyedb/extensions/via_design_backend.py +6 -3
- pyedb/generic/design_types.py +68 -21
- pyedb/generic/general_methods.py +0 -120
- pyedb/generic/process.py +44 -108
- pyedb/generic/settings.py +75 -19
- pyedb/grpc/__init__.py +0 -0
- pyedb/grpc/database/components.py +55 -17
- pyedb/grpc/database/control_file.py +5 -5
- pyedb/grpc/database/definition/materials.py +24 -31
- pyedb/grpc/database/definition/package_def.py +18 -18
- pyedb/grpc/database/definition/padstack_def.py +104 -51
- 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 +4 -3
- 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 +17 -13
- pyedb/grpc/database/layout/voltage_regulator.py +7 -7
- pyedb/grpc/database/layout_validation.py +16 -15
- pyedb/grpc/database/modeler.py +60 -58
- pyedb/grpc/database/net/net.py +15 -14
- pyedb/grpc/database/nets.py +112 -31
- pyedb/grpc/database/padstacks.py +303 -190
- 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 +191 -23
- 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_simulation_setup.py +17 -1
- pyedb/grpc/database/siwave.py +31 -25
- pyedb/grpc/database/source_excitations.py +335 -233
- pyedb/grpc/database/stackup.py +165 -148
- pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
- pyedb/grpc/database/terminal/edge_terminal.py +10 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
- pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
- 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/database/utility/xml_control_file.py +5 -5
- pyedb/grpc/edb.py +130 -63
- pyedb/grpc/edb_init.py +3 -10
- pyedb/grpc/rpc_session.py +10 -10
- pyedb/libraries/common.py +366 -0
- pyedb/libraries/rf_libraries/base_functions.py +1358 -0
- pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
- pyedb/misc/decorators.py +61 -0
- pyedb/misc/misc.py +0 -13
- pyedb/siwave.py +2 -2
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
- {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -20,14 +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.utility.value import Value as GrpcValue
|
|
24
|
-
|
|
25
23
|
from pyedb.dotnet.database.cell.terminal.terminal import Terminal
|
|
26
24
|
from pyedb.grpc.database.terminal.bundle_terminal import BundleTerminal
|
|
27
25
|
from pyedb.grpc.database.terminal.edge_terminal import EdgeTerminal
|
|
28
26
|
from pyedb.grpc.database.terminal.padstack_instance_terminal import (
|
|
29
27
|
PadstackInstanceTerminal,
|
|
30
28
|
)
|
|
29
|
+
from pyedb.grpc.database.utility.value import Value
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
class GapPort(EdgeTerminal):
|
|
@@ -60,7 +59,7 @@ class GapPort(EdgeTerminal):
|
|
|
60
59
|
float
|
|
61
60
|
Magnitude value.
|
|
62
61
|
"""
|
|
63
|
-
return self._edb_object.source_amplitude.
|
|
62
|
+
return Value(self._edb_object.source_amplitude, self._pedb.active_cell)
|
|
64
63
|
|
|
65
64
|
@property
|
|
66
65
|
def phase(self) -> float:
|
|
@@ -71,7 +70,7 @@ class GapPort(EdgeTerminal):
|
|
|
71
70
|
float
|
|
72
71
|
Phase value.
|
|
73
72
|
"""
|
|
74
|
-
return self._edb_object.source_phase.
|
|
73
|
+
return Value(self._edb_object.source_phase, self._pedb.active_cell)
|
|
75
74
|
|
|
76
75
|
@property
|
|
77
76
|
def renormalize(self) -> bool:
|
|
@@ -236,12 +235,12 @@ class WavePort(EdgeTerminal):
|
|
|
236
235
|
float
|
|
237
236
|
deembed value.
|
|
238
237
|
"""
|
|
239
|
-
return self._edb_object.port_post_processing_prop.deembed_length.
|
|
238
|
+
return Value(self._edb_object.port_post_processing_prop.deembed_length, self._pedb.active_cell)
|
|
240
239
|
|
|
241
240
|
@deembed_length.setter
|
|
242
241
|
def deembed_length(self, value):
|
|
243
242
|
p = self._edb_object.port_post_processing_prop
|
|
244
|
-
p.deembed_length =
|
|
243
|
+
p.deembed_length = Value(value)
|
|
245
244
|
self._edb_object.port_post_processing_prop = p
|
|
246
245
|
|
|
247
246
|
|
|
@@ -25,7 +25,8 @@ from ansys.edb.core.primitive.bondwire import (
|
|
|
25
25
|
)
|
|
26
26
|
from ansys.edb.core.primitive.bondwire import Bondwire as GrpcBondWire
|
|
27
27
|
from ansys.edb.core.primitive.bondwire import BondwireType as GrpcBondWireType
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
from pyedb.grpc.database.utility.value import Value
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
class Bondwire(GrpcBondWire):
|
|
@@ -113,11 +114,11 @@ class Bondwire(GrpcBondWire):
|
|
|
113
114
|
float
|
|
114
115
|
Cross section height.
|
|
115
116
|
"""
|
|
116
|
-
return super().cross_section_height
|
|
117
|
+
return Value(super().cross_section_height)
|
|
117
118
|
|
|
118
119
|
@cross_section_height.setter
|
|
119
120
|
def cross_section_height(self, cross_section_height):
|
|
120
|
-
super(Bondwire, self.__class__).cross_section_height.__set__(self,
|
|
121
|
+
super(Bondwire, self.__class__).cross_section_height.__set__(self, Value(cross_section_height))
|
|
121
122
|
|
|
122
123
|
# @property
|
|
123
124
|
# def trajectory(self):
|
|
@@ -134,11 +135,11 @@ class Bondwire(GrpcBondWire):
|
|
|
134
135
|
# **x1** : X value of the end point.
|
|
135
136
|
# **y1** : Y value of the end point.
|
|
136
137
|
# """
|
|
137
|
-
# return [i
|
|
138
|
+
# return [Value(i) for i in self.get_traj()]
|
|
138
139
|
#
|
|
139
140
|
# @trajectory.setter
|
|
140
141
|
# def trajectory(self, value):
|
|
141
|
-
# values = [
|
|
142
|
+
# values = [Value(i) for i in value]
|
|
142
143
|
# self.set_traj(values[0], values[1], values[2], values[3])
|
|
143
144
|
|
|
144
145
|
@property
|
|
@@ -150,11 +151,11 @@ class Bondwire(GrpcBondWire):
|
|
|
150
151
|
float
|
|
151
152
|
Width value.
|
|
152
153
|
"""
|
|
153
|
-
return super().width
|
|
154
|
+
return Value(super().width)
|
|
154
155
|
|
|
155
156
|
@width.setter
|
|
156
157
|
def width(self, width):
|
|
157
|
-
super(Bondwire, self.__class__).width.__set__(self,
|
|
158
|
+
super(Bondwire, self.__class__).width.__set__(self, Value(width))
|
|
158
159
|
|
|
159
160
|
# @property
|
|
160
161
|
# def start_elevation(self):
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
from ansys.edb.core.primitive.circle import Circle as GrpcCircle
|
|
25
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
26
25
|
|
|
27
26
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
27
|
+
from pyedb.grpc.database.utility.value import Value
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class Circle(GrpcCircle, Primitive):
|
|
@@ -33,7 +33,7 @@ class Circle(GrpcCircle, Primitive):
|
|
|
33
33
|
Primitive.__init__(self, pedb, edb_object)
|
|
34
34
|
self._pedb = pedb
|
|
35
35
|
|
|
36
|
-
def get_parameters(self):
|
|
36
|
+
def get_parameters(self) -> tuple[float, float, float]:
|
|
37
37
|
"""Returns parameters.
|
|
38
38
|
|
|
39
39
|
Returns
|
|
@@ -57,7 +57,7 @@ class Circle(GrpcCircle, Primitive):
|
|
|
57
57
|
|
|
58
58
|
"""
|
|
59
59
|
params = super().get_parameters()
|
|
60
|
-
return params[0]
|
|
60
|
+
return Value(params[0]), Value(params[1]), Value(params[2])
|
|
61
61
|
|
|
62
62
|
def set_parameters(self, center_x, center_y, radius):
|
|
63
63
|
"""Set parameters.
|
|
@@ -72,4 +72,4 @@ class Circle(GrpcCircle, Primitive):
|
|
|
72
72
|
Circle radius.
|
|
73
73
|
|
|
74
74
|
"""
|
|
75
|
-
super().set_parameters(
|
|
75
|
+
super().set_parameters(Value(center_x), Value(center_y), Value(radius))
|
|
@@ -22,23 +22,28 @@
|
|
|
22
22
|
|
|
23
23
|
import math
|
|
24
24
|
import re
|
|
25
|
+
import warnings
|
|
25
26
|
|
|
26
27
|
from ansys.edb.core.database import ProductIdType as GrpcProductIdType
|
|
27
28
|
from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
28
29
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
29
30
|
from ansys.edb.core.hierarchy.pin_group import PinGroup as GrpcPinGroup
|
|
31
|
+
from ansys.edb.core.hierarchy.structure3d import MeshClosure as GrpcMeshClosure
|
|
32
|
+
from ansys.edb.core.hierarchy.structure3d import Structure3D as GrpcStructure3D
|
|
30
33
|
from ansys.edb.core.primitive.padstack_instance import (
|
|
31
34
|
PadstackInstance as GrpcPadstackInstance,
|
|
32
35
|
)
|
|
33
36
|
from ansys.edb.core.terminal.pin_group_terminal import (
|
|
34
37
|
PinGroupTerminal as GrpcPinGroupTerminal,
|
|
35
38
|
)
|
|
36
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
37
39
|
|
|
40
|
+
from pyedb.generic.general_methods import generate_unique_name
|
|
38
41
|
from pyedb.grpc.database.definition.padstack_def import PadstackDef
|
|
42
|
+
from pyedb.grpc.database.modeler import Circle
|
|
39
43
|
from pyedb.grpc.database.terminal.padstack_instance_terminal import (
|
|
40
44
|
PadstackInstanceTerminal,
|
|
41
45
|
)
|
|
46
|
+
from pyedb.grpc.database.utility.value import Value
|
|
42
47
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
43
48
|
|
|
44
49
|
|
|
@@ -67,6 +72,16 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
67
72
|
self._pedb = pedb
|
|
68
73
|
self._object_instance = None
|
|
69
74
|
|
|
75
|
+
@property
|
|
76
|
+
def is_pin(self):
|
|
77
|
+
"""Property added for backward compatibility with earlier versions of pyEDB."""
|
|
78
|
+
return self.is_layout_pin
|
|
79
|
+
|
|
80
|
+
@is_pin.setter
|
|
81
|
+
def is_pin(self, value):
|
|
82
|
+
"""Property added for backward compatibility with earlier versions of pyEDB."""
|
|
83
|
+
self.is_layout_pin = value
|
|
84
|
+
|
|
70
85
|
@property
|
|
71
86
|
def definition(self) -> PadstackDef:
|
|
72
87
|
"""Padstack definition.
|
|
@@ -108,6 +123,77 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
108
123
|
term = PadstackInstanceTerminal(self._pedb, term)
|
|
109
124
|
return term if not term.is_null else None
|
|
110
125
|
|
|
126
|
+
def set_backdrill_top(self, drill_depth, drill_diameter, offset=0.0):
|
|
127
|
+
"""Set backdrill from top.
|
|
128
|
+
|
|
129
|
+
.deprecated:: 0.55.0
|
|
130
|
+
Use :method:`set_back_drill_by_depth` instead.
|
|
131
|
+
|
|
132
|
+
Parameters
|
|
133
|
+
----------
|
|
134
|
+
drill_depth : str
|
|
135
|
+
Name of the drill to layer.
|
|
136
|
+
drill_diameter : float, str
|
|
137
|
+
Diameter of backdrill size.
|
|
138
|
+
offset : str, optional.
|
|
139
|
+
offset with respect to the layer to drill to.
|
|
140
|
+
|
|
141
|
+
Returns
|
|
142
|
+
-------
|
|
143
|
+
bool
|
|
144
|
+
True if success, False otherwise.
|
|
145
|
+
"""
|
|
146
|
+
warnings.warn(
|
|
147
|
+
"`set_backdrill_top` is deprecated. Use `set_back_drill_by_depth` or " "`set_back_drill_by_layer` instead.",
|
|
148
|
+
DeprecationWarning,
|
|
149
|
+
)
|
|
150
|
+
if isinstance(drill_depth, str):
|
|
151
|
+
if drill_depth in self._pedb.stackup.layers:
|
|
152
|
+
return self.set_back_drill_by_layer(
|
|
153
|
+
drill_to_layer=self._pedb.stackup.layers[drill_depth],
|
|
154
|
+
offset=Value(offset),
|
|
155
|
+
diameter=Value(drill_diameter),
|
|
156
|
+
from_bottom=False,
|
|
157
|
+
)
|
|
158
|
+
else:
|
|
159
|
+
return self.set_back_drill_by_depth(Value(drill_depth), Value(drill_diameter), from_bottom=False)
|
|
160
|
+
|
|
161
|
+
def set_backdrill_bottom(self, drill_depth, drill_diameter, offset=0.0):
|
|
162
|
+
"""Set backdrill from bottom.
|
|
163
|
+
|
|
164
|
+
.deprecated: 0.55.0
|
|
165
|
+
Use: method:`set_back_drill_by_depth` instead.
|
|
166
|
+
|
|
167
|
+
Parameters
|
|
168
|
+
----------
|
|
169
|
+
drill_depth : str
|
|
170
|
+
Name of the drill to layer.
|
|
171
|
+
drill_diameter : float, str
|
|
172
|
+
Diameter of backdrill size.
|
|
173
|
+
offset : str, optional.
|
|
174
|
+
offset with respect to the layer to drill to.
|
|
175
|
+
|
|
176
|
+
Returns
|
|
177
|
+
-------
|
|
178
|
+
bool
|
|
179
|
+
True if success, False otherwise.
|
|
180
|
+
"""
|
|
181
|
+
warnings.warn(
|
|
182
|
+
"`set_backdrill_bottom` is deprecated. Use `set_back_drill_by_depth` or "
|
|
183
|
+
"`set_back_drill_by_layer` instead.",
|
|
184
|
+
DeprecationWarning,
|
|
185
|
+
)
|
|
186
|
+
if isinstance(drill_depth, str):
|
|
187
|
+
if drill_depth in self._pedb.stackup.layers:
|
|
188
|
+
return self.set_back_drill_by_layer(
|
|
189
|
+
drill_to_layer=self._pedb.stackup.layers[drill_depth],
|
|
190
|
+
offset=Value(offset),
|
|
191
|
+
diameter=Value(drill_diameter),
|
|
192
|
+
from_bottom=True,
|
|
193
|
+
)
|
|
194
|
+
else:
|
|
195
|
+
return self.set_back_drill_by_depth(Value(drill_depth), Value(drill_diameter), from_bottom=True)
|
|
196
|
+
|
|
111
197
|
def create_terminal(self, name=None) -> PadstackInstanceTerminal:
|
|
112
198
|
"""Create a padstack instance terminal.
|
|
113
199
|
|
|
@@ -266,7 +352,7 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
266
352
|
@_em_properties.setter
|
|
267
353
|
def _em_properties(self, em_prop):
|
|
268
354
|
"""Set EM properties"""
|
|
269
|
-
pid = self._pedb.
|
|
355
|
+
pid = self._pedb.core.ProductId.Designer
|
|
270
356
|
self.set_product_property(pid, 18, em_prop)
|
|
271
357
|
|
|
272
358
|
@property
|
|
@@ -500,25 +586,28 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
500
586
|
list
|
|
501
587
|
List of ``[x, y]`` coordinates for the padstack instance position.
|
|
502
588
|
"""
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
589
|
+
try:
|
|
590
|
+
position = self.get_position_and_rotation()
|
|
591
|
+
if self.component:
|
|
592
|
+
out2 = self.component.transform.transform_point(GrpcPointData(position[:2]))
|
|
593
|
+
self._position = [Value(out2[0]), Value(out2[1])]
|
|
594
|
+
else:
|
|
595
|
+
self._position = [Value(pt) for pt in position[:2]]
|
|
596
|
+
return self._position
|
|
597
|
+
except Exception:
|
|
598
|
+
return False
|
|
510
599
|
|
|
511
600
|
@position.setter
|
|
512
601
|
def position(self, value):
|
|
513
602
|
pos = []
|
|
514
603
|
for v in value:
|
|
515
604
|
if isinstance(v, (float, int, str)):
|
|
516
|
-
pos.append(
|
|
605
|
+
pos.append(Value(v, self._pedb.active_cell))
|
|
517
606
|
else:
|
|
518
607
|
pos.append(v)
|
|
519
608
|
point_data = GrpcPointData(pos[0], pos[1])
|
|
520
609
|
self.set_position_and_rotation(
|
|
521
|
-
x=point_data.x, y=point_data.y, rotation=
|
|
610
|
+
x=point_data.x, y=point_data.y, rotation=Value(self.rotation, self._pedb.active_cell)
|
|
522
611
|
)
|
|
523
612
|
|
|
524
613
|
@property
|
|
@@ -530,7 +619,7 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
530
619
|
float
|
|
531
620
|
Rotatation value for the padstack instance.
|
|
532
621
|
"""
|
|
533
|
-
return self.get_position_and_rotation()[-1]
|
|
622
|
+
return Value(self.get_position_and_rotation()[-1])
|
|
534
623
|
|
|
535
624
|
@property
|
|
536
625
|
def name(self) -> str:
|
|
@@ -684,6 +773,85 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
684
773
|
def side_number(self, value):
|
|
685
774
|
self._side_number = self.set_product_property(GrpcProductIdType.HFSS_3D_LAYOUT, 21, value)
|
|
686
775
|
|
|
776
|
+
def split(self) -> list:
|
|
777
|
+
"""Split padstack instance into multiple instances. The new instances only connect adjacent layers."""
|
|
778
|
+
pdef_name = self.padstack_definition
|
|
779
|
+
position = self.position
|
|
780
|
+
net_name = self.net_name
|
|
781
|
+
name = self.name
|
|
782
|
+
stackup_layer_range = list(self._pedb.stackup.signal_layers.keys())
|
|
783
|
+
start_idx = stackup_layer_range.index(self.start_layer)
|
|
784
|
+
stop_idx = stackup_layer_range.index(self.stop_layer)
|
|
785
|
+
temp = []
|
|
786
|
+
for idx, (l1, l2) in enumerate(
|
|
787
|
+
list(zip(stackup_layer_range[start_idx:stop_idx], stackup_layer_range[start_idx + 1 : stop_idx + 1]))
|
|
788
|
+
):
|
|
789
|
+
pd_inst = self._pedb.padstacks.place(
|
|
790
|
+
position, pdef_name, net_name, f"{name}_{idx}", fromlayer=l1, tolayer=l2
|
|
791
|
+
)
|
|
792
|
+
temp.append(pd_inst)
|
|
793
|
+
self.delete()
|
|
794
|
+
return temp
|
|
795
|
+
|
|
796
|
+
def convert_hole_to_conical_shape(self, angle=75):
|
|
797
|
+
"""Convert actual padstack instance to microvias 3D Objects with a given aspect ratio.
|
|
798
|
+
|
|
799
|
+
Parameters
|
|
800
|
+
----------
|
|
801
|
+
angle : float, optional
|
|
802
|
+
Angle of laser penetration in degrees. The angle defines the lowest hole diameter with this formula:
|
|
803
|
+
HoleDiameter -2*tan(laser_angle* Hole depth). Hole depth is the height of the via (dielectric thickness).
|
|
804
|
+
The default is ``75``.
|
|
805
|
+
The lowest hole is ``0.75*HoleDepth/HoleDiam``.
|
|
806
|
+
|
|
807
|
+
Returns
|
|
808
|
+
-------
|
|
809
|
+
"""
|
|
810
|
+
stackup_layers = self._pedb.stackup.stackup_layers
|
|
811
|
+
signal_layers = self._pedb.stackup.signal_layers
|
|
812
|
+
layer_idx = list(signal_layers.keys()).index(self.start_layer)
|
|
813
|
+
|
|
814
|
+
_layer_idx = list(stackup_layers.keys()).index(self.start_layer)
|
|
815
|
+
diel_layer_idx = list(stackup_layers.keys())[_layer_idx + 1]
|
|
816
|
+
diel_thickness = stackup_layers[diel_layer_idx].thickness
|
|
817
|
+
|
|
818
|
+
rad_large = self.definition.hole_diameter / 2
|
|
819
|
+
rad_small = rad_large - diel_thickness * 1 / math.tan(math.radians(angle))
|
|
820
|
+
|
|
821
|
+
if layer_idx + 1 < len(signal_layers) / 2: # upper half of stack
|
|
822
|
+
rad_u = rad_large
|
|
823
|
+
rad_l = rad_small
|
|
824
|
+
else:
|
|
825
|
+
rad_u = rad_small
|
|
826
|
+
rad_l = rad_large
|
|
827
|
+
|
|
828
|
+
layout = self._pedb.active_layout
|
|
829
|
+
cloned_circle = Circle.create(
|
|
830
|
+
layout,
|
|
831
|
+
self.start_layer,
|
|
832
|
+
self.net,
|
|
833
|
+
Value(self.position[0]),
|
|
834
|
+
Value(self.position[1]),
|
|
835
|
+
Value(rad_u),
|
|
836
|
+
)
|
|
837
|
+
cloned_circle2 = Circle.create(
|
|
838
|
+
layout,
|
|
839
|
+
self.stop_layer,
|
|
840
|
+
self.net,
|
|
841
|
+
Value(self.position[0]),
|
|
842
|
+
Value(self.position[1]),
|
|
843
|
+
Value(rad_l),
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
s3d = GrpcStructure3D.create(layout, generate_unique_name("via3d_" + self.aedt_name.replace("via_", ""), n=3))
|
|
847
|
+
s3d.add_member(cloned_circle)
|
|
848
|
+
s3d.add_member(cloned_circle2)
|
|
849
|
+
s3d.set_material(self.definition.material)
|
|
850
|
+
s3d.mesh_closure = GrpcMeshClosure.ENDS_CLOSED
|
|
851
|
+
hole_override_enabled = True
|
|
852
|
+
hole_override_diam = 0
|
|
853
|
+
self.set_hole_overrides(hole_override_enabled, Value(hole_override_diam))
|
|
854
|
+
|
|
687
855
|
def get_backdrill_type(self, from_bottom=True):
|
|
688
856
|
"""Return backdrill type
|
|
689
857
|
Parameters
|
|
@@ -714,8 +882,8 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
714
882
|
"""
|
|
715
883
|
back_drill = super().get_back_drill_by_layer(from_bottom)
|
|
716
884
|
layer = back_drill[0].name
|
|
717
|
-
offset =
|
|
718
|
-
diameter =
|
|
885
|
+
offset = Value(back_drill[1])
|
|
886
|
+
diameter = Value(back_drill[2])
|
|
719
887
|
return layer, offset, diameter
|
|
720
888
|
|
|
721
889
|
def get_back_drill_by_depth(self, from_bottom=True) -> tuple[float, float]:
|
|
@@ -730,8 +898,8 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
730
898
|
tuple (drill_depth, drill_diameter) (float, float)
|
|
731
899
|
"""
|
|
732
900
|
back_drill = super().get_back_drill_by_depth(from_bottom)
|
|
733
|
-
drill_depth = back_drill[0]
|
|
734
|
-
drill_diameter = back_drill[1]
|
|
901
|
+
drill_depth = Value(back_drill[0])
|
|
902
|
+
drill_diameter = Value(back_drill[1])
|
|
735
903
|
return drill_depth, drill_diameter
|
|
736
904
|
|
|
737
905
|
def set_back_drill_by_depth(self, drill_depth, diameter, from_bottom=True):
|
|
@@ -747,7 +915,7 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
747
915
|
Default value is `True`.
|
|
748
916
|
"""
|
|
749
917
|
super().set_back_drill_by_depth(
|
|
750
|
-
drill_depth=
|
|
918
|
+
drill_depth=Value(drill_depth), diameter=Value(diameter), from_bottom=from_bottom
|
|
751
919
|
)
|
|
752
920
|
|
|
753
921
|
def set_back_drill_by_layer(self, drill_to_layer, offset, diameter, from_bottom=True):
|
|
@@ -768,8 +936,8 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
768
936
|
drill_to_layer = self._pedb.stackup.layers[drill_to_layer]
|
|
769
937
|
super().set_back_drill_by_layer(
|
|
770
938
|
drill_to_layer=drill_to_layer,
|
|
771
|
-
offset=
|
|
772
|
-
diameter=
|
|
939
|
+
offset=Value(offset),
|
|
940
|
+
diameter=Value(diameter),
|
|
773
941
|
from_bottom=from_bottom,
|
|
774
942
|
)
|
|
775
943
|
|
|
@@ -812,8 +980,8 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
812
980
|
List[:class:`PadstackInstance <pyedb.grpc.database.primitive.padstack_instance.PadstackInstance>`]
|
|
813
981
|
List of the voids that include this padstack instance.
|
|
814
982
|
"""
|
|
815
|
-
x_pos =
|
|
816
|
-
y_pos =
|
|
983
|
+
x_pos = Value(self.position[0])
|
|
984
|
+
y_pos = Value(self.position[1])
|
|
817
985
|
point_data = GrpcPointData([x_pos, y_pos])
|
|
818
986
|
|
|
819
987
|
voids = []
|
|
@@ -1068,7 +1236,7 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
1068
1236
|
if point.is_arc:
|
|
1069
1237
|
continue
|
|
1070
1238
|
else:
|
|
1071
|
-
points.append([point.x
|
|
1239
|
+
points.append([Value(point.x), Value(point.y)])
|
|
1072
1240
|
xpoly, ypoly = zip(*points)
|
|
1073
1241
|
polygon = [list(xpoly), list(ypoly)]
|
|
1074
1242
|
rectangles = GeometryOperators.find_largest_rectangle_inside_polygon(
|
|
@@ -1086,7 +1254,7 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
1086
1254
|
for point in path.points:
|
|
1087
1255
|
if self.component:
|
|
1088
1256
|
p_transf = self.component.transform.transform_point(point)
|
|
1089
|
-
new_rect.append([p_transf.x
|
|
1257
|
+
new_rect.append([Value(p_transf.x), Value(p_transf.y)])
|
|
1090
1258
|
if return_points:
|
|
1091
1259
|
return new_rect
|
|
1092
1260
|
else:
|
|
@@ -24,9 +24,9 @@ import math
|
|
|
24
24
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
25
25
|
from ansys.edb.core.primitive.path import Path as GrpcPath
|
|
26
26
|
from ansys.edb.core.primitive.path import PathCornerType as GrpcPatCornerType
|
|
27
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
28
27
|
|
|
29
28
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
29
|
+
from pyedb.grpc.database.utility.value import Value
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class Path(GrpcPath, Primitive):
|
|
@@ -45,11 +45,11 @@ class Path(GrpcPath, Primitive):
|
|
|
45
45
|
float
|
|
46
46
|
Path width or None.
|
|
47
47
|
"""
|
|
48
|
-
return
|
|
48
|
+
return Value(super().width)
|
|
49
49
|
|
|
50
50
|
@width.setter
|
|
51
51
|
def width(self, value):
|
|
52
|
-
super(Path, self.__class__).width.__set__(self,
|
|
52
|
+
super(Path, self.__class__).width.__set__(self, Value(value))
|
|
53
53
|
|
|
54
54
|
@property
|
|
55
55
|
def length(self) -> float:
|
|
@@ -119,7 +119,7 @@ class Path(GrpcPath, Primitive):
|
|
|
119
119
|
layout=self._pedb.active_layout,
|
|
120
120
|
layer=self.layer,
|
|
121
121
|
net=self.net,
|
|
122
|
-
width=
|
|
122
|
+
width=Value(self.width),
|
|
123
123
|
end_cap1=self.get_end_cap_style()[0],
|
|
124
124
|
end_cap2=self.get_end_cap_style()[1],
|
|
125
125
|
corner_style=mapping[self.corner_style],
|
|
@@ -289,8 +289,8 @@ class Path(GrpcPath, Primitive):
|
|
|
289
289
|
rightline.append(rightPt)
|
|
290
290
|
return leftline, rightline
|
|
291
291
|
|
|
292
|
-
distance =
|
|
293
|
-
gap =
|
|
292
|
+
distance = Value(distance)
|
|
293
|
+
gap = Value(gap)
|
|
294
294
|
center_line = self.center_line
|
|
295
295
|
leftline, rightline = get_parallet_lines(center_line, distance)
|
|
296
296
|
for x, y in get_locations(rightline, gap) + get_locations(leftline, gap):
|
|
@@ -315,7 +315,7 @@ class Path(GrpcPath, Primitive):
|
|
|
315
315
|
List[List[float, float]].
|
|
316
316
|
|
|
317
317
|
"""
|
|
318
|
-
return [[pt.x
|
|
318
|
+
return [[Value(pt.x), Value(pt.y)] for pt in super().center_line.points]
|
|
319
319
|
|
|
320
320
|
# def set_center_line(self, value):
|
|
321
321
|
# if isinstance(value, list):
|
|
@@ -26,9 +26,9 @@ import math
|
|
|
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
28
|
from ansys.edb.core.primitive.polygon import Polygon as GrpcPolygon
|
|
29
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
30
29
|
|
|
31
30
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
31
|
+
from pyedb.grpc.database.utility.value import Value
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class Polygon(GrpcPolygon, Primitive):
|
|
@@ -147,7 +147,7 @@ class Polygon(GrpcPolygon, Primitive):
|
|
|
147
147
|
>>> polygon.move(vector=["2mm", "100um"])
|
|
148
148
|
"""
|
|
149
149
|
if vector and isinstance(vector, list) and len(vector) == 2:
|
|
150
|
-
_vector = [
|
|
150
|
+
_vector = [Value(pt) for pt in vector]
|
|
151
151
|
self.polygon_data = self.polygon_data.move(_vector)
|
|
152
152
|
return True
|
|
153
153
|
return False
|
|
@@ -177,7 +177,7 @@ class Polygon(GrpcPolygon, Primitive):
|
|
|
177
177
|
else:
|
|
178
178
|
self._pedb.logger.error(f"Failed to evaluate center on primitive {self.id}")
|
|
179
179
|
elif isinstance(center, list) and len(center) == 2:
|
|
180
|
-
center = GrpcPointData([
|
|
180
|
+
center = GrpcPointData([Value(center[0]), Value(center[1])])
|
|
181
181
|
self.polygon_data = self.polygon_data.scale(factor, center)
|
|
182
182
|
return True
|
|
183
183
|
return False
|
|
@@ -25,6 +25,7 @@ from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
|
25
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
|
+
from pyedb.grpc.database.utility.value import Value
|
|
28
29
|
from pyedb.misc.utilities import compute_arc_points
|
|
29
30
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
30
31
|
|
|
@@ -202,15 +203,15 @@ class Primitive(GrpcPrimitive):
|
|
|
202
203
|
y = []
|
|
203
204
|
for i, point in enumerate(my_net_points):
|
|
204
205
|
if not point.is_arc:
|
|
205
|
-
x.append(point.x
|
|
206
|
-
y.append(point.y
|
|
206
|
+
x.append(Value(point.x))
|
|
207
|
+
y.append(Value(point.y))
|
|
207
208
|
else:
|
|
208
|
-
arc_h = point.arc_height
|
|
209
|
-
p1 = [my_net_points[i - 1].x
|
|
209
|
+
arc_h = Value(point.arc_height)
|
|
210
|
+
p1 = [Value(my_net_points[i - 1].x), Value(my_net_points[i - 1].y)]
|
|
210
211
|
if i + 1 < len(my_net_points):
|
|
211
|
-
p2 = [my_net_points[i + 1].x
|
|
212
|
+
p2 = [Value(my_net_points[i + 1].x), Value(my_net_points[i + 1].y)]
|
|
212
213
|
else:
|
|
213
|
-
p2 = [my_net_points[0].x
|
|
214
|
+
p2 = [Value(my_net_points[0].x), Value(my_net_points[0].y)]
|
|
214
215
|
x_arc, y_arc = compute_arc_points(p1, p2, arc_h, num)
|
|
215
216
|
x.extend(x_arc)
|
|
216
217
|
y.extend(y_arc)
|
|
@@ -228,7 +229,7 @@ class Primitive(GrpcPrimitive):
|
|
|
228
229
|
|
|
229
230
|
"""
|
|
230
231
|
center = self.cast().polygon_data.bounding_circle()[0]
|
|
231
|
-
return [center.x
|
|
232
|
+
return [Value(center.x), Value(center.y)]
|
|
232
233
|
|
|
233
234
|
def get_connected_object_id_set(self) -> list[int]:
|
|
234
235
|
"""Produce a list of all geometries physically connected to a given layout object.
|
|
@@ -253,12 +254,7 @@ class Primitive(GrpcPrimitive):
|
|
|
253
254
|
|
|
254
255
|
"""
|
|
255
256
|
bbox = self.cast().polygon_data.bbox()
|
|
256
|
-
return [
|
|
257
|
-
round(bbox[0].x.value, 6),
|
|
258
|
-
round(bbox[0].y.value, 6),
|
|
259
|
-
round(bbox[1].x.value, 6),
|
|
260
|
-
round(bbox[1].y.value, 6),
|
|
261
|
-
]
|
|
257
|
+
return [Value(bbox[0].x), Value(bbox[0].y), Value(bbox[1].x), Value(bbox[1].y)]
|
|
262
258
|
|
|
263
259
|
def convert_to_polygon(self):
|
|
264
260
|
"""Convert path to polygon.
|
|
@@ -329,7 +325,7 @@ class Primitive(GrpcPrimitive):
|
|
|
329
325
|
point = GrpcPointData(point)
|
|
330
326
|
|
|
331
327
|
p0 = self.cast().polygon_data.closest_point(point)
|
|
332
|
-
return [p0.x
|
|
328
|
+
return [Value(p0.x), Value(p0.y)]
|
|
333
329
|
|
|
334
330
|
@property
|
|
335
331
|
def arcs(self):
|
|
@@ -549,16 +545,16 @@ class Primitive(GrpcPrimitive):
|
|
|
549
545
|
"""
|
|
550
546
|
|
|
551
547
|
if isinstance(point, GrpcPointData):
|
|
552
|
-
point = [point.x
|
|
548
|
+
point = [Value(point.x), Value(point.y)]
|
|
553
549
|
dist = 1e12
|
|
554
550
|
out = None
|
|
555
551
|
for arc in self.arcs:
|
|
556
552
|
mid_point = arc.midpoint
|
|
557
|
-
mid_point = [mid_point.x
|
|
553
|
+
mid_point = [Value(mid_point.x), Value(mid_point.y)]
|
|
558
554
|
if GeometryOperators.points_distance(mid_point, point) < dist:
|
|
559
555
|
out = arc.midpoint
|
|
560
556
|
dist = GeometryOperators.points_distance(mid_point, point)
|
|
561
|
-
return [out.x
|
|
557
|
+
return [Value(out.x), Value(out.y)]
|
|
562
558
|
|
|
563
559
|
@property
|
|
564
560
|
def shortest_arc(self) -> float:
|
|
@@ -25,9 +25,9 @@ from ansys.edb.core.primitive.rectangle import (
|
|
|
25
25
|
RectangleRepresentationType as GrpcRectangleRepresentationType,
|
|
26
26
|
)
|
|
27
27
|
from ansys.edb.core.primitive.rectangle import Rectangle as GrpcRectangle
|
|
28
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
29
28
|
|
|
30
29
|
from pyedb.grpc.database.primitive.primitive import Primitive
|
|
30
|
+
from pyedb.grpc.database.utility.value import Value
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class Rectangle(GrpcRectangle, Primitive):
|
|
@@ -106,12 +106,12 @@ class Rectangle(GrpcRectangle, Primitive):
|
|
|
106
106
|
"""
|
|
107
107
|
parameters = super().get_parameters()
|
|
108
108
|
representation_type = parameters[0].name.lower()
|
|
109
|
-
parameter1 = parameters[1]
|
|
110
|
-
parameter2 = parameters[2]
|
|
111
|
-
parameter3 = parameters[3]
|
|
112
|
-
parameter4 = parameters[4]
|
|
113
|
-
corner_radius = parameters[5]
|
|
114
|
-
rotation = parameters[6]
|
|
109
|
+
parameter1 = Value(parameters[1])
|
|
110
|
+
parameter2 = Value(parameters[2])
|
|
111
|
+
parameter3 = Value(parameters[3])
|
|
112
|
+
parameter4 = Value(parameters[4])
|
|
113
|
+
corner_radius = Value(parameters[5])
|
|
114
|
+
rotation = Value(parameters[6])
|
|
115
115
|
return representation_type, parameter1, parameter2, parameter3, parameter4, corner_radius, rotation
|
|
116
116
|
|
|
117
117
|
def set_parameters(self, rep_type, param1, param2, param3, param4, corner_rad, rotation):
|
|
@@ -137,10 +137,10 @@ class Rectangle(GrpcRectangle, Primitive):
|
|
|
137
137
|
|
|
138
138
|
return super().set_parameters(
|
|
139
139
|
self.representation_type[rep_type],
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
Value(param1),
|
|
141
|
+
Value(param2),
|
|
142
|
+
Value(param3),
|
|
143
|
+
Value(param4),
|
|
144
|
+
Value(corner_rad),
|
|
145
|
+
Value(rotation),
|
|
146
146
|
)
|