pyedb 0.50.0__py3-none-any.whl → 0.51.2__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.

Files changed (75) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_ports_sources.py +79 -239
  3. pyedb/configuration/configuration.py +27 -0
  4. pyedb/dotnet/clr_module.py +9 -3
  5. pyedb/dotnet/database/cell/hierarchy/component.py +3 -3
  6. pyedb/dotnet/database/cell/layout.py +10 -1
  7. pyedb/dotnet/database/dotnet/database.py +0 -2
  8. pyedb/dotnet/database/edb_data/padstacks_data.py +13 -0
  9. pyedb/dotnet/database/layout_validation.py +17 -13
  10. pyedb/dotnet/database/modeler.py +0 -1
  11. pyedb/dotnet/edb.py +7 -1
  12. pyedb/generic/design_types.py +183 -62
  13. pyedb/grpc/database/components.py +604 -652
  14. pyedb/grpc/database/control_file.py +597 -155
  15. pyedb/grpc/database/definition/component_def.py +17 -14
  16. pyedb/grpc/database/definition/materials.py +27 -27
  17. pyedb/grpc/database/definition/package_def.py +8 -8
  18. pyedb/grpc/database/definition/padstack_def.py +31 -33
  19. pyedb/grpc/database/definitions.py +36 -2
  20. pyedb/grpc/database/geometry/arc_data.py +5 -5
  21. pyedb/grpc/database/geometry/point_3d_data.py +3 -3
  22. pyedb/grpc/database/geometry/polygon_data.py +5 -5
  23. pyedb/grpc/database/hfss.py +412 -395
  24. pyedb/grpc/database/hierarchy/component.py +67 -58
  25. pyedb/grpc/database/hierarchy/pin_pair_model.py +6 -6
  26. pyedb/grpc/database/hierarchy/pingroup.py +13 -11
  27. pyedb/grpc/database/hierarchy/s_parameter_model.py +1 -1
  28. pyedb/grpc/database/hierarchy/spice_model.py +1 -1
  29. pyedb/grpc/database/layers/layer.py +2 -2
  30. pyedb/grpc/database/layers/stackup_layer.py +26 -23
  31. pyedb/grpc/database/layout/layout.py +12 -12
  32. pyedb/grpc/database/layout/voltage_regulator.py +8 -8
  33. pyedb/grpc/database/layout_validation.py +58 -7
  34. pyedb/grpc/database/modeler.py +248 -245
  35. pyedb/grpc/database/net/differential_pair.py +4 -4
  36. pyedb/grpc/database/net/extended_net.py +7 -8
  37. pyedb/grpc/database/net/net.py +57 -46
  38. pyedb/grpc/database/nets.py +362 -116
  39. pyedb/grpc/database/padstacks.py +259 -178
  40. pyedb/grpc/database/ports/ports.py +23 -17
  41. pyedb/grpc/database/primitive/padstack_instance.py +45 -30
  42. pyedb/grpc/database/primitive/path.py +6 -6
  43. pyedb/grpc/database/primitive/polygon.py +9 -9
  44. pyedb/grpc/database/primitive/primitive.py +21 -21
  45. pyedb/grpc/database/primitive/rectangle.py +1 -1
  46. pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +1 -1
  47. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  48. pyedb/grpc/database/simulation_setup/hfss_settings_options.py +1 -1
  49. pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +6 -6
  50. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +2 -2
  51. pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +2 -2
  52. pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +1 -1
  53. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +3 -3
  54. pyedb/grpc/database/siwave.py +226 -214
  55. pyedb/grpc/database/source_excitations.py +307 -40
  56. pyedb/grpc/database/stackup.py +461 -283
  57. pyedb/grpc/database/terminal/bundle_terminal.py +12 -12
  58. pyedb/grpc/database/terminal/edge_terminal.py +6 -5
  59. pyedb/grpc/database/terminal/padstack_instance_terminal.py +13 -13
  60. pyedb/grpc/database/terminal/pingroup_terminal.py +12 -12
  61. pyedb/grpc/database/terminal/point_terminal.py +6 -6
  62. pyedb/grpc/database/terminal/terminal.py +26 -26
  63. pyedb/grpc/database/utility/heat_sink.py +5 -5
  64. pyedb/grpc/database/utility/hfss_extent_info.py +21 -21
  65. pyedb/grpc/database/utility/layout_statistics.py +13 -13
  66. pyedb/grpc/database/utility/rlc.py +3 -3
  67. pyedb/grpc/database/utility/sources.py +1 -1
  68. pyedb/grpc/database/utility/sweep_data_distribution.py +1 -1
  69. pyedb/grpc/edb.py +542 -739
  70. pyedb/grpc/edb_init.py +50 -3
  71. {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/METADATA +1 -1
  72. {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/RECORD +74 -75
  73. pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
  74. {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/LICENSE +0 -0
  75. {pyedb-0.50.0.dist-info → pyedb-0.51.2.dist-info}/WHEEL +0 -0
@@ -37,66 +37,136 @@ from pyedb.modeler.geometry_operators import GeometryOperators
37
37
 
38
38
 
39
39
  class Hfss(object):
40
- """Manages EDB method to configure Hfss setup accessible from `Edb.hfss` property."""
40
+ """Manages EDB methods for HFSS setup configuration.
41
+
42
+ Provides access to HFSS-specific operations including:
43
+ - Excitation and port creation
44
+ - Source and probe management
45
+ - Simulation setup configuration
46
+ - Boundary condition creation
47
+ - Layout manipulation for simulation
48
+
49
+ Accessed via `Edb.hfss` property.
50
+ """
41
51
 
42
52
  def __init__(self, p_edb):
43
53
  self._pedb = p_edb
44
54
 
45
55
  @property
46
56
  def hfss_extent_info(self) -> HfssExtentInfo:
47
- """HFSS extent information."""
57
+ """HFSS extent information.
58
+
59
+ Returns
60
+ -------
61
+ HfssExtentInfo
62
+ Object containing HFSS extent configuration data.
63
+ """
48
64
  return HfssExtentInfo(self._pedb)
49
65
 
50
66
  @property
51
67
  def _logger(self):
68
+ """Logger instance for message handling.
69
+
70
+ Returns
71
+ -------
72
+ logging.Logger
73
+ Current logger instance.
74
+ """
52
75
  return self._pedb.logger
53
76
 
54
77
  @property
55
78
  def _edb(self):
56
- """EDB object.
79
+ """EDB API object.
57
80
 
58
81
  Returns
59
82
  -------
60
83
  Ansys.Ansoft.Edb
84
+ EDB API instance.
61
85
  """
62
86
  return self._pedb
63
87
 
64
88
  @property
65
89
  def _active_layout(self):
90
+ """Active layout object.
91
+
92
+ Returns
93
+ -------
94
+ Edb.Cell.Layout
95
+ Current active layout.
96
+ """
66
97
  return self._pedb.active_layout
67
98
 
68
99
  @property
69
100
  def _layout(self):
101
+ """Current layout object.
102
+
103
+ Returns
104
+ -------
105
+ Edb.Cell.Layout
106
+ Current layout.
107
+ """
70
108
  return self._pedb.layout
71
109
 
72
110
  @property
73
111
  def _cell(self):
112
+ """Current cell object.
113
+
114
+ Returns
115
+ -------
116
+ Edb.Cell
117
+ Current cell.
118
+ """
74
119
  return self._pedb.cell
75
120
 
76
121
  @property
77
122
  def _db(self):
123
+ """Active database object.
124
+
125
+ Returns
126
+ -------
127
+ Edb.Database
128
+ Active database.
129
+ """
78
130
  return self._pedb.active_db
79
131
 
80
132
  @property
81
133
  def excitations(self):
82
- """Get all excitations."""
134
+ """All excitation definitions in the layout.
135
+
136
+ Returns
137
+ -------
138
+ list
139
+ List of excitation objects.
140
+ """
83
141
  return self._pedb.excitations
84
142
 
85
143
  @property
86
144
  def sources(self):
87
- """Get all sources."""
145
+ """All source definitions in the layout.
146
+
147
+ Returns
148
+ -------
149
+ list
150
+ List of source objects.
151
+ """
88
152
  return self._pedb.sources
89
153
 
90
154
  @property
91
155
  def probes(self):
92
- """Get all probes."""
156
+ """All probe definitions in the layout.
157
+
158
+ Returns
159
+ -------
160
+ list
161
+ List of probe objects.
162
+ """
93
163
  return self._pedb.probes
94
164
 
95
165
  def _create_edge_terminal(self, prim_id, point_on_edge, terminal_name=None, is_ref=False):
96
- """Create an edge terminal.
166
+ """Create an edge terminal (deprecated).
97
167
 
98
- . deprecated:: pyedb 0.28.0
99
- Use :func:`_create_edge_terminal` is move to pyedb.grpc.database.excitations._create_edge_terminal instead.
168
+ .. deprecated:: 0.28.0
169
+ Use :func:`pyedb.grpc.core.excitations._create_edge_terminal` instead.
100
170
 
101
171
  Parameters
102
172
  ----------
@@ -104,17 +174,15 @@ class Hfss(object):
104
174
  Primitive ID.
105
175
  point_on_edge : list
106
176
  Coordinate of the point to define the edge terminal.
107
- The point must be on the target edge but not on the two
108
- ends of the edge.
109
177
  terminal_name : str, optional
110
- Name of the terminal. The default is ``None``, in which case the
111
- default name is assigned.
178
+ Name of the terminal.
112
179
  is_ref : bool, optional
113
- Whether it is a reference terminal. The default is ``False``.
180
+ Whether it is a reference terminal.
114
181
 
115
182
  Returns
116
183
  -------
117
184
  Edb.Cell.Terminal.EdgeTerminal
185
+ Created edge terminal.
118
186
  """
119
187
  warnings.warn(
120
188
  "`_create_edge_terminal` is deprecated and is now located here "
@@ -126,12 +194,18 @@ class Hfss(object):
126
194
  )
127
195
 
128
196
  def get_trace_width_for_traces_with_ports(self):
129
- """Retrieve the trace width for traces with ports.
197
+ """Retrieve trace widths for traces with ports.
130
198
 
131
199
  Returns
132
- -------<
200
+ -------
133
201
  dict
134
- Dictionary of trace width data.
202
+ Dictionary mapping net names to smallest trace widths.
203
+
204
+ Examples
205
+ --------
206
+ >>> widths = edb.hfss.get_trace_width_for_traces_with_ports()
207
+ >>> for net_name, width in widths.items():
208
+ ... print(f"Net '{net_name}': Smallest width = {width}")
135
209
  """
136
210
  nets = {}
137
211
  for net in self._pedb.excitations_nets:
@@ -139,27 +213,26 @@ class Hfss(object):
139
213
  return nets
140
214
 
141
215
  def create_circuit_port_on_pin(self, pos_pin, neg_pin, impedance=50, port_name=None):
142
- """Create Circuit Port on Pin.
216
+ """Create circuit port between two pins (deprecated).
143
217
 
144
- . deprecated:: pyedb 0.28.0
145
- Use :func:`pyedb.grpc.core.excitations.create_circuit_port_on_pin` instead.
218
+ .. deprecated:: 0.28.0
219
+ Use :func:`pyedb.grpc.core.excitations.create_circuit_port_on_pin` instead.
146
220
 
147
221
  Parameters
148
222
  ----------
149
- pos_pin : Object
150
- Edb Pin
151
- neg_pin : Object
152
- Edb Pin
153
- impedance : float
154
- Port Impedance
223
+ pos_pin : Edb.Cell.Primitive.PadstackInstance
224
+ Positive pin.
225
+ neg_pin : Edb.Cell.Primitive.PadstackInstance
226
+ Negative pin.
227
+ impedance : float, optional
228
+ Port impedance.
155
229
  port_name : str, optional
156
- Port Name
230
+ Port name.
157
231
 
158
232
  Returns
159
233
  -------
160
234
  str
161
- Port Name.
162
-
235
+ Port name.
163
236
  """
164
237
  warnings.warn(
165
238
  "`create_circuit_port_on_pin` is deprecated and is now located here "
@@ -169,36 +242,28 @@ class Hfss(object):
169
242
  return self._pedb.excitations.create_circuit_port_on_pin(pos_pin, neg_pin, impedance, port_name)
170
243
 
171
244
  def create_voltage_source_on_pin(self, pos_pin, neg_pin, voltage_value=3.3, phase_value=0, source_name=""):
172
- """Create a voltage source.
245
+ """Create voltage source between two pins (deprecated).
173
246
 
174
- . deprecated:: pyedb 0.28.0
175
- Use :func:`pyedb.grpc.core.excitations.create_voltage_source_on_pin` instead.
247
+ .. deprecated:: 0.28.0
248
+ Use :func:`pyedb.grpc.core.excitations.create_voltage_source_on_pin` instead.
176
249
 
177
250
  Parameters
178
251
  ----------
179
- pos_pin : Object
180
- Positive Pin.
181
- neg_pin : Object
182
- Negative Pin.
252
+ pos_pin : Edb.Cell.Primitive.PadstackInstance
253
+ Positive pin.
254
+ neg_pin : Edb.Cell.Primitive.PadstackInstance
255
+ Negative pin.
183
256
  voltage_value : float, optional
184
- Value for the voltage. The default is ``3.3``.
185
- phase_value : optional
186
- Value for the phase. The default is ``0``.
257
+ Voltage value.
258
+ phase_value : float, optional
259
+ Phase value.
187
260
  source_name : str, optional
188
- Name of the source. The default is ``""``.
261
+ Source name.
189
262
 
190
263
  Returns
191
264
  -------
192
265
  str
193
- Source Name.
194
-
195
- Examples
196
- --------
197
-
198
- >>> from pyedb import Edb
199
- >>> edbapp = Edb("myaedbfolder", "project name", "release version")
200
- >>> pins =edbapp.components.get_pin_from_component("U2A5")
201
- >>> edbapp.hfss.create_voltage_source_on_pin(pins[0], pins[1],50,"source_name")
266
+ Source name.
202
267
  """
203
268
  warnings.warn(
204
269
  "`create_voltage_source_on_pin` is deprecated and is now located here "
@@ -210,36 +275,28 @@ class Hfss(object):
210
275
  )
211
276
 
212
277
  def create_current_source_on_pin(self, pos_pin, neg_pin, current_value=0.1, phase_value=0, source_name=""):
213
- """Create a current source.
278
+ """Create current source between two pins (deprecated).
214
279
 
215
- . deprecated:: pyedb 0.28.0
216
- Use :func:`pyedb.grpc.core.excitations.create_current_source_on_pin` instead.
280
+ .. deprecated:: 0.28.0
281
+ Use :func:`pyedb.grpc.core.excitations.create_current_source_on_pin` instead.
217
282
 
218
283
  Parameters
219
284
  ----------
220
- pos_pin : Object
221
- Positive Pin.
222
- neg_pin : Object
223
- Negative Pin.
285
+ pos_pin : Edb.Cell.Primitive.PadstackInstance
286
+ Positive pin.
287
+ neg_pin : Edb.Cell.Primitive.PadstackInstance
288
+ Negative pin.
224
289
  current_value : float, optional
225
- Value for the current. The default is ``0.1``.
226
- phase_value : optional
227
- Value for the phase. The default is ``0``.
290
+ Current value.
291
+ phase_value : float, optional
292
+ Phase value.
228
293
  source_name : str, optional
229
- Name of the source. The default is ``""``.
294
+ Source name.
230
295
 
231
296
  Returns
232
297
  -------
233
298
  str
234
- Source Name.
235
-
236
- Examples
237
- --------
238
-
239
- >>> from pyedb import Edb
240
- >>> edbapp = Edb("myaedbfolder", "project name", "release version")
241
- >>> pins =edbapp.components.get_pin_from_component("U2A5")
242
- >>> edbapp.hfss.create_current_source_on_pin(pins[0], pins[1],50,"source_name")
299
+ Source name.
243
300
  """
244
301
  warnings.warn(
245
302
  "`create_current_source_on_pin` is deprecated and is now located here "
@@ -251,34 +308,26 @@ class Hfss(object):
251
308
  )
252
309
 
253
310
  def create_resistor_on_pin(self, pos_pin, neg_pin, rvalue=1, resistor_name=""):
254
- """Create a Resistor boundary between two given pins.
311
+ """Create resistor between two pins (deprecated).
255
312
 
256
- . deprecated:: pyedb 0.28.0
257
- Use :func:`pyedb.grpc.core.excitations.create_resistor_on_pin` instead.
313
+ .. deprecated:: 0.28.0
314
+ Use :func:`pyedb.grpc.core.excitations.create_resistor_on_pin` instead.
258
315
 
259
316
  Parameters
260
317
  ----------
261
- pos_pin : Object
262
- Positive Pin.
263
- neg_pin : Object
264
- Negative Pin.
318
+ pos_pin : Edb.Cell.Primitive.PadstackInstance
319
+ Positive pin.
320
+ neg_pin : Edb.Cell.Primitive.PadstackInstance
321
+ Negative pin.
265
322
  rvalue : float, optional
266
- Resistance value. The default is ``1``.
323
+ Resistance value.
267
324
  resistor_name : str, optional
268
- Name of the resistor. The default is ``""``.
325
+ Resistor name.
269
326
 
270
327
  Returns
271
328
  -------
272
329
  str
273
- Name of the Resistor.
274
-
275
- Examples
276
- --------
277
-
278
- >>> from pyedb import Edb
279
- >>> edbapp = Edb("myaedbfolder", "project name", "release version")
280
- >>> pins =edbapp.components.get_pin_from_component("U2A5")
281
- >>> edbapp.hfss.create_resistor_on_pin(pins[0], pins[1],50,"res_name")
330
+ Resistor name.
282
331
  """
283
332
  warnings.warn(
284
333
  "`create_resistor_on_pin` is deprecated and is now located here "
@@ -296,35 +345,31 @@ class Hfss(object):
296
345
  impedance_value=50,
297
346
  port_name="",
298
347
  ):
299
- """Create a circuit port on a NET.
348
+ """Create circuit port on net (deprecated).
300
349
 
301
- . deprecated:: pyedb 0.28.0
302
- Use :func:`pyedb.grpc.core.excitations.create_circuit_port_on_net` instead.
303
-
304
- It groups all pins belonging to the specified net and then applies the port on PinGroups.
350
+ .. deprecated:: 0.28.0
351
+ Use :func:`pyedb.grpc.core.excitations.create_circuit_port_on_net` instead.
305
352
 
306
353
  Parameters
307
354
  ----------
308
355
  positive_component_name : str
309
- Name of the positive component.
356
+ Positive component name.
310
357
  positive_net_name : str
311
- Name of the positive net.
358
+ Positive net name.
312
359
  negative_component_name : str, optional
313
- Name of the negative component. The default is ``None``, in which case the name of
314
- the positive net is assigned.
360
+ Negative component name.
315
361
  negative_net_name : str, optional
316
- Name of the negative net name. The default is ``"GND"``.
362
+ Negative net name.
317
363
  impedance_value : float, optional
318
- Port impedance value. The default is ``50``.
364
+ Port impedance.
319
365
  port_name : str, optional
320
- Name of the port. The default is ``""``.
366
+ Port name.
321
367
 
322
368
  Returns
323
369
  -------
324
370
  str
325
- The name of the port.
371
+ Port name.
326
372
  """
327
-
328
373
  warnings.warn(
329
374
  "`create_circuit_port_on_net` is deprecated and is now located here "
330
375
  "`pyedb.grpc.core.excitations.create_circuit_port_on_net` instead.",
@@ -349,35 +394,33 @@ class Hfss(object):
349
394
  phase_value=0,
350
395
  source_name="",
351
396
  ):
352
- """Create a voltage source.
397
+ """Create voltage source on net (deprecated).
353
398
 
354
- . deprecated:: pyedb 0.28.0
355
- Use :func:`pyedb.grpc.core.excitations.create_voltage_source_on_net` instead.
399
+ .. deprecated:: 0.28.0
400
+ Use :func:`pyedb.grpc.core.excitations.create_voltage_source_on_net` instead.
356
401
 
357
402
  Parameters
358
403
  ----------
359
404
  positive_component_name : str
360
- Name of the positive component.
405
+ Positive component name.
361
406
  positive_net_name : str
362
- Name of the positive net.
407
+ Positive net name.
363
408
  negative_component_name : str, optional
364
- Name of the negative component. The default is ``None``, in which case the name of
365
- the positive net is assigned.
409
+ Negative component name.
366
410
  negative_net_name : str, optional
367
- Name of the negative net. The default is ``"GND"``.
411
+ Negative net name.
368
412
  voltage_value : float, optional
369
- Value for the voltage. The default is ``3.3``.
370
- phase_value : optional
371
- Value for the phase. The default is ``0``.
413
+ Voltage value.
414
+ phase_value : float, optional
415
+ Phase value.
372
416
  source_name : str, optional
373
- Name of the source. The default is ``""``.
417
+ Source name.
374
418
 
375
419
  Returns
376
420
  -------
377
421
  str
378
- Source Name.
422
+ Source name.
379
423
  """
380
-
381
424
  warnings.warn(
382
425
  "`create_voltage_source_on_net` is deprecated and is now located here "
383
426
  "`pyedb.grpc.core.excitations.create_voltage_source_on_net` instead.",
@@ -403,35 +446,33 @@ class Hfss(object):
403
446
  phase_value=0,
404
447
  source_name="",
405
448
  ):
406
- """Create a current source.
449
+ """Create current source on net (deprecated).
407
450
 
408
- . deprecated:: pyedb 0.28.0
409
- Use :func:`pyedb.grpc.core.excitations.create_current_source_on_net` instead.
451
+ .. deprecated:: 0.28.0
452
+ Use :func:`pyedb.grpc.core.excitations.create_current_source_on_net` instead.
410
453
 
411
454
  Parameters
412
455
  ----------
413
456
  positive_component_name : str
414
- Name of the positive component.
457
+ Positive component name.
415
458
  positive_net_name : str
416
- Name of the positive net.
459
+ Positive net name.
417
460
  negative_component_name : str, optional
418
- Name of the negative component. The default is ``None``, in which case the name of
419
- the positive net is assigned.
461
+ Negative component name.
420
462
  negative_net_name : str, optional
421
- Name of the negative net. The default is ``"GND"``.
463
+ Negative net name.
422
464
  current_value : float, optional
423
- Value for the current. The default is ``0.1``.
424
- phase_value : optional
425
- Value for the phase. The default is ``0``.
465
+ Current value.
466
+ phase_value : float, optional
467
+ Phase value.
426
468
  source_name : str, optional
427
- Name of the source. The default is ``""``.
469
+ Source name.
428
470
 
429
471
  Returns
430
472
  -------
431
473
  str
432
- Source Name.
474
+ Source name.
433
475
  """
434
-
435
476
  warnings.warn(
436
477
  "`create_current_source_on_net` is deprecated and is now located here "
437
478
  "`pyedb.grpc.core.excitations.create_current_source_on_net` instead.",
@@ -448,25 +489,24 @@ class Hfss(object):
448
489
  )
449
490
 
450
491
  def create_coax_port_on_component(self, ref_des_list, net_list, delete_existing_terminal=False):
451
- """Create a coaxial port on a component or component list on a net or net list.
452
- The name of the new coaxial port is automatically assigned.
492
+ """Create coaxial port on component (deprecated).
453
493
 
454
- . deprecated:: pyedb 0.28.0
455
- Use :func:`pyedb.grpc.core.excitations.create_coax_port_on_component` instead.
494
+ .. deprecated:: 0.28.0
495
+ Use :func:`pyedb.grpc.core.excitations.create_coax_port_on_component` instead.
456
496
 
457
497
  Parameters
458
498
  ----------
459
499
  ref_des_list : list, str
460
- List of one or more reference designators.
461
-
500
+ Reference designator(s).
462
501
  net_list : list, str
463
- List of one or more nets.
502
+ Net name(s).
503
+ delete_existing_terminal : bool, optional
504
+ Delete existing terminals.
464
505
 
465
506
  Returns
466
507
  -------
467
508
  bool
468
- ``True`` when successful, ``False`` when failed.
469
-
509
+ True if successful, False otherwise.
470
510
  """
471
511
  warnings.warn(
472
512
  "`create_coax_port_on_component` is deprecated and is now located here "
@@ -488,39 +528,34 @@ class Hfss(object):
488
528
  vertical_extent_factor=3,
489
529
  pec_launch_width="0.01mm",
490
530
  ):
491
- """Create a differential wave port.
531
+ """Create differential wave port (deprecated).
492
532
 
493
- . deprecated:: pyedb 0.28.0
494
- Use :func:`pyedb.grpc.core.excitations.create_differential_wave_port` instead.
533
+ .. deprecated:: 0.28.0
534
+ Use :func:`pyedb.grpc.core.excitations.create_differential_wave_port` instead.
495
535
 
496
536
  Parameters
497
537
  ----------
498
538
  positive_primitive_id : int, EDBPrimitives
499
- Primitive ID of the positive terminal.
539
+ Positive primitive ID.
500
540
  positive_points_on_edge : list
501
- Coordinate of the point to define the edge terminal.
502
- The point must be close to the target edge but not on the two
503
- ends of the edge.
541
+ Point coordinates on positive edge.
504
542
  negative_primitive_id : int, EDBPrimitives
505
- Primitive ID of the negative terminal.
543
+ Negative primitive ID.
506
544
  negative_points_on_edge : list
507
- Coordinate of the point to define the edge terminal.
508
- The point must be close to the target edge but not on the two
509
- ends of the edge.
545
+ Point coordinates on negative edge.
510
546
  port_name : str, optional
511
- Name of the port. The default is ``None``.
547
+ Port name.
512
548
  horizontal_extent_factor : int, float, optional
513
- Horizontal extent factor. The default value is ``5``.
549
+ Horizontal extent factor.
514
550
  vertical_extent_factor : int, float, optional
515
- Vertical extent factor. The default value is ``3``.
551
+ Vertical extent factor.
516
552
  pec_launch_width : str, optional
517
- Launch Width of PEC. The default value is ``"0.01mm"``.
553
+ PEC launch width.
518
554
 
519
555
  Returns
520
556
  -------
521
557
  tuple
522
- The tuple contains: (port_name, pyedb.dotnet.database.edb_data.sources.ExcitationDifferential).
523
-
558
+ (Port name, ExcitationDifferential) tuple.
524
559
  """
525
560
  warnings.warn(
526
561
  "`create_differential_wave_port` is deprecated and is now located here "
@@ -547,32 +582,30 @@ class Hfss(object):
547
582
  vertical_extent_factor=3,
548
583
  pec_launch_width="0.01mm",
549
584
  ):
550
- """Create a bundle wave port.
585
+ """Create bundle wave port (deprecated).
551
586
 
552
- . deprecated:: pyedb 0.28.0
553
- Use :func:`pyedb.grpc.core.excitations.create_bundle_wave_port` instead.
587
+ .. deprecated:: 0.28.0
588
+ Use :func:`pyedb.grpc.core.excitations.create_bundle_wave_port` instead.
554
589
 
555
590
  Parameters
556
591
  ----------
557
592
  primitives_id : list
558
- Primitive ID of the positive terminal.
593
+ Primitive IDs.
559
594
  points_on_edge : list
560
- Coordinate of the point to define the edge terminal.
561
- The point must be close to the target edge but not on the two
562
- ends of the edge.
595
+ Point coordinates on edges.
563
596
  port_name : str, optional
564
- Name of the port. The default is ``None``.
597
+ Port name.
565
598
  horizontal_extent_factor : int, float, optional
566
- Horizontal extent factor. The default value is ``5``.
599
+ Horizontal extent factor.
567
600
  vertical_extent_factor : int, float, optional
568
- Vertical extent factor. The default value is ``3``.
601
+ Vertical extent factor.
569
602
  pec_launch_width : str, optional
570
- Launch Width of PEC. The default value is ``"0.01mm"``.
603
+ PEC launch width.
571
604
 
572
605
  Returns
573
606
  -------
574
607
  tuple
575
- The tuple contains: (port_name, pyedb.egacy.database.edb_data.sources.ExcitationDifferential).
608
+ (Port name, ExcitationDifferential) tuple.
576
609
  """
577
610
  warnings.warn(
578
611
  "`create_bundle_wave_port` is deprecated and is now located here "
@@ -584,23 +617,22 @@ class Hfss(object):
584
617
  )
585
618
 
586
619
  def create_hfss_ports_on_padstack(self, pinpos, portname=None):
587
- """Create an HFSS port on a padstack.
620
+ """Create HFSS port on padstack (deprecated).
588
621
 
589
- . deprecated:: pyedb 0.28.0
590
- Use :func:`pyedb.grpc.core.excitations.create_hfss_ports_on_padstack` instead.
622
+ .. deprecated:: 0.28.0
623
+ Use :func:`pyedb.grpc.core.excitations.create_hfss_ports_on_padstack` instead.
591
624
 
592
625
  Parameters
593
626
  ----------
594
627
  pinpos :
595
- Position of the pin.
596
-
628
+ Pin position.
597
629
  portname : str, optional
598
- Name of the port. The default is ``None``.
630
+ Port name.
599
631
 
600
632
  Returns
601
633
  -------
602
634
  bool
603
- ``True`` when successful, ``False`` when failed.
635
+ True if successful, False otherwise.
604
636
  """
605
637
  warnings.warn(
606
638
  "`create_hfss_ports_on_padstack` is deprecated and is now located here "
@@ -620,45 +652,35 @@ class Hfss(object):
620
652
  port_impedance=50.0,
621
653
  force_circuit_port=False,
622
654
  ):
623
- """Create lumped port between two edges from two different polygons. Can also create a vertical port when
624
- the reference layer name is only provided. When a port is created between two edge from two polygons which don't
625
- belong to the same layer, a circuit port will be automatically created instead of lumped. To enforce the circuit
626
- port instead of lumped,use the boolean force_circuit_port.
627
-
628
- . deprecated:: pyedb 0.28.0
629
- Use :func:`pyedb.grpc.core.excitations.create_edge_port_on_polygon` instead.
655
+ """Create edge port on polygon (deprecated).
630
656
 
657
+ .. deprecated:: 0.28.0
658
+ Use :func:`pyedb.grpc.core.excitations.create_edge_port_on_polygon` instead.
631
659
 
632
660
  Parameters
633
661
  ----------
634
- polygon : The EDB polygon object used to assign the port.
635
- Edb.Cell.Primitive.Polygon object.
636
-
637
- reference_polygon : The EDB polygon object used to define the port reference.
638
- Edb.Cell.Primitive.Polygon object.
639
-
640
- terminal_point : The coordinate of the point to define the edge terminal of the port. This point must be
641
- located on the edge of the polygon where the port has to be placed. For instance taking the middle point
642
- of an edge is a good practice but any point of the edge should be valid. Taking a corner might cause unwanted
643
- port location.
644
- list[float, float] with values provided in meter.
645
-
646
- reference_point : same as terminal_point but used for defining the reference location on the edge.
647
- list[float, float] with values provided in meter.
648
-
649
- reference_layer : Name used to define port reference for vertical ports.
650
- str the layer name.
651
-
652
- port_name : Name of the port.
653
- str.
654
-
655
- port_impedance : port impedance value. Default value is 50 Ohms.
656
- float, impedance value.
662
+ polygon : Edb.Cell.Primitive.Polygon, optional
663
+ Port polygon.
664
+ reference_polygon : Edb.Cell.Primitive.Polygon, optional
665
+ Reference polygon.
666
+ terminal_point : list, optional
667
+ Terminal point coordinates.
668
+ reference_point : list, optional
669
+ Reference point coordinates.
670
+ reference_layer : str, optional
671
+ Reference layer name.
672
+ port_name : str, optional
673
+ Port name.
674
+ port_impedance : float, optional
675
+ Port impedance.
676
+ force_circuit_port : bool, optional
677
+ Force circuit port creation.
657
678
 
658
- force_circuit_port ; used to force circuit port creation instead of lumped. Works for vertical and coplanar
659
- ports.
679
+ Returns
680
+ -------
681
+ bool
682
+ True if successful, False otherwise.
660
683
  """
661
-
662
684
  warnings.warn(
663
685
  "`create_edge_port_on_polygon` is deprecated and is now located here "
664
686
  "`pyedb.grpc.core.excitations.create_edge_port_on_polygon` instead.",
@@ -685,39 +707,36 @@ class Hfss(object):
685
707
  vertical_extent_factor=3,
686
708
  pec_launch_width="0.01mm",
687
709
  ):
688
- """Create a wave port.
710
+ """Create wave port (deprecated).
689
711
 
690
- . deprecated:: pyedb 0.28.0
691
- Use :func:`pyedb.grpc.core.excitations.create_wave_port` instead.
712
+ .. deprecated:: 0.28.0
713
+ Use :func:`pyedb.grpc.core.excitations.create_wave_port` instead.
692
714
 
693
715
  Parameters
694
716
  ----------
695
717
  prim_id : int, Primitive
696
718
  Primitive ID.
697
719
  point_on_edge : list
698
- Coordinate of the point to define the edge terminal.
699
- The point must be on the target edge but not on the two
700
- ends of the edge.
720
+ Point coordinates on edge.
701
721
  port_name : str, optional
702
- Name of the port. The default is ``None``.
722
+ Port name.
703
723
  impedance : int, float, optional
704
- Impedance of the port. The default value is ``50``.
724
+ Port impedance.
705
725
  horizontal_extent_factor : int, float, optional
706
- Horizontal extent factor. The default value is ``5``.
726
+ Horizontal extent factor.
707
727
  vertical_extent_factor : int, float, optional
708
- Vertical extent factor. The default value is ``3``.
728
+ Vertical extent factor.
709
729
  pec_launch_width : str, optional
710
- Launch Width of PEC. The default value is ``"0.01mm"``.
730
+ PEC launch width.
711
731
 
712
732
  Returns
713
733
  -------
714
734
  tuple
715
- The tuple contains: (Port name, pyedb.dotnet.database.edb_data.sources.Excitation).
716
-
735
+ (Port name, Excitation) tuple.
717
736
  """
718
737
  warnings.warn(
719
- "`create_source_on_component` is deprecated and is now located here "
720
- "`pyedb.grpc.core.excitations.create_source_on_component` instead.",
738
+ "`create_wave_port` is deprecated and is now located here "
739
+ "`pyedb.grpc.core.excitations.create_wave_port` instead.",
721
740
  DeprecationWarning,
722
741
  )
723
742
  return self._pedb.source_excitation.create_wave_port(
@@ -742,35 +761,31 @@ class Hfss(object):
742
761
  vertical_extent_factor=3,
743
762
  pec_launch_width="0.01mm",
744
763
  ):
745
- """Create a vertical edge port.
764
+ """Create vertical edge port (deprecated).
746
765
 
747
- . deprecated:: pyedb 0.28.0
748
- Use :func:`pyedb.grpc.core.excitations.create_edge_port_vertical` instead.
766
+ .. deprecated:: 0.28.0
767
+ Use :func:`pyedb.grpc.core.excitations.create_edge_port_vertical` instead.
749
768
 
750
769
  Parameters
751
770
  ----------
752
771
  prim_id : int
753
772
  Primitive ID.
754
773
  point_on_edge : list
755
- Coordinate of the point to define the edge terminal.
756
- The point must be on the target edge but not on the two
757
- ends of the edge.
774
+ Point coordinates on edge.
758
775
  port_name : str, optional
759
- Name of the port. The default is ``None``.
776
+ Port name.
760
777
  impedance : int, float, optional
761
- Impedance of the port. The default value is ``50``.
778
+ Port impedance.
762
779
  reference_layer : str, optional
763
- Reference layer of the port. The default is ``None``.
780
+ Reference layer name.
764
781
  hfss_type : str, optional
765
- Type of the port. The default value is ``"Gap"``. Options are ``"Gap"``, ``"Wave"``.
782
+ Port type ("Gap" or "Wave").
766
783
  horizontal_extent_factor : int, float, optional
767
- Horizontal extent factor. The default value is ``5``.
784
+ Horizontal extent factor.
768
785
  vertical_extent_factor : int, float, optional
769
- Vertical extent factor. The default value is ``3``.
770
- radial_extent_factor : int, float, optional
771
- Radial extent factor. The default value is ``0``.
786
+ Vertical extent factor.
772
787
  pec_launch_width : str, optional
773
- Launch Width of PEC. The default value is ``"0.01mm"``.
788
+ PEC launch width.
774
789
 
775
790
  Returns
776
791
  -------
@@ -804,36 +819,32 @@ class Hfss(object):
804
819
  impedance=50,
805
820
  layer_alignment="Upper",
806
821
  ):
807
- """Create a horizontal edge port.
822
+ """Create horizontal edge port (deprecated).
808
823
 
809
- . deprecated:: pyedb 0.28.0
810
- Use :func:`pyedb.grpc.core.excitations.create_edge_port_horizontal` instead.
824
+ .. deprecated:: 0.28.0
825
+ Use :func:`pyedb.grpc.core.excitations.create_edge_port_horizontal` instead.
811
826
 
812
827
  Parameters
813
828
  ----------
814
829
  prim_id : int
815
830
  Primitive ID.
816
831
  point_on_edge : list
817
- Coordinate of the point to define the edge terminal.
818
- The point must be on the target edge but not on the two
819
- ends of the edge.
832
+ Point coordinates on edge.
820
833
  ref_prim_id : int, optional
821
- Reference primitive ID. The default is ``None``.
834
+ Reference primitive ID.
822
835
  point_on_ref_edge : list, optional
823
- Coordinate of the point to define the reference edge
824
- terminal. The point must be on the target edge but not
825
- on the two ends of the edge. The default is ``None``.
836
+ Point coordinates on reference edge.
826
837
  port_name : str, optional
827
- Name of the port. The default is ``None``.
838
+ Port name.
828
839
  impedance : int, float, optional
829
- Impedance of the port. The default value is ``50``.
840
+ Port impedance.
830
841
  layer_alignment : str, optional
831
- Layer alignment. The default value is ``Upper``. Options are ``"Upper"``, ``"Lower"``.
842
+ Layer alignment ("Upper" or "Lower").
832
843
 
833
844
  Returns
834
845
  -------
835
846
  str
836
- Name of the port.
847
+ Port name.
837
848
  """
838
849
  warnings.warn(
839
850
  "`create_edge_port_horizontal` is deprecated and is now located here "
@@ -845,36 +856,28 @@ class Hfss(object):
845
856
  )
846
857
 
847
858
  def create_lumped_port_on_net(self, nets, reference_layer, return_points_only, digit_resolution, at_bounding_box):
848
- """Create an edge port on nets. This command looks for traces and polygons on the
849
- nets and tries to assign vertical lumped port.
859
+ """Create lumped port on net (deprecated).
850
860
 
851
- . deprecated:: pyedb 0.28.0
852
- Use :func:`pyedb.grpc.core.excitations.create_lumped_port_on_net` instead.
861
+ .. deprecated:: 0.28.0
862
+ Use :func:`pyedb.grpc.core.excitations.create_lumped_port_on_net` instead.
853
863
 
854
864
  Parameters
855
865
  ----------
856
- nets : list, optional
857
- List of nets, str or Edb net.
858
-
859
- reference_layer : str, Edb layer.
860
- Name or Edb layer object.
861
-
862
- return_points_only : bool, optional
863
- Use this boolean when you want to return only the points from the edges and not creating ports. Default
864
- value is ``False``.
865
-
866
- digit_resolution : int, optional
867
- The number of digits carried for the edge location accuracy. The default value is ``6``.
868
-
866
+ nets : list
867
+ Net names or objects.
868
+ reference_layer : str, Edb.Layer
869
+ Reference layer name or object.
870
+ return_points_only : bool
871
+ Return points only without creating ports.
872
+ digit_resolution : int
873
+ Coordinate digit resolution.
869
874
  at_bounding_box : bool
870
- When ``True`` will keep the edges from traces at the layout bounding box location. This is recommended when
871
- a cutout has been performed before and lumped ports have to be created on ending traces. Default value is
872
- ``True``.
875
+ Use layout bounding box.
873
876
 
874
877
  Returns
875
878
  -------
876
879
  bool
877
- ``True`` when successful, ``False`` when failed.
880
+ True if successful, False otherwise.
878
881
  """
879
882
  warnings.warn(
880
883
  "`create_lumped_port_on_net` is deprecated and is now located here "
@@ -886,31 +889,28 @@ class Hfss(object):
886
889
  )
887
890
 
888
891
  def create_vertical_circuit_port_on_clipped_traces(self, nets=None, reference_net=None, user_defined_extent=None):
889
- """Create an edge port on clipped signal traces.
892
+ """Create vertical circuit port on clipped traces (deprecated).
890
893
 
891
- . deprecated:: pyedb 0.28.0
892
- Use :func:`pyedb.grpc.core.excitations.create_vertical_circuit_port_on_clipped_traces` instead.
894
+ .. deprecated:: 0.28.0
895
+ Use :func:`pyedb.grpc.core.excitations.create_vertical_circuit_port_on_clipped_traces` instead.
893
896
 
894
897
  Parameters
895
898
  ----------
896
899
  nets : list, optional
897
- String of one net or EDB net or a list of multiple nets or EDB nets.
898
-
899
- reference_net : str, Edb net.
900
- Name or EDB reference net.
901
-
902
- user_defined_extent : [x, y], EDB PolygonData
903
- Use this point list or PolygonData object to check if ports are at this polygon border.
900
+ Net names or objects.
901
+ reference_net : str, Edb.Net, optional
902
+ Reference net name or object.
903
+ user_defined_extent : list, PolygonData, optional
904
+ User-defined extent polygon.
904
905
 
905
906
  Returns
906
907
  -------
907
- [[str]]
908
- Nested list of str, with net name as first value, X value for point at border, Y value for point at border,
909
- and terminal name.
908
+ list
909
+ List of port data [net_name, x, y, terminal_name].
910
910
  """
911
911
  warnings.warn(
912
- "`create_source_on_component` is deprecated and is now located here "
913
- "`pyedb.grpc.core.excitations.create_source_on_component` instead.",
912
+ "`create_vertical_circuit_port_on_clipped_traces` is deprecated and is now located here "
913
+ "`pyedb.grpc.core.excitations.create_vertical_circuit_port_on_clipped_traces` instead.",
914
914
  DeprecationWarning,
915
915
  )
916
916
  return self._pedb.source_excitation.create_vertical_circuit_port_on_clipped_traces(
@@ -918,20 +918,28 @@ class Hfss(object):
918
918
  )
919
919
 
920
920
  def get_layout_bounding_box(self, layout=None, digit_resolution=6):
921
- """Evaluate the layout bounding box.
921
+ """Calculate layout bounding box.
922
922
 
923
923
  Parameters
924
924
  ----------
925
- layout :
926
- Edb layout.
927
-
925
+ layout : Edb.Cell.Layout, optional
926
+ Layout object (uses active layout if None).
928
927
  digit_resolution : int, optional
929
- Digit Resolution. The default value is ``6``.
928
+ Coordinate rounding precision.
930
929
 
931
930
  Returns
932
931
  -------
933
932
  list
934
- [lower left corner X, lower left corner, upper right corner X, upper right corner Y].
933
+ [min_x, min_y, max_x, max_y] coordinates.
934
+
935
+ Examples
936
+ --------
937
+ >>> bbox = edb.hfss.get_layout_bounding_box()
938
+ >>> print(f"Layout Bounding Box: {bbox}")
939
+ >>>
940
+ >>> # With custom parameters
941
+ >>> custom_layout = edb.layouts["MyLayout"]
942
+ >>> bbox = edb.hfss.get_layout_bounding_box(custom_layout, 5)
935
943
  """
936
944
  if not layout:
937
945
  layout = self._active_layout
@@ -950,21 +958,22 @@ class Hfss(object):
950
958
  return layout_bbox
951
959
 
952
960
  def configure_hfss_extents(self, simulation_setup=None):
953
- """Configure the HFSS extent box.
961
+ """Configure HFSS extent box (deprecated).
954
962
 
955
- . deprecated:: pyedb 0.28.0
956
- Use :func:`self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_extents`
957
- instead.
963
+ .. deprecated:: 0.28.0
964
+ Use :func:
965
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_extents`
966
+ instead.
958
967
 
959
968
  Parameters
960
969
  ----------
961
- simulation_setup :
962
- Edb_DATA.SimulationConfiguration object
970
+ simulation_setup : HfssSimulationSetup, optional
971
+ Simulation setup object.
963
972
 
964
973
  Returns
965
974
  -------
966
975
  bool
967
- True when succeeded, False when failed.
976
+ True if successful, False otherwise.
968
977
  """
969
978
  warnings.warn(
970
979
  "`configure_hfss_extents` is deprecated and is now located here "
@@ -977,24 +986,22 @@ class Hfss(object):
977
986
  )
978
987
 
979
988
  def configure_hfss_analysis_setup(self, simulation_setup=None):
980
- """
981
- Configure HFSS analysis setup.
982
-
983
- . deprecated:: pyedb 0.28.0
984
- Use :func:
985
- `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_analysis_setup`
986
- instead.
989
+ """Configure HFSS analysis setup (deprecated).
987
990
 
991
+ .. deprecated:: 0.28.0
992
+ Use :func:
993
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_analysis_setup`
994
+ instead.
988
995
 
989
996
  Parameters
990
997
  ----------
991
- simulation_setup :
992
- Edb_DATA.SimulationConfiguration object
998
+ simulation_setup : HfssSimulationSetup, optional
999
+ Simulation setup object.
993
1000
 
994
1001
  Returns
995
1002
  -------
996
1003
  bool
997
- True when succeeded, False when failed.
1004
+ True if successful, False otherwise.
998
1005
  """
999
1006
  warnings.warn(
1000
1007
  "`configure_hfss_analysis_setup` is deprecated and is now located here "
@@ -1007,6 +1014,19 @@ class Hfss(object):
1007
1014
  )
1008
1015
 
1009
1016
  def _setup_decade_count_sweep(self, sweep, start_freq="1", stop_freq="1MHz", decade_count="10"):
1017
+ """Configure decade count sweep (internal).
1018
+
1019
+ Parameters
1020
+ ----------
1021
+ sweep : SweepData
1022
+ Sweep data object.
1023
+ start_freq : str, float, optional
1024
+ Start frequency.
1025
+ stop_freq : str, float, optional
1026
+ Stop frequency.
1027
+ decade_count : str, float, optional
1028
+ Points per decade.
1029
+ """
1010
1030
  start_f = GeometryOperators.parse_dim_arg(start_freq)
1011
1031
  if start_f == 0.0:
1012
1032
  start_f = 10
@@ -1022,30 +1042,20 @@ class Hfss(object):
1022
1042
  sweep.Frequencies.Add(str(freq))
1023
1043
 
1024
1044
  def trim_component_reference_size(self, simulation_setup=None, trim_to_terminals=False):
1025
- """Trim the common component reference to the minimally acceptable size.
1045
+ """Trim component reference size (deprecated).
1026
1046
 
1027
- . deprecated:: pyedb 0.28.0
1028
- Use :func:
1029
- `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.trim_component_reference_size`
1030
- instead.
1047
+ .. deprecated:: 0.28.0
1048
+ Use :func:
1049
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.trim_component_reference_size`
1050
+ instead.
1031
1051
 
1032
1052
  Parameters
1033
1053
  ----------
1034
- simulation_setup :
1035
- Edb_DATA.SimulationConfiguration object
1036
-
1037
- trim_to_terminals :
1038
- bool.
1039
- True, reduce the reference to a box covering only the active terminals (i.e. those with
1040
- ports).
1041
- False, reduce the reference to the minimal size needed to cover all pins
1042
-
1043
- Returns
1044
- -------
1045
- bool
1046
- True when succeeded, False when failed.
1054
+ simulation_setup : HfssSimulationSetup, optional
1055
+ Simulation setup object.
1056
+ trim_to_terminals : bool, optional
1057
+ Trim to active terminals only.
1047
1058
  """
1048
-
1049
1059
  warnings.warn(
1050
1060
  "`trim_component_reference_size` is deprecated and is now located here "
1051
1061
  "`pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration."
@@ -1057,22 +1067,17 @@ class Hfss(object):
1057
1067
  )
1058
1068
 
1059
1069
  def set_coax_port_attributes(self, simulation_setup=None):
1060
- """Set coaxial port attribute with forcing default impedance to 50 Ohms and adjusting the coaxial extent radius.
1070
+ """Set coaxial port attributes (deprecated).
1061
1071
 
1062
- . deprecated:: pyedb 0.28.0
1063
- Use :func:
1064
- `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.set_coax_port_attributes`
1065
- instead.
1072
+ .. deprecated:: 0.28.0
1073
+ Use :func:
1074
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.set_coax_port_attributes`
1075
+ instead.
1066
1076
 
1067
1077
  Parameters
1068
1078
  ----------
1069
- simulation_setup :
1070
- Edb_DATA.SimulationConfiguration object.
1071
-
1072
- Returns
1073
- -------
1074
- bool
1075
- True when succeeded, False when failed.
1079
+ simulation_setup : HfssSimulationSetup, optional
1080
+ Simulation setup object.
1076
1081
  """
1077
1082
  warnings.warn(
1078
1083
  "`set_coax_port_attributes` is deprecated and is now located here "
@@ -1085,6 +1090,22 @@ class Hfss(object):
1085
1090
  )
1086
1091
 
1087
1092
  def _get_terminals_bbox(self, comp, l_inst, terminals_only):
1093
+ """Get component terminals bounding box (internal).
1094
+
1095
+ Parameters
1096
+ ----------
1097
+ comp : Component
1098
+ Component object.
1099
+ l_inst : LayoutObjInstance
1100
+ Layout object instance.
1101
+ terminals_only : bool
1102
+ Consider only terminals.
1103
+
1104
+ Returns
1105
+ -------
1106
+ PolygonData
1107
+ Bounding box polygon.
1108
+ """
1088
1109
  terms_loi = []
1089
1110
  if terminals_only:
1090
1111
  term_list = []
@@ -1108,28 +1129,23 @@ class Hfss(object):
1108
1129
 
1109
1130
  terms_bbox = []
1110
1131
  for loi in terms_loi:
1111
- # Need to account for the coax port dimension
1112
1132
  bb = loi.GetBBox()
1113
1133
  ll = [bb[0].x.value, bb[0].y.value]
1114
1134
  ur = [bb[1].x.value, bb[1].y.value]
1115
- # dim = 0.26 * max(abs(UR[0]-LL[0]), abs(UR[1]-LL[1])) # 0.25 corresponds to the default 0.5
1116
- # Radial Extent Factor, so set slightly larger to avoid validation errors
1117
- dim = 0.30 * max(abs(ur[0] - ll[0]), abs(ur[1] - ll[1])) # 0.25 corresponds to the default 0.5
1135
+ dim = 0.30 * max(abs(ur[0] - ll[0]), abs(ur[1] - ll[1]))
1118
1136
  terms_bbox.append(GrpcPolygonData([ll[0] - dim, ll[1] - dim, ur[0] + dim, ur[1] + dim]))
1119
1137
  return GrpcPolygonData.bbox_of_polygons(terms_bbox)
1120
1138
 
1121
1139
  def get_ports_number(self):
1122
- """Return the total number of excitation ports in a layout.
1140
+ """Get number of excitation ports.
1123
1141
 
1124
- Parameters
1125
- ----------
1126
- None
1142
+ .. deprecated:: 0.28.0
1143
+ Use :func:`pyedb.grpc.core.excitation.get_ports_number` instead.
1127
1144
 
1128
1145
  Returns
1129
1146
  -------
1130
1147
  int
1131
- Number of ports.
1132
-
1148
+ Number of ports.
1133
1149
  """
1134
1150
  warnings.warn(
1135
1151
  "`get_ports_number` is deprecated and is now located here "
@@ -1139,22 +1155,22 @@ class Hfss(object):
1139
1155
  self._pedb.excitations.get_ports_number()
1140
1156
 
1141
1157
  def layout_defeaturing(self, simulation_setup=None):
1142
- """Defeature the layout by reducing the number of points for polygons based on surface deviation criteria.
1158
+ """Defeature layout polygons (deprecated).
1143
1159
 
1144
- . deprecated:: pyedb 0.28.0
1145
- Use :func:
1146
- `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.layout_defeaturing`
1147
- instead.
1160
+ .. deprecated:: 0.28.0
1161
+ Use :func:
1162
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.layout_defeaturing`
1163
+ instead.
1148
1164
 
1149
1165
  Parameters
1150
1166
  ----------
1151
- simulation_setup : Edb_DATA.SimulationConfiguration object
1167
+ simulation_setup : HfssSimulationSetup, optional
1168
+ Simulation setup object.
1152
1169
 
1153
1170
  Returns
1154
1171
  -------
1155
1172
  bool
1156
- ``True`` when successful, ``False`` when failed.
1157
-
1173
+ True if successful, False otherwise.
1158
1174
  """
1159
1175
  warnings.warn(
1160
1176
  "`layout_defeaturing` is deprecated and is now located here "
@@ -1165,34 +1181,32 @@ class Hfss(object):
1165
1181
  self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.layout_defeaturing(simulation_setup)
1166
1182
 
1167
1183
  def create_rlc_boundary_on_pins(self, positive_pin=None, negative_pin=None, rvalue=0.0, lvalue=0.0, cvalue=0.0):
1168
- """Create hfss rlc boundary on pins.
1184
+ """Create RLC boundary on pins (deprecated).
1169
1185
 
1170
- . deprecated:: pyedb 0.28.0
1171
- Use :func:`pyedb.grpc.core.excitations.create_rlc_boundary_on_pins` instead.
1186
+ .. deprecated:: 0.28.0
1187
+ Use :func:`pyedb.grpc.core.excitations.create_rlc_boundary_on_pins` instead.
1172
1188
 
1173
1189
  Parameters
1174
1190
  ----------
1175
- positive_pin : Positive pin.
1176
- Edb.Cell.Primitive.PadstackInstance
1177
-
1178
- negative_pin : Negative pin.
1179
- Edb.Cell.Primitive.PadstackInstance
1180
-
1181
- rvalue : Resistance value
1182
-
1183
- lvalue : Inductance value
1184
-
1185
- cvalue . Capacitance value.
1191
+ positive_pin : Edb.Cell.Primitive.PadstackInstance, optional
1192
+ Positive pin.
1193
+ negative_pin : Edb.Cell.Primitive.PadstackInstance, optional
1194
+ Negative pin.
1195
+ rvalue : float, optional
1196
+ Resistance value.
1197
+ lvalue : float, optional
1198
+ Inductance value.
1199
+ cvalue : float, optional
1200
+ Capacitance value.
1186
1201
 
1187
1202
  Returns
1188
1203
  -------
1189
1204
  bool
1190
- ``True`` when successful, ``False`` when failed.
1191
-
1205
+ True if successful, False otherwise.
1192
1206
  """
1193
1207
  warnings.warn(
1194
1208
  "`create_rlc_boundary_on_pins` is deprecated and is now located here "
1195
- "`pyedb.grpc.core.create_rlc_boundary_on_pins.get_ports_number` instead.",
1209
+ "`pyedb.grpc.core.excitations.create_rlc_boundary_on_pins` instead.",
1196
1210
  DeprecationWarning,
1197
1211
  )
1198
1212
  return self._pedb.source_excitation.create_rlc_boundary_on_pins(
@@ -1208,34 +1222,37 @@ class Hfss(object):
1208
1222
  step_freq=1e6,
1209
1223
  discrete_sweep=False,
1210
1224
  ) -> HfssSimulationSetup:
1211
- """Add a HFSS analysis to EDB.
1225
+ """Add HFSS analysis setup.
1212
1226
 
1213
1227
  Parameters
1214
1228
  ----------
1215
1229
  name : str, optional
1216
- Setup name.
1217
- Sweep type. `"interpolating"` or `"discrete"`.
1230
+ Setup name (auto-generated if None).
1218
1231
  distribution : str, optional
1219
- Type of the sweep. The default is `"linear"`. Options are:
1220
- - `"linear"`
1221
- - `"linear_count"`
1222
- - `"decade_count"`
1223
- - `"octave_count"`
1224
- - `"exponential"`
1225
- start_freq : str, float, optional
1226
- Starting frequency. The default is ``0``.
1227
- stop_freq : str, float, optional
1228
- Stopping frequency. The default is ``20e9``.
1229
- step_freq : str, float, int, optional
1230
- Frequency step. The default is ``1e6``. or used for `"decade_count"`, "linear_count"`, "octave_count"`
1231
- distribution. Must be integer in that case.
1232
+ Sweep distribution type ("linear", "linear_count", "decade_count", "octave_count", "exponential").
1233
+ start_freq : float, str, optional
1234
+ Starting frequency (Hz).
1235
+ stop_freq : float, str, optional
1236
+ Stopping frequency (Hz).
1237
+ step_freq : float, str, int, optional
1238
+ Frequency step (Hz) or count depending on distribution.
1232
1239
  discrete_sweep : bool, optional
1233
- Whether the sweep is discrete. The default is ``False``.
1240
+ Use discrete sweep.
1234
1241
 
1235
1242
  Returns
1236
1243
  -------
1237
- :class:`HfssSimulationSetup`
1238
- Setup object class.
1244
+ HfssSimulationSetup
1245
+ Created setup object.
1246
+
1247
+ Examples
1248
+ --------
1249
+ >>> hfss_setup = edb.hfss.add_setup(
1250
+ ... name="MySetup",
1251
+ ... distribution="linear_count",
1252
+ ... start_freq=1e9,
1253
+ ... stop_freq=10e9,
1254
+ ... step_freq=100,
1255
+ ... )
1239
1256
  """
1240
1257
  from ansys.edb.core.simulation_setup.hfss_simulation_setup import (
1241
1258
  HfssSimulationSetup as GrpcHfssSimulationSetup,