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
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
import math
|
|
24
|
+
import warnings
|
|
24
25
|
|
|
25
26
|
from ansys.edb.core.definition.padstack_def import PadstackDef as GrpcPadstackDef
|
|
26
27
|
from ansys.edb.core.definition.padstack_def_data import (
|
|
@@ -35,9 +36,9 @@ from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
|
35
36
|
from ansys.edb.core.hierarchy.structure3d import MeshClosure as GrpcMeshClosure
|
|
36
37
|
from ansys.edb.core.hierarchy.structure3d import Structure3D as GrpcStructure3D
|
|
37
38
|
from ansys.edb.core.primitive.circle import Circle as GrpcCircle
|
|
38
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
39
39
|
|
|
40
40
|
from pyedb.generic.general_methods import generate_unique_name
|
|
41
|
+
from pyedb.grpc.database.utility.value import Value
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
class PadProperties:
|
|
@@ -109,6 +110,26 @@ class PadProperties:
|
|
|
109
110
|
"""
|
|
110
111
|
return self._pad_parameter_value[0].name.split("_")[-1].lower()
|
|
111
112
|
|
|
113
|
+
@shape.setter
|
|
114
|
+
def shape(self, value: str):
|
|
115
|
+
"""Set pad shape.
|
|
116
|
+
|
|
117
|
+
Parameters
|
|
118
|
+
----------
|
|
119
|
+
value : str
|
|
120
|
+
Pad shape.
|
|
121
|
+
"""
|
|
122
|
+
if value.lower() == "circle":
|
|
123
|
+
self._update_pad_parameters_parameters(geom_type=GrpcPadGeometryType.PADGEOMTYPE_CIRCLE)
|
|
124
|
+
elif value.lower() == "rectangle":
|
|
125
|
+
self._update_pad_parameters_parameters(geom_type=GrpcPadGeometryType.PADGEOMTYPE_RECTANGLE)
|
|
126
|
+
elif value.lower() == "polygon":
|
|
127
|
+
self._update_pad_parameters_parameters(geom_type=GrpcPadGeometryType.PADGEOMTYPE_POLYGON)
|
|
128
|
+
else:
|
|
129
|
+
raise ValueError(
|
|
130
|
+
f"Unsupported pad shape: {value}. Supported shapes are 'circle', " f"'rectangle', and 'polygon'."
|
|
131
|
+
)
|
|
132
|
+
|
|
112
133
|
@property
|
|
113
134
|
def parameters_values(self):
|
|
114
135
|
"""Parameters.
|
|
@@ -119,7 +140,7 @@ class PadProperties:
|
|
|
119
140
|
List of parameters.
|
|
120
141
|
"""
|
|
121
142
|
try:
|
|
122
|
-
return [i
|
|
143
|
+
return [Value(i) for i in self._pad_parameter_value[1]]
|
|
123
144
|
except TypeError:
|
|
124
145
|
return []
|
|
125
146
|
|
|
@@ -158,7 +179,7 @@ class PadProperties:
|
|
|
158
179
|
str
|
|
159
180
|
Offset for the X axis.
|
|
160
181
|
"""
|
|
161
|
-
return self._pad_parameter_value[2]
|
|
182
|
+
return Value(self._pad_parameter_value[2])
|
|
162
183
|
|
|
163
184
|
@property
|
|
164
185
|
def offset_y(self) -> float:
|
|
@@ -170,7 +191,7 @@ class PadProperties:
|
|
|
170
191
|
Offset for the Y axis.
|
|
171
192
|
"""
|
|
172
193
|
|
|
173
|
-
return self._pad_parameter_value[3]
|
|
194
|
+
return Value(self._pad_parameter_value[3])
|
|
174
195
|
|
|
175
196
|
@offset_x.setter
|
|
176
197
|
def offset_x(self, value):
|
|
@@ -190,7 +211,7 @@ class PadProperties:
|
|
|
190
211
|
Value for the rotation.
|
|
191
212
|
"""
|
|
192
213
|
|
|
193
|
-
return self._pad_parameter_value[4]
|
|
214
|
+
return Value(self._pad_parameter_value[4])
|
|
194
215
|
|
|
195
216
|
@rotation.setter
|
|
196
217
|
def rotation(self, value):
|
|
@@ -218,27 +239,27 @@ class PadProperties:
|
|
|
218
239
|
if params is None:
|
|
219
240
|
params = self._pad_parameter_value[1]
|
|
220
241
|
elif isinstance(params, list):
|
|
221
|
-
offsetx = [
|
|
242
|
+
offsetx = [Value(i, self._pedbpadstack._pedb.db) for i in params]
|
|
222
243
|
if rotation is None:
|
|
223
244
|
rotation = self._pad_parameter_value[4]
|
|
224
245
|
elif isinstance(rotation, (str, float, int)):
|
|
225
|
-
rotation =
|
|
246
|
+
rotation = Value(rotation, self._pedbpadstack._pedb.db)
|
|
226
247
|
if offsetx is None:
|
|
227
248
|
offsetx = self._pad_parameter_value[2]
|
|
228
249
|
elif isinstance(offsetx, (str, float, int)):
|
|
229
|
-
offsetx =
|
|
250
|
+
offsetx = Value(offsetx, self._pedbpadstack._pedb.db)
|
|
230
251
|
if offsety is None:
|
|
231
252
|
offsety = self._pad_parameter_value[3]
|
|
232
253
|
elif isinstance(offsety, (str, float, int)):
|
|
233
|
-
offsety =
|
|
254
|
+
offsety = Value(offsety, self._pedbpadstack._pedb.db)
|
|
234
255
|
self._edb_padstack.set_pad_parameters(
|
|
235
256
|
layer=layer_name,
|
|
236
257
|
pad_type=pad_type,
|
|
237
258
|
type_geom=geom_type,
|
|
238
|
-
offset_x=
|
|
239
|
-
offset_y=
|
|
240
|
-
rotation=
|
|
241
|
-
sizes=[
|
|
259
|
+
offset_x=Value(offsetx, self._pedbpadstack._pedb.db),
|
|
260
|
+
offset_y=Value(offsety, self._pedbpadstack._pedb.db),
|
|
261
|
+
rotation=Value(rotation, self._pedbpadstack._pedb.db),
|
|
262
|
+
sizes=[Value(i, self._pedbpadstack._pedb.db) for i in params],
|
|
242
263
|
)
|
|
243
264
|
|
|
244
265
|
|
|
@@ -300,6 +321,22 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
300
321
|
"""
|
|
301
322
|
return self.layers[0]
|
|
302
323
|
|
|
324
|
+
@property
|
|
325
|
+
def via_start_layer(self):
|
|
326
|
+
"""Via starting layer.
|
|
327
|
+
|
|
328
|
+
.deprecated
|
|
329
|
+
Use: :method:`start_layer <pyedb.grpc.database.definition.padstack_def.PadstackDef.start_layer>`
|
|
330
|
+
instead.
|
|
331
|
+
|
|
332
|
+
Returns
|
|
333
|
+
-------
|
|
334
|
+
str
|
|
335
|
+
Name of the via starting layer.
|
|
336
|
+
"""
|
|
337
|
+
warnings.warn("via_start_layer is deprecated. Use start_layer instead.", DeprecationWarning)
|
|
338
|
+
return self.start_layer
|
|
339
|
+
|
|
303
340
|
@property
|
|
304
341
|
def stop_layer(self):
|
|
305
342
|
"""Stopping layer.
|
|
@@ -311,6 +348,22 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
311
348
|
"""
|
|
312
349
|
return self.layers[-1]
|
|
313
350
|
|
|
351
|
+
@property
|
|
352
|
+
def via_stop_layer(self):
|
|
353
|
+
"""Via stop layer.
|
|
354
|
+
|
|
355
|
+
.deprecated
|
|
356
|
+
Use :method:`stop_layer <pyedb.grpc.database.definition.padstack_def.PadstackDef.stop_layer>`
|
|
357
|
+
instead.
|
|
358
|
+
|
|
359
|
+
Returns
|
|
360
|
+
-------
|
|
361
|
+
str
|
|
362
|
+
Name of the via stop layer.
|
|
363
|
+
"""
|
|
364
|
+
warnings.warn("via_stop_layer is deprecated. Use stop_layer instead.", DeprecationWarning)
|
|
365
|
+
return self.stop_layer
|
|
366
|
+
|
|
314
367
|
@property
|
|
315
368
|
def hole_diameter(self) -> float:
|
|
316
369
|
"""Hole diameter.
|
|
@@ -324,7 +377,7 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
324
377
|
try:
|
|
325
378
|
hole_parameter = self.data.get_hole_parameters()
|
|
326
379
|
if hole_parameter[0].name.lower() == "padgeomtype_circle":
|
|
327
|
-
return
|
|
380
|
+
return Value(hole_parameter[1][0])
|
|
328
381
|
except:
|
|
329
382
|
return 0.0
|
|
330
383
|
|
|
@@ -332,9 +385,9 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
332
385
|
def hole_diameter(self, value):
|
|
333
386
|
hole_parameter = self.data.get_hole_parameters()
|
|
334
387
|
if not isinstance(value, list):
|
|
335
|
-
value = [
|
|
388
|
+
value = [Value(value)]
|
|
336
389
|
else:
|
|
337
|
-
value = [
|
|
390
|
+
value = [Value(p) for p in value]
|
|
338
391
|
hole_size = value
|
|
339
392
|
geometry_type = hole_parameter[0]
|
|
340
393
|
hole_offset_x = hole_parameter[2]
|
|
@@ -359,7 +412,7 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
359
412
|
hole type.
|
|
360
413
|
|
|
361
414
|
"""
|
|
362
|
-
return self.data.get_hole_parameters()[0]
|
|
415
|
+
return Value(self.data.get_hole_parameters()[0])
|
|
363
416
|
|
|
364
417
|
@property
|
|
365
418
|
def edb_hole_type(self):
|
|
@@ -383,14 +436,14 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
383
436
|
Hole offset value for the X axis.
|
|
384
437
|
"""
|
|
385
438
|
try:
|
|
386
|
-
return
|
|
439
|
+
return Value(self.data.get_hole_parameters()[2])
|
|
387
440
|
except:
|
|
388
441
|
return 0.0
|
|
389
442
|
|
|
390
443
|
@hole_offset_x.setter
|
|
391
444
|
def hole_offset_x(self, value):
|
|
392
445
|
hole_parameter = list(self.data.get_hole_parameters())
|
|
393
|
-
hole_parameter[2] =
|
|
446
|
+
hole_parameter[2] = Value(value, self._pedb.db)
|
|
394
447
|
self.data.set_hole_parameters(
|
|
395
448
|
offset_x=hole_parameter[2],
|
|
396
449
|
offset_y=hole_parameter[3],
|
|
@@ -409,14 +462,14 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
409
462
|
Hole offset value for the Y axis.
|
|
410
463
|
"""
|
|
411
464
|
try:
|
|
412
|
-
return
|
|
465
|
+
return Value(self.data.get_hole_parameters()[3])
|
|
413
466
|
except:
|
|
414
467
|
return 0.0
|
|
415
468
|
|
|
416
469
|
@hole_offset_y.setter
|
|
417
470
|
def hole_offset_y(self, value):
|
|
418
471
|
hole_parameter = list(self.data.get_hole_parameters())
|
|
419
|
-
hole_parameter[3] =
|
|
472
|
+
hole_parameter[3] = Value(value, self._pedb.db)
|
|
420
473
|
self.data.set_hole_parameters(
|
|
421
474
|
offset_x=hole_parameter[2],
|
|
422
475
|
offset_y=hole_parameter[3],
|
|
@@ -435,14 +488,14 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
435
488
|
Value for the hole rotation.
|
|
436
489
|
"""
|
|
437
490
|
try:
|
|
438
|
-
return
|
|
491
|
+
return Value(self.data.get_hole_parameters()[4])
|
|
439
492
|
except:
|
|
440
493
|
return 0.0
|
|
441
494
|
|
|
442
495
|
@hole_rotation.setter
|
|
443
496
|
def hole_rotation(self, value):
|
|
444
497
|
hole_parameter = list(self.data.get_hole_parameters())
|
|
445
|
-
hole_parameter[4] =
|
|
498
|
+
hole_parameter[4] = Value(value, self._pedb.db)
|
|
446
499
|
self.data.set_hole_parameters(
|
|
447
500
|
offset_x=hole_parameter[2],
|
|
448
501
|
offset_y=hole_parameter[3],
|
|
@@ -511,11 +564,11 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
511
564
|
float
|
|
512
565
|
Percentage for the hole plating.
|
|
513
566
|
"""
|
|
514
|
-
return
|
|
567
|
+
return Value(self.data.plating_percentage)
|
|
515
568
|
|
|
516
569
|
@hole_plating_ratio.setter
|
|
517
570
|
def hole_plating_ratio(self, ratio):
|
|
518
|
-
self.data.plating_percentage =
|
|
571
|
+
self.data.plating_percentage = Value(ratio)
|
|
519
572
|
|
|
520
573
|
@property
|
|
521
574
|
def hole_plating_thickness(self) -> float:
|
|
@@ -543,7 +596,7 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
543
596
|
float
|
|
544
597
|
Thickness of the hole plating if present.
|
|
545
598
|
"""
|
|
546
|
-
hr = 200 *
|
|
599
|
+
hr = 200 * Value(value) / self.hole_diameter
|
|
547
600
|
self.hole_plating_ratio = hr
|
|
548
601
|
|
|
549
602
|
@property
|
|
@@ -671,9 +724,9 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
671
724
|
layout,
|
|
672
725
|
self.start_layer,
|
|
673
726
|
via.net,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
727
|
+
Value(pos[0]),
|
|
728
|
+
Value(pos[1]),
|
|
729
|
+
Value(self.pad_by_layer[self.start_layer].parameters_values[0] / 2),
|
|
677
730
|
)
|
|
678
731
|
if len(self.pad_by_layer[self.stop_layer].parameters_values) == 0:
|
|
679
732
|
self._pedb.modeler.create_polygon(
|
|
@@ -686,9 +739,9 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
686
739
|
layout,
|
|
687
740
|
self.stop_layer,
|
|
688
741
|
via.net,
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
742
|
+
Value(pos[0]),
|
|
743
|
+
Value(pos[1]),
|
|
744
|
+
Value(self.pad_by_layer[self.stop_layer].parameters_values[0] / 2),
|
|
692
745
|
)
|
|
693
746
|
for layer_name in layer_names:
|
|
694
747
|
stop = ""
|
|
@@ -699,17 +752,17 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
699
752
|
layout,
|
|
700
753
|
start,
|
|
701
754
|
via.net,
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
755
|
+
Value(pos[0]),
|
|
756
|
+
Value(pos[1]),
|
|
757
|
+
Value(rad1),
|
|
705
758
|
)
|
|
706
759
|
cloned_circle2 = GrpcCircle.create(
|
|
707
760
|
layout,
|
|
708
761
|
stop,
|
|
709
762
|
via.net,
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
763
|
+
Value(pos[0]),
|
|
764
|
+
Value(pos[1]),
|
|
765
|
+
Value(rad2),
|
|
713
766
|
)
|
|
714
767
|
s3d = GrpcStructure3D.create(
|
|
715
768
|
layout, generate_unique_name("via3d_" + via.aedt_name.replace("via_", ""), n=3)
|
|
@@ -771,9 +824,9 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
771
824
|
new_padstack_definition.data.set_pad_parameters(
|
|
772
825
|
layer=layer,
|
|
773
826
|
pad_type=GrpcPadType.REGULAR_PAD,
|
|
774
|
-
offset_x=
|
|
775
|
-
offset_y=
|
|
776
|
-
rotation=
|
|
827
|
+
offset_x=Value(pl.offset_x, self._pedb.db),
|
|
828
|
+
offset_y=Value(pl.offset_y, self._pedb.db),
|
|
829
|
+
rotation=Value(pl.rotation, self._pedb.db),
|
|
777
830
|
type_geom=pl._edb_geometry_type,
|
|
778
831
|
sizes=pl.parameters_values,
|
|
779
832
|
)
|
|
@@ -783,9 +836,9 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
783
836
|
new_padstack_definition.data.set_pad_parameters(
|
|
784
837
|
layer=layer,
|
|
785
838
|
pad_type=GrpcPadType.ANTI_PAD,
|
|
786
|
-
offset_x=
|
|
787
|
-
offset_y=
|
|
788
|
-
rotation=
|
|
839
|
+
offset_x=Value(pl.offset_x, self._pedb.db),
|
|
840
|
+
offset_y=Value(pl.offset_y, self._pedb.db),
|
|
841
|
+
rotation=Value(pl.rotation, self._pedb.db),
|
|
789
842
|
type_geom=pl._edb_geometry_type,
|
|
790
843
|
sizes=pl.parameters_values,
|
|
791
844
|
)
|
|
@@ -795,21 +848,21 @@ class PadstackDef(GrpcPadstackDef):
|
|
|
795
848
|
new_padstack_definition.data.set_pad_parameters(
|
|
796
849
|
layer=layer,
|
|
797
850
|
pad_type=GrpcPadType.THERMAL_PAD,
|
|
798
|
-
offset_x=
|
|
799
|
-
offset_y=
|
|
800
|
-
rotation=
|
|
851
|
+
offset_x=Value(pl.offset_x, self._pedb.db),
|
|
852
|
+
offset_y=Value(pl.offset_y, self._pedb.db),
|
|
853
|
+
rotation=Value(pl.rotation, self._pedb.db),
|
|
801
854
|
type_geom=pl._edb_geometry_type,
|
|
802
855
|
sizes=pl.parameters_values,
|
|
803
856
|
)
|
|
804
857
|
new_padstack_definition.data.set_hole_parameters(
|
|
805
|
-
offset_x=
|
|
806
|
-
offset_y=
|
|
807
|
-
rotation=
|
|
858
|
+
offset_x=Value(self.hole_offset_x, self._pedb.db),
|
|
859
|
+
offset_y=Value(self.hole_offset_y, self._pedb.db),
|
|
860
|
+
rotation=Value(self.hole_rotation, self._pedb.db),
|
|
808
861
|
type_geom=self.edb_hole_type,
|
|
809
862
|
sizes=[self.hole_diameter],
|
|
810
863
|
)
|
|
811
864
|
new_padstack_definition.data.material = self.material
|
|
812
|
-
new_padstack_definition.data.plating_percentage =
|
|
865
|
+
new_padstack_definition.data.plating_percentage = Value(self.hole_plating_ratio, self._pedb.db)
|
|
813
866
|
new_instances.append(PadstackDef(self._pedb, new_padstack_definition))
|
|
814
867
|
started = True
|
|
815
868
|
if self.stop_layer == stop:
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
from ansys.edb.core.geometry.arc_data import ArcData as GrpcArcData
|
|
25
25
|
|
|
26
|
+
from pyedb.grpc.database.utility.value import Value
|
|
27
|
+
|
|
26
28
|
|
|
27
29
|
class ArcData(GrpcArcData):
|
|
28
30
|
"""Class managing ArcData."""
|
|
@@ -42,7 +44,7 @@ class ArcData(GrpcArcData):
|
|
|
42
44
|
[x value, y value]
|
|
43
45
|
|
|
44
46
|
"""
|
|
45
|
-
return [
|
|
47
|
+
return [Value(super().center.x), Value(super().center.y)]
|
|
46
48
|
|
|
47
49
|
@property
|
|
48
50
|
def start(self) -> list[float]:
|
|
@@ -54,7 +56,7 @@ class ArcData(GrpcArcData):
|
|
|
54
56
|
[x value, y value]
|
|
55
57
|
|
|
56
58
|
"""
|
|
57
|
-
return [
|
|
59
|
+
return [Value(super().start.x), Value(super().start.y)]
|
|
58
60
|
|
|
59
61
|
@property
|
|
60
62
|
def end(self) -> list[float]:
|
|
@@ -66,7 +68,7 @@ class ArcData(GrpcArcData):
|
|
|
66
68
|
[x value, y value]
|
|
67
69
|
|
|
68
70
|
"""
|
|
69
|
-
return [self.end.x
|
|
71
|
+
return [Value(self.end.x), Value(self.end.y)]
|
|
70
72
|
|
|
71
73
|
@property
|
|
72
74
|
def mid_point(self) -> list[float]:
|
|
@@ -78,7 +80,7 @@ class ArcData(GrpcArcData):
|
|
|
78
80
|
[x value, y value]
|
|
79
81
|
|
|
80
82
|
"""
|
|
81
|
-
return [self.midpoint.x
|
|
83
|
+
return [Value(self.midpoint.x), Value(self.midpoint.y)]
|
|
82
84
|
|
|
83
85
|
@property
|
|
84
86
|
def points(self) -> list[list[float]]:
|
|
@@ -90,4 +92,4 @@ class ArcData(GrpcArcData):
|
|
|
90
92
|
[[x value, y value]]
|
|
91
93
|
|
|
92
94
|
"""
|
|
93
|
-
return [[pt.x
|
|
95
|
+
return [[Value(pt.x), Value(pt.y)] for pt in self.points]
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from ansys.edb.core.geometry.point3d_data import Point3DData as GrpcPoint3DData
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
from pyedb.grpc.database.utility.value import Value
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
class Point3DData(GrpcPoint3DData):
|
|
@@ -40,11 +41,11 @@ class Point3DData(GrpcPoint3DData):
|
|
|
40
41
|
X position value.
|
|
41
42
|
|
|
42
43
|
"""
|
|
43
|
-
return self.x
|
|
44
|
+
return Value(self.x)
|
|
44
45
|
|
|
45
46
|
@x.setter
|
|
46
47
|
def x(self, value):
|
|
47
|
-
self.x =
|
|
48
|
+
self.x = Value(value)
|
|
48
49
|
|
|
49
50
|
@property
|
|
50
51
|
def y(self) -> float:
|
|
@@ -56,11 +57,11 @@ class Point3DData(GrpcPoint3DData):
|
|
|
56
57
|
Y position value.
|
|
57
58
|
|
|
58
59
|
"""
|
|
59
|
-
return self.y
|
|
60
|
+
return Value(self.y)
|
|
60
61
|
|
|
61
62
|
@y.setter
|
|
62
63
|
def y(self, value):
|
|
63
|
-
self.y =
|
|
64
|
+
self.y = Value(value)
|
|
64
65
|
|
|
65
66
|
@property
|
|
66
67
|
def z(self) -> float:
|
|
@@ -72,8 +73,8 @@ class Point3DData(GrpcPoint3DData):
|
|
|
72
73
|
Z position value.
|
|
73
74
|
|
|
74
75
|
"""
|
|
75
|
-
return self.z
|
|
76
|
+
return Value(self.z)
|
|
76
77
|
|
|
77
78
|
@z.setter
|
|
78
79
|
def z(self, value):
|
|
79
|
-
self.z =
|
|
80
|
+
self.z = Value(value)
|
|
@@ -25,6 +25,7 @@ from ansys.edb.core.geometry.point_data import PointData as GrpcPointData
|
|
|
25
25
|
from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
|
|
26
26
|
|
|
27
27
|
from pyedb.grpc.database.geometry.arc_data import ArcData
|
|
28
|
+
from pyedb.grpc.database.utility.value import Value
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
class PolygonData(GrpcPolygonData):
|
|
@@ -65,7 +66,7 @@ class PolygonData(GrpcPolygonData):
|
|
|
65
66
|
X upper right corner, Y upper right corner].
|
|
66
67
|
"""
|
|
67
68
|
bbox = self.bbox()
|
|
68
|
-
return [bbox[0].x
|
|
69
|
+
return [Value(bbox[0].x), Value(bbox[0].y), Value(bbox[1].x), Value(bbox[1].y)]
|
|
69
70
|
|
|
70
71
|
@property
|
|
71
72
|
def arcs(self) -> list[ArcData]:
|
|
@@ -86,7 +87,7 @@ class PolygonData(GrpcPolygonData):
|
|
|
86
87
|
-------
|
|
87
88
|
list[list[float]]
|
|
88
89
|
"""
|
|
89
|
-
return [[i.x
|
|
90
|
+
return [[Value(i.x), Value(i.y)] for i in list(self.points)]
|
|
90
91
|
|
|
91
92
|
def create_from_points(self, points, closed=True):
|
|
92
93
|
list_of_point_data = []
|
|
@@ -126,7 +127,7 @@ class PolygonData(GrpcPolygonData):
|
|
|
126
127
|
bool
|
|
127
128
|
|
|
128
129
|
"""
|
|
129
|
-
new_poly =
|
|
130
|
+
new_poly = super().expand(offset, tolerance, round_corners, maximum_corner_extension)
|
|
130
131
|
if not new_poly[0].points:
|
|
131
132
|
return False
|
|
132
133
|
self._edb_object = new_poly[0]
|