pyedb 0.49.0__py3-none-any.whl → 0.50.1__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 (79) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_modeler.py +42 -11
  3. pyedb/configuration/cfg_ports_sources.py +9 -1
  4. pyedb/dotnet/database/cell/hierarchy/component.py +6 -6
  5. pyedb/dotnet/database/components.py +3 -3
  6. pyedb/dotnet/database/edb_data/padstacks_data.py +13 -0
  7. pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
  8. pyedb/dotnet/database/edb_data/variables.py +3 -3
  9. pyedb/dotnet/database/materials.py +16 -16
  10. pyedb/dotnet/database/modeler.py +38 -4
  11. pyedb/dotnet/database/sim_setup_data/data/settings.py +28 -0
  12. pyedb/dotnet/database/stackup.py +1 -0
  13. pyedb/dotnet/database/utilities/hfss_simulation_setup.py +5 -6
  14. pyedb/dotnet/edb.py +22 -20
  15. pyedb/extensions/__init__.py +0 -0
  16. pyedb/extensions/via_design_backend.py +681 -0
  17. pyedb/grpc/database/components.py +537 -686
  18. pyedb/grpc/database/control_file.py +458 -149
  19. pyedb/grpc/database/definition/component_def.py +17 -14
  20. pyedb/grpc/database/definition/materials.py +60 -60
  21. pyedb/grpc/database/definition/package_def.py +8 -8
  22. pyedb/grpc/database/definition/padstack_def.py +31 -33
  23. pyedb/grpc/database/definitions.py +6 -4
  24. pyedb/grpc/database/geometry/arc_data.py +5 -5
  25. pyedb/grpc/database/geometry/point_3d_data.py +3 -3
  26. pyedb/grpc/database/geometry/polygon_data.py +5 -5
  27. pyedb/grpc/database/hfss.py +399 -397
  28. pyedb/grpc/database/hierarchy/component.py +60 -58
  29. pyedb/grpc/database/hierarchy/pin_pair_model.py +6 -6
  30. pyedb/grpc/database/hierarchy/pingroup.py +13 -11
  31. pyedb/grpc/database/hierarchy/s_parameter_model.py +1 -1
  32. pyedb/grpc/database/hierarchy/spice_model.py +1 -1
  33. pyedb/grpc/database/layers/layer.py +2 -2
  34. pyedb/grpc/database/layers/stackup_layer.py +144 -44
  35. pyedb/grpc/database/layout/layout.py +12 -12
  36. pyedb/grpc/database/layout/voltage_regulator.py +8 -8
  37. pyedb/grpc/database/layout_validation.py +5 -5
  38. pyedb/grpc/database/modeler.py +248 -245
  39. pyedb/grpc/database/net/differential_pair.py +4 -4
  40. pyedb/grpc/database/net/extended_net.py +7 -8
  41. pyedb/grpc/database/net/net.py +57 -46
  42. pyedb/grpc/database/nets.py +139 -122
  43. pyedb/grpc/database/padstacks.py +174 -190
  44. pyedb/grpc/database/ports/ports.py +23 -17
  45. pyedb/grpc/database/primitive/padstack_instance.py +45 -30
  46. pyedb/grpc/database/primitive/path.py +7 -7
  47. pyedb/grpc/database/primitive/polygon.py +9 -9
  48. pyedb/grpc/database/primitive/primitive.py +21 -21
  49. pyedb/grpc/database/primitive/rectangle.py +1 -1
  50. pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +1 -1
  51. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  52. pyedb/grpc/database/simulation_setup/hfss_settings_options.py +1 -1
  53. pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +6 -6
  54. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +2 -2
  55. pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +2 -2
  56. pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +1 -1
  57. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +3 -3
  58. pyedb/grpc/database/siwave.py +166 -214
  59. pyedb/grpc/database/source_excitations.py +156 -0
  60. pyedb/grpc/database/stackup.py +415 -316
  61. pyedb/grpc/database/terminal/bundle_terminal.py +12 -12
  62. pyedb/grpc/database/terminal/edge_terminal.py +6 -5
  63. pyedb/grpc/database/terminal/padstack_instance_terminal.py +13 -13
  64. pyedb/grpc/database/terminal/pingroup_terminal.py +12 -12
  65. pyedb/grpc/database/terminal/point_terminal.py +6 -6
  66. pyedb/grpc/database/terminal/terminal.py +26 -26
  67. pyedb/grpc/database/utility/heat_sink.py +5 -5
  68. pyedb/grpc/database/utility/hfss_extent_info.py +21 -21
  69. pyedb/grpc/database/utility/layout_statistics.py +13 -13
  70. pyedb/grpc/database/utility/rlc.py +3 -3
  71. pyedb/grpc/database/utility/sources.py +1 -1
  72. pyedb/grpc/database/utility/sweep_data_distribution.py +1 -1
  73. pyedb/grpc/edb.py +524 -764
  74. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/METADATA +1 -1
  75. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/RECORD +77 -77
  76. pyedb/extensions/pre_layout_design_toolkit/via_design.py +0 -1151
  77. pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
  78. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/LICENSE +0 -0
  79. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/WHEEL +0 -0
pyedb/grpc/edb.py CHANGED
@@ -20,10 +20,40 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  # SOFTWARE.
22
22
 
23
- """This module contains the ``Edb`` class.
24
-
25
- This module is implicitly loaded in HFSS 3D Layout when launched.
26
-
23
+ """Provides the main interface for interacting with Ansys Electronics Desktop Database (EDB).
24
+
25
+ This module contains the ``Edb`` class which serves as the primary interface for:
26
+ - Creating and managing EDB projects
27
+ - Importing/exporting layout files
28
+ - Configuring stackups, materials, and components
29
+ - Setting up simulations (HFSS, SIwave, RaptorX)
30
+ - Performing cutout operations
31
+ - Generating ports and excitations
32
+ - Parametrizing designs
33
+ - Exporting to various formats (IPC2581, HFSS, Q3D)
34
+
35
+ Key Functionality:
36
+ - Database initialization and management
37
+ - Layout manipulation and cutout generation
38
+ - Material and stackup configuration
39
+ - Net and component management
40
+ - Simulation setup and execution
41
+ - Design parametrization and optimization
42
+
43
+ Examples
44
+ --------
45
+ Basic EDB initialization:
46
+ >>> from pyedb.grpc.edb import Edb
47
+ >>> edb = Edb(edbpath="myproject.aedb")
48
+
49
+ Importing a board file:
50
+ >>> edb.import_layout_file("my_board.brd")
51
+
52
+ Creating a cutout:
53
+ >>> edb.cutout(signal_list=["Net1", "Net2"], reference_list=["GND"])
54
+
55
+ Exporting to HFSS:
56
+ >>> edb.export_hfss(r"C:\output_folder")
27
57
  """
28
58
 
29
59
  from itertools import combinations
@@ -102,100 +132,60 @@ from pyedb.workflow import Workflow
102
132
 
103
133
 
104
134
  class Edb(EdbInit):
105
- """Provides the EDB application interface.
135
+ """Main class for interacting with Ansys Electronics Desktop Database (EDB).
106
136
 
107
- This module inherits all objects that belong to EDB.
137
+ Provides comprehensive control over EDB projects including:
138
+ - Project creation/management
139
+ - Layout import/export
140
+ - Material/stackup configuration
141
+ - Component/net management
142
+ - Simulation setup
143
+ - Cutout operations
144
+ - Parameterization
108
145
 
109
146
  Parameters
110
147
  ----------
111
- edbpath : str, optional
112
- Full path to the ``aedb`` folder. The variable can also contain
113
- the path to a layout to import. Allowed formats are BRD, MCM,
114
- XML (IPC2581), GDS, ODB++(TGZ and ZIP) and DXF. The default is ``None``.
115
- For GDS import, the Ansys control file (also XML) should have the same
116
- name as the GDS file. Only the file extension differs.
148
+ edbpath : str or Path, optional
149
+ Full path to AEDB folder or layout file to import. Supported formats:
150
+ BRD, MCM, XML (IPC2581), GDS, ODB++ (TGZ/ZIP), DXF.
151
+ Default creates new AEDB in documents folder.
117
152
  cellname : str, optional
118
- Name of the cell to select. The default is ``None``.
153
+ Specific cell to open. Default opens first cell.
119
154
  isreadonly : bool, optional
120
- Whether to open EBD in read-only mode when it is
121
- owned by HFSS 3D Layout. The default is ``False``.
155
+ Open in read-only mode. Default False.
122
156
  edbversion : str, int, float, optional
123
- Version of EDB to use. The default is ``None``.
124
- Examples of input values are ``232``, ``23.2``, ``2023.2``, ``"2023.2"``.
157
+ EDB version (e.g., "2023.2", 232, 23.2). Default uses latest.
125
158
  isaedtowned : bool, optional
126
- Whether to launch EDB from HFSS 3D Layout. The
127
- default is ``False``.
128
- oproject : optional
129
- Reference to the AEDT project object.
159
+ Launch from HFSS 3D Layout. Default False.
160
+ oproject : object, optional
161
+ Reference to AEDT project object.
130
162
  student_version : bool, optional
131
- Whether to open the AEDT student version. The default is ``False.``
163
+ Use student version. Default False.
164
+ use_ppe : bool, optional
165
+ Use PPE license. Default False.
132
166
  control_file : str, optional
133
- Path to the XML file. The default is ``None``, in which case an attempt is made to find
134
- the XML file in the same directory as the board file. To succeed, the XML file and board file
135
- must have the same name. Only the extension differs.
167
+ XML control file path for import.
136
168
  map_file : str, optional
137
- Layer map .map file.
169
+ Layer map file for import.
138
170
  technology_file : str, optional
139
- Full path to technology file to be converted to xml before importing or xml.
140
- Supported by GDS format only.
141
- layer_filter:str,optional
142
- Layer filter .txt file.
171
+ Technology file for import (GDS only).
172
+ layer_filter : str, optional
173
+ Layer filter file for import.
174
+ remove_existing_aedt : bool, optional
175
+ Remove existing AEDT project files. Default False.
143
176
  restart_rpc_server : bool, optional
144
- ``True`` RPC server is terminated and restarted. This will close all open EDB. RPC server is running on single
145
- instance loading all EDB, enabling this option should be used with caution but can be a solution to release
146
- memory in case the server is draining resources. Default value is ``False``.
177
+ Restart gRPC server. Use with caution. Default False.
147
178
 
148
179
  Examples
149
180
  --------
150
- Create :class:`Edb <pyedb.grpc.edb.Edb>` object.
151
-
152
- >>> from pyedb.grpc.edb import Edb as Edb
153
- >>> app = Edb()
154
-
155
- Add a new variable named "s1" to the ``Edb`` instance.
156
-
157
- >>> app['s1'] = "0.25 mm"
158
- >>> app['s1']
159
- >>> 0.00025
160
-
161
- Create an ``Edb`` object and open the specified project.
162
-
163
- >>> app = Edb(edbpath="myfile.aedb")
164
-
165
- Create an ``Edb`` object from GDS and control files.
166
- The XML control file resides in the same directory as the GDS file: (myfile.xml).
167
-
168
- >>> app = Edb("/path/to/file/myfile.gds")
169
-
170
- Loading Ansys layout
171
-
172
- >>> from ansys.aedt.core.generic.general_methods import generate_unique_folder_name
173
- >>> import pyedb.misc.downloads as downloads
174
- >>> temp_folder = generate_unique_folder_name()
175
- >>> targetfile = downloads.download_file("edb/ANSYS-HSD_V1.aedb", destination=temp_folder)
176
- >>> from pyedb.grpc.edb import Edb as Edb
177
- >>> edbapp = Edb(edbpath=targetfile)
178
-
179
- Retrieving signal nets dictionary
180
-
181
- >>> edbapp.nets.signal
182
-
183
- Retrieving layers
184
-
185
- >>> edbapp.stackup.layers
186
-
187
- Retrieving all component instances
188
-
189
- >>> edbapp.components.instances
190
-
191
- Retrieving all padstacks definitions
192
-
193
- >>> edbapp.padstacks.definitions
194
-
195
- Retrieving component pins
181
+ Create new EDB:
182
+ >>> edb = Edb()
196
183
 
197
- >>> edbapp.components["U1"].pins
184
+ Open existing AEDB:
185
+ >>> edb = Edb("myproject.aedb")
198
186
 
187
+ Import board file:
188
+ >>> edb = Edb("my_board.brd")
199
189
  """
200
190
 
201
191
  def __init__(
@@ -309,38 +299,39 @@ class Edb(EdbInit):
309
299
  self._layout_instance = None
310
300
 
311
301
  def __enter__(self):
302
+ """Context manager entry."""
312
303
  return self
313
304
 
314
305
  def __exit__(self, ex_type, ex_value, ex_traceback):
306
+ """Context manager exit. Closes EDB and cleans up resources."""
315
307
  self._signal_handler(ex_type, ex_value)
316
308
 
317
309
  def __getitem__(self, variable_name):
318
- """Get a variable to the Edb project. The variable can be project using ``$`` prefix or
319
- it can be a design variable, in which case the ``$`` is omitted.
310
+ """Get project or design variable value.
320
311
 
321
312
  Parameters
322
313
  ----------
323
314
  variable_name : str
315
+ Variable name with '$' for project variables.
324
316
 
325
317
  Returns
326
318
  -------
327
- variable object.
328
-
319
+ float or None
320
+ Variable value if exists, else None.
329
321
  """
330
322
  if self.variable_exists(variable_name):
331
323
  return self.variables[variable_name]
332
324
  return
333
325
 
334
326
  def __setitem__(self, variable_name, variable_value):
335
- """Set a variable to the Edb project. The variable can be project using ``$`` prefix or
336
- it can be a design variable, in which case the ``$`` is omitted.
327
+ """Set project or design variable.
337
328
 
338
329
  Parameters
339
330
  ----------
340
331
  variable_name : str
341
- variable name.
342
- variable_value : str, float, int.
343
- variable value.
332
+ Variable name (with '$' prefix for project variables).
333
+ variable_value : str, float, int, list/tuple
334
+ Value with units. List/tuple format: [value, description]
344
335
  """
345
336
  type_error_message = "Allowed values are str, numeric or two-item list with variable description."
346
337
  if type(variable_value) in [
@@ -418,54 +409,57 @@ class Edb(EdbInit):
418
409
  self._extended_nets = ExtendedNets(self)
419
410
 
420
411
  @property
421
- def cell_names(self):
422
- """Cell name container.
412
+ def cell_names(self) -> [str]:
413
+ """List of all cell names in the database.
423
414
 
424
415
  Returns
425
416
  -------
426
- list of cell names : List[str]
417
+ list[str]
418
+ Names of all circuit cells.
427
419
  """
428
420
  return [cell.name for cell in self.active_db.top_circuit_cells]
429
421
 
430
422
  @property
431
- def design_variables(self):
432
- """Get all edb design variables.
423
+ def design_variables(self) -> dict[str, float]:
424
+ """All design variables in active cell.
433
425
 
434
426
  Returns
435
427
  -------
436
- variable dictionary : Dict[str, variable_name: float, variable_value]
428
+ dict[str, float]
429
+ Variable names and values.
437
430
  """
438
431
  return {i: self.active_cell.get_variable_value(i).value for i in self.active_cell.get_all_variable_names()}
439
432
 
440
433
  @property
441
- def project_variables(self):
442
- """Get all project variables.
434
+ def project_variables(self) -> dict[str, float]:
435
+ """All project variables in database.
443
436
 
444
437
  Returns
445
438
  -------
446
- variables dictionary : Dict[str, variable_name: float, variable_value]
447
-
439
+ dict[str, float]
440
+ Variable names and values.
448
441
  """
449
442
  return {i: self.active_db.get_variable_value(i).value for i in self.active_db.get_all_variable_names()}
450
443
 
451
444
  @property
452
- def layout_validation(self):
453
- """Return LayoutValidation object.
445
+ def layout_validation(self) -> LayoutValidation:
446
+ """Layout validation utilities.
454
447
 
455
448
  Returns
456
449
  -------
457
450
  :class:`LayoutValidation <pyedb.grpc.database.layout_validation.LayoutValidation>`
451
+ Tools for design rule checking and layout validation.
458
452
  """
459
453
  return LayoutValidation(self)
460
454
 
461
455
  @property
462
- def variables(self):
463
- """Get all Edb variables.
456
+ def variables(self) -> dict[str, float]:
457
+ """All variables (project + design) in database.
464
458
 
465
459
  Returns
466
460
  -------
467
- variables dictionary : Dict[str: float]
468
-
461
+ dict[str, float]
462
+ Combined dictionary of all variables.
469
463
  """
470
464
  all_vars = dict()
471
465
  for i, j in self.project_variables.items():
@@ -475,24 +469,25 @@ class Edb(EdbInit):
475
469
  return all_vars
476
470
 
477
471
  @property
478
- def terminals(self):
479
- """Get terminals belonging to active layout.
472
+ def terminals(self) -> dict[str, Terminal]:
473
+ """Terminals in active layout.
480
474
 
481
475
  Returns
482
476
  -------
483
- Dict : Dict[str: :class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`],
477
+ dict[str, :class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`]
478
+ Terminal names and objects.
484
479
  """
485
480
  return {i.name: i for i in self.layout.terminals}
486
481
 
487
482
  @property
488
- def excitations(self):
489
- """Get all layout excitations.
483
+ def excitations(self) -> dict[str, GapPort]:
484
+ """All layout excitations.
490
485
 
491
486
  Returns
492
487
  -------
493
- Dict: Dict[str: :class:`<pyedb.grpc.database.port.GapPort>`]
488
+ dict[str, :class:`GapPort <pyedb.grpc.database.ports.ports.GapPort>`]
489
+ Excitation names and objects.
494
490
  """
495
-
496
491
  terms = [term for term in self.layout.terminals if term.boundary_type == "port"]
497
492
  temp = {}
498
493
  for term in terms:
@@ -503,14 +498,13 @@ class Edb(EdbInit):
503
498
  return temp
504
499
 
505
500
  @property
506
- def ports(self):
507
- """Get all ports.
501
+ def ports(self) -> dict[str, GapPort]:
502
+ """All ports in design.
508
503
 
509
504
  Returns
510
505
  -------
511
- port dictionary : Dict[str: :class:`GapPort <pyedb.grpc.database.ports.GapPort>` or
512
- :class:`WavePort <pyedb.grpc.database.ports.WavePort>`]
513
-
506
+ dict[str, Union[:class:`GapPort`, :class:`WavePort`, :class:`CoaxPort`]]
507
+ Port names and objects.
514
508
  """
515
509
  terminals = [term for term in self.layout.terminals if not term.is_reference_terminal]
516
510
  ports = {}
@@ -537,35 +531,35 @@ class Edb(EdbInit):
537
531
  return ports
538
532
 
539
533
  @property
540
- def excitations_nets(self):
541
- """Get all net names with excitation defined.
534
+ def excitations_nets(self) -> [str]:
535
+ """Nets with excitations defined.
542
536
 
543
537
  Returns
544
538
  -------
545
- List[str]
546
- List of net name.
539
+ list[str]
540
+ Net names with excitations.
547
541
  """
548
542
  return list(set([i.net.name for i in self.layout.terminals if not i.is_reference_terminal]))
549
543
 
550
544
  @property
551
- def sources(self):
552
- """Get all layout sources.
545
+ def sources(self) -> dict[str, Terminal]:
546
+ """All layout sources.
553
547
 
554
548
  Returns
555
549
  -------
556
- Dict: Dic[str, :class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`]
550
+ dict[str, :class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`]
551
+ Source names and objects.
557
552
  """
558
553
  return self.terminals
559
554
 
560
555
  @property
561
556
  def voltage_regulator_modules(self):
562
- """Get all voltage regulator modules
557
+ """Voltage regulator modules in design.
563
558
 
564
559
  Returns
565
560
  -------
566
- List of voltage regulator modules.
567
- List[:class:`VoltageRegulator <pyedb.grpc.database.layout.voltage_regulator.VoltageRegulator>`]
568
-
561
+ dict[str, :class:`VoltageRegulator <pyedb.grpc.database.layout.voltage_regulator.VoltageRegulator>`]
562
+ VRM names and objects.
569
563
  """
570
564
  vrms = self.layout.voltage_regulators
571
565
  _vrms = {}
@@ -574,23 +568,24 @@ class Edb(EdbInit):
574
568
  return _vrms
575
569
 
576
570
  @property
577
- def probes(self):
578
- """Get all layout probes.
571
+ def probes(self) -> dict[str, Terminal]:
572
+ """All layout probes.
579
573
 
580
574
  Returns
581
575
  -------
582
- Dictionary of probes.
583
- Dict[str, :class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`
576
+ dict[str, :class:`Terminal <pyedb.grpc.database.terminal.terminal.Terminal>`]
577
+ Probe names and objects.
584
578
  """
585
579
  terms = [term for term in self.layout.terminals if term.boundary_type.value == 8]
586
580
  return {ter.name: ter for ter in terms}
587
581
 
588
- def open_edb(self, restart_rpc_server=False, kill_all_instances=False):
589
- """Open EDB.
582
+ def open_edb(self, restart_rpc_server=False) -> bool:
583
+ """Open EDB database.
590
584
 
591
585
  Returns
592
586
  -------
593
- bool: `True` when succeed `False` if failed.
587
+ bool
588
+ True if successful, False otherwise.
594
589
  """
595
590
  self.standalone = self.standalone
596
591
  n_try = 10
@@ -626,12 +621,13 @@ class Edb(EdbInit):
626
621
  self.logger.error("Builder was not initialized.")
627
622
  return True
628
623
 
629
- def create_edb(self, restart_rpc_server=False, kill_all_instances=False):
630
- """Create EDB.
624
+ def create_edb(self, restart_rpc_server=False) -> bool:
625
+ """Create new EDB database.
631
626
 
632
627
  Returns
633
628
  -------
634
- bool: `True` when succeed `False` if failed.
629
+ bool
630
+ True if successful, False otherwise.
635
631
  """
636
632
  from ansys.edb.core.layout.cell import Cell as GrpcCell
637
633
  from ansys.edb.core.layout.cell import CellType as GrpcCellType
@@ -669,38 +665,33 @@ class Edb(EdbInit):
669
665
  tech_file=None,
670
666
  layer_filter=None,
671
667
  ):
672
- """Import a board file and generate an ``edb.def`` file in the working directory.
668
+ """Import layout file and generate AEDB.
673
669
 
674
- .. deprecated:: 0.42.0
675
- Use :func:`import_layout_file` method instead.
676
-
677
- This function supports all AEDT formats, including DXF, GDS, SML (IPC2581), BRD, MCM, SIP, ZIP and TGZ.
670
+ Supported formats: BRD, MCM, XML (IPC2581), GDS, ODB++ (TGZ/ZIP), DXF
678
671
 
679
672
  Parameters
680
673
  ----------
681
674
  input_file : str
682
- Full path to the board file.
675
+ Full path to input file.
683
676
  working_dir : str, optional
684
- Directory in which to create the ``aedb`` folder. The name given to the AEDB file
685
- is the same as the name of the board file.
677
+ Output directory for AEDB.
686
678
  anstranslator_full_path : str, optional
687
- Full path to the Ansys translator. The default is ``""``.
688
- use_ppe : bool
689
- Whether to use the PPE License. The default is ``False``.
679
+ Path to Ansys translator executable.
680
+ use_ppe : bool, optional
681
+ Use PPE license. Default False.
690
682
  control_file : str, optional
691
- Path to the XML file. The default is ``None``, in which case an attempt is made to find
692
- the XML file in the same directory as the board file. To succeed, the XML file and board file
693
- must have the same name. Only the extension differs.
683
+ XML control file path.
694
684
  tech_file : str, optional
695
- Technology file. The file can be *.ircx, *.vlc.tech, or *.itf
685
+ Technology file path.
696
686
  map_file : str, optional
697
- Layer map .map file.
698
- layer_filter:str,optional
699
- Layer filter .txt file.
687
+ Layer map file path.
688
+ layer_filter : str, optional
689
+ Layer filter file path.
700
690
 
701
691
  Returns
702
692
  -------
703
- Full path to the AEDB file : str
693
+ str or bool
694
+ AEDB path if successful, False otherwise.
704
695
  """
705
696
  self.logger.warning("import_layout_pcb method is deprecated, use import_layout_file instead.")
706
697
  return self.import_layout_file(
@@ -801,30 +792,20 @@ class Edb(EdbInit):
801
792
  self.edbpath = os.path.join(working_dir, aedb_name)
802
793
  return self.open_edb()
803
794
 
804
- def export_to_ipc2581(self, ipc_path=None, units="MILLIMETER"):
805
- """Create an XML IPC2581 file from the active EDB.
806
-
807
- .. note::
808
- The method works only in CPython because of some limitations on Ironpython in XML parsing and
809
- because it's time-consuming.
810
- This method is still being tested and may need further debugging.
811
- Any feedback is welcome. Back drills and custom pads are not supported yet.
795
+ def export_to_ipc2581(self, ipc_path=None, units="MILLIMETER") -> str:
796
+ """Export design to IPC2581 format.
812
797
 
813
798
  Parameters
814
799
  ----------
815
800
  ipc_path : str, optional
816
- Path to the XML IPC2581 file. The default is ``None``, in which case
817
- an attempt is made to find the XML IPC2581 file in the same directory
818
- as the active EDB. To succeed, the XML IPC2581 file and the active
819
- EDT must have the same name. Only the extension differs.
801
+ Output XML file path. Default: <edb_path>.xml.
820
802
  units : str, optional
821
- Units of the XML IPC2581 file. Options are ``"millimeter"``,
822
- ``"inch"``, and ``"micron"``. The default is ``"millimeter"``.
803
+ Output units ("millimeter", "inch", "micron"). Default millimeter.
823
804
 
824
805
  Returns
825
806
  -------
826
- bool: `True` if successful, `False` if failed.
827
-
807
+ str or bool
808
+ Output file path if successful, False otherwise.
828
809
  """
829
810
  if units.lower() not in ["millimeter", "inch", "micron"]: # pragma no cover
830
811
  self.logger.warning("The wrong unit is entered. Setting to the default, millimeter.")
@@ -847,31 +828,27 @@ class Edb(EdbInit):
847
828
  return False
848
829
 
849
830
  @property
850
- def configuration(self):
851
- """Edb project configuration from a file.
831
+ def configuration(self) -> Configuration:
832
+ """Project configuration manager.
852
833
 
853
834
  Returns
854
835
  -------
855
- :class:`Configuration <pyedb.configuration.configuration.Configuration>`.
836
+ :class:`Configuration <pyedb.configuration.configuration.Configuration>`
837
+ Configuration file interface.
856
838
  """
857
839
  if not self._configuration:
858
840
  self._configuration = Configuration(self)
859
841
  return self._configuration
860
842
 
861
843
  def edb_exception(self, ex_value, tb_data):
862
- """Write the trace stack to AEDT when a Python error occurs.
844
+ """Log Python exceptions to EDB logger.
863
845
 
864
846
  Parameters
865
847
  ----------
866
- ex_value :
867
-
868
- tb_data :
869
-
870
-
871
- Returns
872
- -------
873
- None
874
-
848
+ ex_value : Exception
849
+ Exception value.
850
+ tb_data : traceback
851
+ Traceback object.
875
852
  """
876
853
  tb_trace = traceback.format_tb(tb_data)
877
854
  tblist = tb_trace[0].split("\n")
@@ -881,26 +858,40 @@ class Edb(EdbInit):
881
858
 
882
859
  @property
883
860
  def active_db(self):
884
- """Database object.
861
+ """Active database object.
885
862
 
886
863
  Returns
887
864
  -------
888
- :class:`Database <ansys.edb.core.database.Database>`.
865
+ :class:`ansys.edb.core.database.Database`
866
+ Current database instance.
889
867
  """
890
868
  return self.db
891
869
 
892
870
  @property
893
871
  def active_cell(self):
894
- """Active cell.
872
+ """Active cell in the database.
895
873
 
896
874
  Returns
897
875
  -------
898
- :class:`Cell <ansys.edb.core.layout.cell.Cell>`.
876
+ :class:`ansys.edb.core.layout.cell.Cell`
877
+ Currently active cell.
899
878
  """
900
879
  return self._active_cell
901
880
 
902
881
  @active_cell.setter
903
882
  def active_cell(self, value):
883
+ """Set active cell by name or object.
884
+
885
+ Parameters
886
+ ----------
887
+ value : str or ansys.edb.core.layout.cell.Cell
888
+ Cell name or object to set as active.
889
+
890
+ Raises
891
+ ------
892
+ ValueError
893
+ If cell not found in database.
894
+ """
904
895
  if isinstance(value, str):
905
896
  _cell = [cell for cell in self.circuit_cells if cell.name == value]
906
897
  if _cell:
@@ -917,270 +908,206 @@ class Edb(EdbInit):
917
908
  raise "No valid design."
918
909
 
919
910
  @property
920
- def components(self):
921
- """Edb Components methods and properties.
911
+ def components(self) -> Components:
912
+ """Component management interface.
922
913
 
923
914
  Returns
924
915
  -------
925
- :class:`Components <pyedb.grpc.database.components.Components>`.
926
-
927
- Examples
928
- --------
929
- >>> from pyedb import Edb
930
- >>> edbapp = Edb("myproject.aedb")
931
- >>> comp = edbapp.components.get_component_by_name("J1")
916
+ :class:`Components <pyedb.grpc.database.components.Components>`
917
+ Component manipulation tools.
932
918
  """
933
919
  if not self._components and self.active_db:
934
920
  self._components = Components(self)
935
921
  return self._components
936
922
 
937
923
  @property
938
- def stackup(self):
939
- """Stackup manager.
924
+ def stackup(self) -> Stackup:
925
+ """Stackup management interface.
940
926
 
941
927
  Returns
942
928
  -------
943
929
  :class:`Stackup <pyedb.grpc.database.stackup.Stackup>`
944
-
945
- Examples
946
- --------
947
- >>> from pyedb.grpc.edb import Edb
948
- >>> edbapp = Edb("myproject.aedb")
949
- >>> edbapp.stackup.layers["TOP"].thickness = 4e-5
950
- >>> edbapp.stackup.layers["TOP"].thickness == 4e-05
951
- >>> edbapp.stackup.add_layer("Diel", "GND", layer_type="dielectric", thickness="0.1mm", material="FR4_epoxy")
930
+ Layer stack configuration tools.
952
931
  """
953
932
  if self.active_db:
954
933
  self._stackup = Stackup(self, self.active_cell.layout.layer_collection)
955
934
  return self._stackup
956
935
 
957
936
  @property
958
- def source_excitation(self):
959
- """Returns layout source excitations.
937
+ def source_excitation(self) -> SourceExcitation:
938
+ """Source excitation management.
960
939
 
961
940
  Returns
962
941
  -------
963
- :class:`SourceExcitation <pyedb.grpc.database.source_excitations.SourceExcitation>`.
942
+ :class:`SourceExcitation <pyedb.grpc.database.source_excitations.SourceExcitation>`
943
+ Source and port creation tools.
964
944
  """
965
945
  if self.active_db:
966
946
  return self._source_excitation
967
947
 
968
948
  @property
969
- def materials(self):
970
- """Material Database.
949
+ def materials(self) -> Materials:
950
+ """Material database interface.
971
951
 
972
952
  Returns
973
953
  -------
974
- :class:`Materials <pyedb.grpc.database.definition.materials.Materials>`.
975
-
976
- Examples
977
- --------
978
- >>> from pyedb import Edb
979
- >>> edbapp = Edb()
980
- >>> edbapp.materials.add_material("air", permittivity=1.0)
981
- >>> edbapp.materials.add_debye_material("debye_mat", 5, 3, 0.02, 0.05, 1e5, 1e9)
982
- >>> edbapp.materials.add_djordjevicsarkar_material("djord_mat", 3.3, 0.02, 3.3)
954
+ :class:`Materials <pyedb.grpc.database.definition.materials.Materials>`
955
+ Material definition and management.
983
956
  """
984
957
  if self.active_db:
985
958
  self._materials = Materials(self)
986
959
  return self._materials
987
960
 
988
961
  @property
989
- def padstacks(self):
990
- """Returns padstack object.
991
-
962
+ def padstacks(self) -> Padstacks:
963
+ """Padstack management interface.
992
964
 
993
965
  Returns
994
966
  -------
995
- :class:`Padstacks <pyedb.grpc.database.padstack.Padstacks>`.
996
-
997
- Examples
998
- --------
999
- >>> from pyedb import Edb
1000
- >>> edbapp = Edb("myproject.aedb")
1001
- >>> p = edbapp.padstacks.create(padstackname="myVia_bullet", antipad_shape="Bullet")
1002
- >>> edbapp.padstacks.get_pad_parameters(
1003
- >>> ... p, "TOP", edbapp.padstacks.pad_type.RegularPad
1004
- >>> ... )
967
+ :class:`Padstacks <pyedb.grpc.database.padstack.Padstacks>`
968
+ Padstack definition and editing.
1005
969
  """
1006
-
1007
970
  if not self._padstack and self.active_db:
1008
971
  self._padstack = Padstacks(self)
1009
972
  return self._padstack
1010
973
 
1011
974
  @property
1012
- def siwave(self):
1013
- """Returns SIWave object.
975
+ def siwave(self) -> Siwave:
976
+ """SIwave simulation interface.
1014
977
 
1015
978
  Returns
1016
979
  -------
1017
- :class:`Siwave <pyedb.grpc.database.siwave.Siwave>`.
1018
-
1019
- Examples
1020
- --------
1021
- >>> from pyedb import Edb
1022
- >>> edbapp = Edb("myproject.aedb")
1023
- >>> p2 = edbapp.siwave.create_circuit_port_on_net("U2A5", "V3P3_S0", "U2A5", "GND", 50, "test")
980
+ :class:`Siwave <pyedb.grpc.database.siwave.Siwave>`
981
+ SIwave analysis setup tools.
1024
982
  """
1025
983
  if not self._siwave and self.active_db:
1026
984
  self._siwave = Siwave(self)
1027
985
  return self._siwave
1028
986
 
1029
987
  @property
1030
- def hfss(self):
1031
- """Returns HFSS object.
988
+ def hfss(self) -> Hfss:
989
+ """HFSS simulation interface.
1032
990
 
1033
991
  Returns
1034
992
  -------
1035
- :class:`Hfss <pyedb.grpc.database.hfss.Hfss>`.
1036
-
1037
- Examples
1038
- --------
1039
- >>> from pyedb import Edb
1040
- >>> edbapp = Edb("myproject.aedb")
1041
- >>> sim_config = edbapp.new_simulation_configuration()
1042
- >>> sim_config.mesh_freq = "10Ghz"
1043
- >>> edbapp.hfss.configure_hfss_analysis_setup(sim_config)
993
+ :class:`Hfss <pyedb.grpc.database.hfss.Hfss>`
994
+ HFSS analysis setup tools.
1044
995
  """
1045
996
  if not self._hfss and self.active_db:
1046
997
  self._hfss = Hfss(self)
1047
998
  return self._hfss
1048
999
 
1049
1000
  @property
1050
- def nets(self):
1051
- """Returns nets object.
1001
+ def nets(self) -> Nets:
1002
+ """Net management interface.
1052
1003
 
1053
1004
  Returns
1054
1005
  -------
1055
- :class:`Nets <pyedb.grpc.database.nets.Nets>`.
1056
-
1057
- Examples
1058
- --------
1059
- >>> from pyedb import Edb
1060
- >>> edbapp = Edb"myproject.aedb")
1061
- >>> edbapp.nets.find_or_create_net("GND")
1062
- >>> edbapp.nets.find_and_fix_disjoint_nets("GND", keep_only_main_net=True)
1006
+ :class:`Nets <pyedb.grpc.database.nets.Nets>`
1007
+ Net manipulation tools.
1063
1008
  """
1064
-
1065
1009
  if not self._nets and self.active_db:
1066
1010
  self._nets = Nets(self)
1067
1011
  return self._nets
1068
1012
 
1069
1013
  @property
1070
- def net_classes(self):
1071
- """Returns net classes object.
1014
+ def net_classes(self) -> NetClass:
1015
+ """Net class management.
1072
1016
 
1073
1017
  Returns
1074
1018
  -------
1075
- :class:`NetClass <pyedb.grpc.database.net.net_class.NetClass>`.
1076
-
1077
- Examples
1078
- --------
1079
- >>> from pyedb import Edb
1080
- >>> edbapp = Edb("myproject.aedb")
1081
- >>> edbapp.net_classes
1019
+ dict[str, :class:`NetClass <pyedb.grpc.database.net.net_class.NetClass>`]
1020
+ Net class names and objects.
1082
1021
  """
1083
-
1084
1022
  if self.active_db:
1085
1023
  return {net.name: NetClass(self, net) for net in self.active_layout.net_classes}
1086
1024
 
1087
1025
  @property
1088
- def extended_nets(self):
1089
- """Returns extended nets.
1026
+ def extended_nets(self) -> ExtendedNets:
1027
+ """Extended net management.
1090
1028
 
1091
1029
  Returns
1092
1030
  -------
1093
- :class:`ExtendedNets <pyedb.grpc.database.net.extended_net.ExtendedNets>`.
1094
-
1095
- Examples
1096
- --------
1097
- >>> from pyedb import Edb
1098
- >>> edbapp = Edb("myproject.aedb")
1099
- >>> edbapp.extended_nets
1031
+ :class:`ExtendedNets <pyedb.grpc.database.net.extended_net.ExtendedNets>`
1032
+ Extended net tools.
1100
1033
  """
1101
-
1102
1034
  if not self._extended_nets:
1103
1035
  self._extended_nets = ExtendedNets(self)
1104
1036
  return self._extended_nets
1105
1037
 
1106
1038
  @property
1107
- def differential_pairs(self):
1108
- """Returns differential pairs.
1039
+ def differential_pairs(self) -> DifferentialPairs:
1040
+ """Differential pair management.
1109
1041
 
1110
1042
  Returns
1111
1043
  -------
1112
- :class:`DifferentialPairs <pyedb.grpc.database.net.differential_par.DifferentialPairs>`.
1113
-
1114
- Examples
1115
- --------
1116
- >>> from pyedb import Edb
1117
- >>> edbapp = Edb("myproject.aedb")
1118
- >>> edbapp.differential_pairs
1044
+ :class:`DifferentialPairs <pyedb.grpc.database.net.differential_par.DifferentialPairs>`
1045
+ Differential pair tools.
1119
1046
  """
1120
1047
  if not self._differential_pairs and self.active_db:
1121
1048
  self._differential_pairs = DifferentialPairs(self)
1122
1049
  return self._differential_pairs
1123
1050
 
1124
1051
  @property
1125
- def modeler(self):
1126
- """Returns primitives modeler object.
1052
+ def modeler(self) -> Modeler:
1053
+ """Geometry modeling interface.
1127
1054
 
1128
1055
  Returns
1129
1056
  -------
1130
- :class:`Modeler <pyedb.grpc.database.modeler.Modeler>`.
1131
-
1132
- Examples
1133
- --------
1134
- >>> from pyedb import Edb
1135
- >>> edbapp = Edb("myproject.aedb")
1136
- >>> top_prims = edbapp.modeler.primitives_by_layer["TOP"]
1057
+ :class:`Modeler <pyedb.grpc.database.modeler.Modeler>`
1058
+ Geometry creation and editing.
1137
1059
  """
1138
1060
  if not self._modeler and self.active_db:
1139
1061
  self._modeler = Modeler(self)
1140
1062
  return self._modeler
1141
1063
 
1142
1064
  @property
1143
- def layout(self):
1144
- """Returns Layout object.
1065
+ def layout(self) -> Layout:
1066
+ """Layout access interface.
1145
1067
 
1146
1068
  Returns
1147
1069
  -------
1148
- :class:`Layout <pyedb.grpc.database.layout.layout.Layout>`.
1070
+ :class:`Layout <pyedb.grpc.database.layout.layout.Layout>`
1071
+ Layout manipulation tools.
1149
1072
  """
1150
1073
  return Layout(self)
1151
1074
 
1152
1075
  @property
1153
- def active_layout(self):
1154
- """Active layout.
1076
+ def active_layout(self) -> Layout:
1077
+ """Active layout access.
1155
1078
 
1156
1079
  Returns
1157
1080
  -------
1158
- :class:`Layout <pyedb.grpc.database.layout.layout.Layout>`.
1081
+ :class:`Layout <pyedb.grpc.database.layout.layout.Layout>`
1082
+ Current layout tools.
1159
1083
  """
1160
1084
  return self.layout
1161
1085
 
1162
1086
  @property
1163
1087
  def layout_instance(self):
1164
- """Returns Layout Instance object.
1088
+ """Layout instance object.
1165
1089
 
1166
1090
  Returns
1167
1091
  -------
1168
1092
  :class:`LayoutInstance <ansys.edb.core.layout_instance.layout_instance.LayoutInstance>`
1093
+ Current layout instance.
1169
1094
  """
1170
1095
  if not self._layout_instance:
1171
1096
  self._layout_instance = self.layout.layout_instance
1172
1097
  return self._layout_instance
1173
1098
 
1174
1099
  def get_connected_objects(self, layout_object_instance):
1175
- """Returns connected objects.
1100
+ """Get objects connected to a layout object.
1101
+
1102
+ Parameters
1103
+ ----------
1104
+ layout_object_instance :
1105
+ Target layout object.
1176
1106
 
1177
1107
  Returns
1178
1108
  -------
1179
- list[:class:`PadstackInstance <pyedb.grpc.database.primitive.padstack_instance.PadstackInstance>`,
1180
- :class:`Path <pyedb.grpc.database.primitive.path.Path>`,
1181
- :class:`Rectangle <pyedb.grpc.database.primitive.rectangle.Rectangle>`,
1182
- :class:`Circle <pyedb.grpc.database.primitive.circle.Circle>`,
1183
- :class:`Polygon <pyedb.grpc.database.primitive.polygon.Polygon>`]
1109
+ list
1110
+ Connected objects (padstacks, paths, polygons, etc.).
1184
1111
  """
1185
1112
  from ansys.edb.core.terminal.padstack_instance_terminal import (
1186
1113
  PadstackInstanceTerminal as GrpcPadstackInstanceTerminal,
@@ -1213,39 +1140,40 @@ class Edb(EdbInit):
1213
1140
  return temp
1214
1141
 
1215
1142
  def point_3d(self, x, y, z=0.0):
1216
- """Compute the Edb 3d Point Data.
1143
+ """Create 3D point.
1217
1144
 
1218
1145
  Parameters
1219
1146
  ----------
1220
- x : float, int or str
1221
- X value.
1222
- y : float, int or str
1223
- Y value.
1224
- z : float, int or str, optional
1225
- Z value.
1147
+ x : float, int, str
1148
+ X coordinate.
1149
+ y : float, int, str
1150
+ Y coordinate.
1151
+ z : float, int, str, optional
1152
+ Z coordinate.
1226
1153
 
1227
1154
  Returns
1228
1155
  -------
1229
1156
  :class:`Point3DData <pyedb.grpc.database.geometry.point_3d_data.Point3DData>`
1157
+ 3D point object.
1230
1158
  """
1231
1159
  from pyedb.grpc.database.geometry.point_3d_data import Point3DData
1232
1160
 
1233
1161
  return Point3DData(x, y, z)
1234
1162
 
1235
1163
  def point_data(self, x, y=None):
1236
- """Compute the Edb Point Data.
1164
+ """Create 2D point.
1237
1165
 
1238
1166
  Parameters
1239
1167
  ----------
1240
- x : float, int or str
1241
- X value.
1242
- y : float, int or str, optional
1243
- Y value.
1244
-
1168
+ x : float, int, str or PointData
1169
+ X coordinate or PointData object.
1170
+ y : float, int, str, optional
1171
+ Y coordinate.
1245
1172
 
1246
1173
  Returns
1247
1174
  -------
1248
1175
  :class:`PointData <pyedb.grpc.database.geometry.point_data.PointData>`
1176
+ 2D point object.
1249
1177
  """
1250
1178
  from pyedb.grpc.database.geometry.point_data import PointData
1251
1179
 
@@ -1255,7 +1183,7 @@ class Edb(EdbInit):
1255
1183
  return PointData(x, y)
1256
1184
 
1257
1185
  @staticmethod
1258
- def _is_file_existing_and_released(filename):
1186
+ def _is_file_existing_and_released(filename) -> bool:
1259
1187
  if os.path.exists(filename):
1260
1188
  try:
1261
1189
  os.rename(filename, filename + "_")
@@ -1267,13 +1195,13 @@ class Edb(EdbInit):
1267
1195
  return False
1268
1196
 
1269
1197
  @staticmethod
1270
- def _is_file_existing(filename):
1198
+ def _is_file_existing(filename) -> bool:
1271
1199
  if os.path.exists(filename):
1272
1200
  return True
1273
1201
  else:
1274
1202
  return False
1275
1203
 
1276
- def _wait_for_file_release(self, timeout=30, file_to_release=None):
1204
+ def _wait_for_file_release(self, timeout=30, file_to_release=None) -> bool:
1277
1205
  if not file_to_release:
1278
1206
  file_to_release = os.path.join(self.edbpath)
1279
1207
  tstart = time.time()
@@ -1303,12 +1231,13 @@ class Edb(EdbInit):
1303
1231
  times = 0
1304
1232
  time.sleep(0.250)
1305
1233
 
1306
- def close_edb(self):
1307
- """Close EDB and cleanup variables.
1234
+ def close_edb(self) -> bool:
1235
+ """Close EDB and clean up resources.
1308
1236
 
1309
1237
  Returns
1310
1238
  -------
1311
- bool: `True` when successful, `False` when failed.
1239
+ bool
1240
+ True if successful, False otherwise.
1312
1241
  """
1313
1242
  self.close()
1314
1243
  start_time = time.time()
@@ -1318,12 +1247,13 @@ class Edb(EdbInit):
1318
1247
  self._clean_variables()
1319
1248
  return True
1320
1249
 
1321
- def save_edb(self):
1322
- """Save the EDB file.
1250
+ def save_edb(self) -> bool:
1251
+ """Save current EDB database.
1323
1252
 
1324
1253
  Returns
1325
1254
  -------
1326
- bool: `True` when successful, `False` when failed.
1255
+ bool
1256
+ True if successful, False otherwise.
1327
1257
  """
1328
1258
  self.save()
1329
1259
  start_time = time.time()
@@ -1332,17 +1262,18 @@ class Edb(EdbInit):
1332
1262
  self.logger.info("EDB file save time: {0:.2f}ms".format(elapsed_time * 1000.0))
1333
1263
  return True
1334
1264
 
1335
- def save_edb_as(self, fname):
1336
- """Save the EDB file as another file.
1265
+ def save_edb_as(self, fname) -> bool:
1266
+ """Save EDB database to new location.
1337
1267
 
1338
1268
  Parameters
1339
1269
  ----------
1340
1270
  fname : str
1341
- Name of the new file to save to.
1271
+ New AEDB path.
1342
1272
 
1343
1273
  Returns
1344
1274
  -------
1345
- bool: `True` when successful, `False` when failed.
1275
+ bool
1276
+ True if successful, False otherwise.
1346
1277
  """
1347
1278
  self.save_as(fname)
1348
1279
  start_time = time.time()
@@ -1356,41 +1287,18 @@ class Edb(EdbInit):
1356
1287
  return True
1357
1288
 
1358
1289
  def execute(self, func):
1359
- """Execute a function.
1290
+ """Execute EDB utility command (Not implemented in gRPC).
1360
1291
 
1361
1292
  Parameters
1362
1293
  ----------
1363
1294
  func : str
1364
- Function to execute.
1365
-
1366
-
1367
- Returns
1368
- -------
1369
- bool: `True` when successful, `False` when failed.
1295
+ Command to execute.
1370
1296
  """
1371
1297
  # return self.edb_api.utility.utility.Command.Execute(func)
1372
1298
  pass
1373
1299
 
1374
1300
  def import_cadence_file(self, inputBrd, WorkDir=None, anstranslator_full_path="", use_ppe=False):
1375
- """Import a board file and generate an ``edb.def`` file in the working directory.
1376
-
1377
- Parameters
1378
- ----------
1379
- inputBrd : str
1380
- Full path to the board file.
1381
- WorkDir : str, optional
1382
- Directory in which to create the ``aedb`` folder. The default value is ``None``,
1383
- in which case the AEDB file is given the same name as the board file. Only
1384
- the extension differs.
1385
- anstranslator_full_path : str, optional
1386
- Full path to the Ansys translator.
1387
- use_ppe : bool, optional
1388
- Whether to use the PPE License. The default is ``False``.
1389
-
1390
- Returns
1391
- -------
1392
- bool: `True` when successful, `False` when failed.
1393
- """
1301
+ """Import Cadence board file (Deprecated - use import_layout_file)."""
1394
1302
  if self.import_layout_pcb(
1395
1303
  inputBrd,
1396
1304
  working_dir=WorkDir,
@@ -1411,32 +1319,24 @@ class Edb(EdbInit):
1411
1319
  map_file=None,
1412
1320
  layer_filter=None,
1413
1321
  ):
1414
- """Import a GDS file and generate an ``edb.def`` file in the working directory.
1415
-
1416
- ..note::
1417
- ANSYS license is necessary to run the translator.
1322
+ """Import GDS file.
1418
1323
 
1419
1324
  Parameters
1420
1325
  ----------
1421
1326
  inputGDS : str
1422
- Full path to the GDS file.
1327
+ GDS file path.
1423
1328
  anstranslator_full_path : str, optional
1424
- Full path to the Ansys translator.
1329
+ Ansys translator path.
1425
1330
  use_ppe : bool, optional
1426
- Whether to use the PPE License. The default is ``False``.
1331
+ Use PPE license. Default False.
1427
1332
  control_file : str, optional
1428
- Path to the XML file. The default is ``None``, in which case an attempt is made to find
1429
- the XML file in the same directory as the GDS file. To succeed, the XML file and GDS file must
1430
- have the same name. Only the extension differs.
1333
+ XML control file.
1431
1334
  tech_file : str, optional
1432
- Technology file. For versions<2024.1 it uses Helic to convert tech file to xml and then imports
1433
- the gds. Works on Linux only.
1434
- For versions>=2024.1 it can directly parse through supported foundry tech files.
1335
+ Technology file.
1435
1336
  map_file : str, optional
1436
1337
  Layer map file.
1437
- layer_filter:str,optional
1338
+ layer_filter : str, optional
1438
1339
  Layer filter file.
1439
-
1440
1340
  """
1441
1341
  control_file_temp = os.path.join(tempfile.gettempdir(), os.path.split(inputGDS)[-1][:-3] + "xml")
1442
1342
  if float(self.edbversion) < 2024.1:
@@ -1737,114 +1637,63 @@ class Edb(EdbInit):
1737
1637
  keep_lines_as_path=False,
1738
1638
  include_voids_in_extents=False,
1739
1639
  ):
1740
- """Create a cutout using an approach entirely based on PyAEDT.
1741
- This method replaces all legacy cutout methods in PyAEDT.
1742
- It does in sequence:
1743
- - delete all nets not in list,
1744
- - create a extent of the nets,
1745
- - check and delete all vias not in the extent,
1746
- - check and delete all the primitives not in extent,
1747
- - check and intersect all the primitives that intersect the extent.
1640
+ """Create layout cutout with various options.
1748
1641
 
1749
1642
  Parameters
1750
1643
  ----------
1751
- signal_list : list
1752
- List of signal strings.
1644
+ signal_list : list, optional
1645
+ Signal nets to include.
1753
1646
  reference_list : list, optional
1754
- List of references to add. The default is ``["GND"]``.
1647
+ Reference nets to include.
1755
1648
  extent_type : str, optional
1756
- Type of the extension. Options are ``"Conforming"``, ``"ConvexHull"``, and
1757
- ``"Bounding"``. The default is ``"Conforming"``.
1758
- expansion_size : float, str, optional
1759
- Expansion size ratio in meters. The default is ``0.002``.
1649
+ Cutout type ("Conforming", "ConvexHull", "Bounding").
1650
+ expansion_size : float, optional
1651
+ Boundary expansion size (meters).
1760
1652
  use_round_corner : bool, optional
1761
- Whether to use round corners. The default is ``False``.
1653
+ Use rounded corners. Default False.
1762
1654
  output_aedb_path : str, optional
1763
- Full path and name for the new AEDB file. If None, then current aedb will be cutout.
1655
+ Output AEDB path.
1764
1656
  open_cutout_at_end : bool, optional
1765
- Whether to open the cutout at the end. The default is ``True``.
1657
+ Open cutout when finished. Default True.
1766
1658
  use_pyaedt_cutout : bool, optional
1767
- Whether to use new PyAEDT cutout method or EDB API method.
1768
- New method is faster than native API method since it benefits of multithread.
1659
+ Use PyAEDT cutout method. Default True.
1769
1660
  number_of_threads : int, optional
1770
- Number of thread to use. Default is 4. Valid only if ``use_pyaedt_cutout`` is set to ``True``.
1661
+ Thread count for PyAEDT cutout.
1771
1662
  use_pyaedt_extent_computing : bool, optional
1772
- Whether to use legacy extent computing (experimental) or EDB API.
1663
+ Use PyAEDT extent computation. Default True.
1773
1664
  extent_defeature : float, optional
1774
- Defeature the cutout before applying it to produce simpler geometry for mesh (Experimental).
1775
- It applies only to Conforming bounding box. Default value is ``0`` which disable it.
1665
+ Geometry simplification factor.
1776
1666
  remove_single_pin_components : bool, optional
1777
- Remove all Single Pin RLC after the cutout is completed. Default is `False`.
1778
- custom_extent : list
1779
- Points list defining the cutout shape. This setting will override `extent_type` field.
1780
- custom_extent_units : str
1781
- Units of the point list. The default is ``"mm"``. Valid only if `custom_extend` is provided.
1667
+ Remove single-pin components. Default False.
1668
+ custom_extent : list, optional
1669
+ Custom polygon points for cutout.
1670
+ custom_extent_units : str, optional
1671
+ Units for custom_extent points.
1782
1672
  include_partial_instances : bool, optional
1783
- Whether to include padstack instances that have bounding boxes intersecting with point list polygons.
1784
- This operation may slow down the cutout export.Valid only if `custom_extend` and
1785
- `use_pyaedt_cutout` is provided.
1786
- keep_voids : bool
1787
- Boolean used for keep or not the voids intersecting the polygon used for clipping the layout.
1788
- Default value is ``True``, ``False`` will remove the voids.Valid only if `custom_extend` is provided.
1673
+ Include partial padstack instances. Default False.
1674
+ keep_voids : bool, optional
1675
+ Preserve voids in cutout. Default True.
1789
1676
  check_terminals : bool, optional
1790
- Whether to check for all reference terminals and increase extent to include them into the cutout.
1791
- This applies to components which have a model (spice, touchstone or netlist) associated.
1677
+ Verify terminal references. Default False.
1792
1678
  include_pingroups : bool, optional
1793
- Whether to check for all pingroups terminals and increase extent to include them into the cutout.
1794
- It requires ``check_terminals``.
1679
+ Include pin groups. Default False.
1795
1680
  expansion_factor : int, optional
1796
- The method computes a float representing the largest number between
1797
- the dielectric thickness or trace width multiplied by the expansion_factor factor.
1798
- The trace width search is limited to nets with ports attached. Works only if `use_pyaedt_cutout`.
1799
- Default is `0` to disable the search.
1681
+ Auto-expansion factor. Default 0 (disabled).
1800
1682
  maximum_iterations : int, optional
1801
- Maximum number of iterations before stopping a search for a cutout with an error.
1802
- Default is `10`.
1683
+ Max auto-expansion iterations. Default 10.
1803
1684
  preserve_components_with_model : bool, optional
1804
- Whether to preserve all pins of components that have associated models (Spice or NPort).
1805
- This parameter is applicable only for a PyAEDT cutout (except point list).
1685
+ Keep components with models. Default False.
1806
1686
  simple_pad_check : bool, optional
1807
- Whether to use the center of the pad to find the intersection with extent or use the bounding box.
1808
- Second method is much slower and requires to disable multithread on padstack removal.
1809
- Default is `True`.
1687
+ Use simplified pad checking. Default True.
1810
1688
  keep_lines_as_path : bool, optional
1811
- Whether to keep the lines as Path after they are cutout or convert them to PolygonData.
1812
- This feature works only in Electronics Desktop (3D Layout).
1813
- If the flag is set to ``True`` it can cause issues in SiWave once the Edb is imported.
1814
- Default is ``False`` to generate PolygonData of cut lines.
1689
+ Preserve paths as lines. Default False.
1815
1690
  include_voids_in_extents : bool, optional
1816
- Whether to compute and include voids in pyaedt extent before the cutout. Cutout time can be affected.
1817
- It works only with Conforming cutout.
1818
- Default is ``False`` to generate extent without voids.
1819
-
1691
+ Include voids in extent calculation. Default False.
1820
1692
 
1821
1693
  Returns
1822
1694
  -------
1823
- List
1824
- List of coordinate points defining the extent used for clipping the design. If failed, return an empty
1825
- list.
1826
-
1827
- Examples
1828
- --------
1829
- >>> from pyedb import Edb
1830
- >>> edb = Edb(r'C:\\test.aedb', edbversion="2022.2")
1831
- >>> edb.logger.info_timer("Edb Opening")
1832
- >>> edb.logger.reset_timer()
1833
- >>> start = time.time()
1834
- >>> signal_list = []
1835
- >>> for net in edb.nets.netlist:
1836
- >>> if "3V3" in net:
1837
- >>> signal_list.append(net)
1838
- >>> power_list = ["PGND"]
1839
- >>> edb.cutout(signal_list=signal_list, reference_list=power_list, extent_type="Conforming")
1840
- >>> end_time = str((time.time() - start)/60)
1841
- >>> edb.logger.info("Total legacy cutout time in min %s", end_time)
1842
- >>> edb.nets.plot(signal_list, None, color_by_net=True)
1843
- >>> edb.nets.plot(power_list, None, color_by_net=True)
1844
- >>> edb.save_edb()
1845
- >>> edb.close_edb()
1846
-
1847
-
1695
+ list or bool
1696
+ Cutout boundary points if successful, False otherwise.
1848
1697
  """
1849
1698
  if expansion_factor > 0:
1850
1699
  expansion_size = self.calculate_initial_extent(expansion_factor)
@@ -2306,7 +2155,7 @@ class Edb(EdbInit):
2306
2155
  self.logger.reset_timer()
2307
2156
  return [[pt.x.value, pt.y.value] for pt in _poly.without_arcs().points]
2308
2157
 
2309
- def get_conformal_polygon_from_netlist(self, netlist=None):
2158
+ def get_conformal_polygon_from_netlist(self, netlist=None) -> Union[bool, Polygon]:
2310
2159
  """Returns conformal polygon data based on a netlist.
2311
2160
 
2312
2161
  Parameters
@@ -2337,7 +2186,7 @@ class Edb(EdbInit):
2337
2186
  else:
2338
2187
  return False
2339
2188
 
2340
- def number_with_units(self, value, units=None):
2189
+ def number_with_units(self, value, units=None) -> str:
2341
2190
  """Convert a number to a string with units. If value is a string, it's returned as is.
2342
2191
 
2343
2192
  Parameters
@@ -2568,37 +2417,25 @@ class Edb(EdbInit):
2568
2417
  aedt_file_name=None,
2569
2418
  hidden=False,
2570
2419
  ):
2571
- """Export EDB to HFSS.
2420
+ """Export to HFSS project.
2572
2421
 
2573
2422
  Parameters
2574
2423
  ----------
2575
2424
  path_to_output : str
2576
- Full path and name for saving the AEDT file.
2425
+ Output directory.
2577
2426
  net_list : list, optional
2578
- List of nets to export if only certain ones are to be exported.
2579
- The default is ``None``, in which case all nets are eported.
2427
+ Nets to export.
2580
2428
  num_cores : int, optional
2581
- Number of cores to use for the export. The default is ``None``.
2429
+ Processing cores to use.
2582
2430
  aedt_file_name : str, optional
2583
- Name of the AEDT output file without the ``.aedt`` extension. The default is ``None``,
2584
- in which case the default name is used.
2431
+ Custom AEDT filename.
2585
2432
  hidden : bool, optional
2586
- Open Siwave in embedding mode. User will only see Siwave Icon but UI will be hidden.
2433
+ Run Siwave in background. Default False.
2587
2434
 
2588
2435
  Returns
2589
2436
  -------
2590
2437
  str
2591
- Full path to the AEDT file.
2592
-
2593
- Examples
2594
- --------
2595
-
2596
- >>> from pyedb import Edb
2597
- >>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2023.2")
2598
-
2599
- >>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
2600
- >>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
2601
- >>> edb.export_hfss(r"C:\temp")
2438
+ Path to generated AEDT file.
2602
2439
  """
2603
2440
  siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
2604
2441
  return siwave_s.export_3d_cad("HFSS", path_to_output, net_list, num_cores, aedt_file_name, hidden=hidden)
@@ -2611,38 +2448,26 @@ class Edb(EdbInit):
2611
2448
  aedt_file_name=None,
2612
2449
  hidden=False,
2613
2450
  ):
2614
- """Export EDB to Q3D.
2451
+ """Export to Q3D project.
2615
2452
 
2616
2453
  Parameters
2617
2454
  ----------
2618
2455
  path_to_output : str
2619
- Full path and name for saving the AEDT file.
2456
+ Output directory.
2620
2457
  net_list : list, optional
2621
- List of nets to export only if certain ones are to be exported.
2622
- The default is ``None``, in which case all nets are eported.
2458
+ Nets to export.
2623
2459
  num_cores : int, optional
2624
- Number of cores to use for the export. The default is ``None``.
2460
+ Processing cores to use.
2625
2461
  aedt_file_name : str, optional
2626
- Name of the AEDT output file without the ``.aedt`` extension. The default is ``None``,
2627
- in which case the default name is used.
2462
+ Custom AEDT filename.
2628
2463
  hidden : bool, optional
2629
- Open Siwave in embedding mode. User will only see Siwave Icon but UI will be hidden.
2464
+ Run Siwave in background. Default False.
2630
2465
 
2631
2466
  Returns
2632
2467
  -------
2633
2468
  str
2634
- Full path to the AEDT file.
2635
-
2636
- Examples
2637
- --------
2638
-
2639
- >>> from pyedb import Edb
2640
- >>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2021.2")
2641
- >>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
2642
- >>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
2643
- >>> edb.export_q3d(r"C:\temp")
2469
+ Path to generated AEDT file.
2644
2470
  """
2645
-
2646
2471
  siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
2647
2472
  return siwave_s.export_3d_cad(
2648
2473
  "Q3D",
@@ -2661,38 +2486,25 @@ class Edb(EdbInit):
2661
2486
  aedt_file_name=None,
2662
2487
  hidden=False,
2663
2488
  ):
2664
- """Export EDB to Maxwell 3D.
2489
+ """Export to Maxwell project.
2665
2490
 
2666
2491
  Parameters
2667
2492
  ----------
2668
2493
  path_to_output : str
2669
- Full path and name for saving the AEDT file.
2494
+ Output directory.
2670
2495
  net_list : list, optional
2671
- List of nets to export only if certain ones are to be
2672
- exported. The default is ``None``, in which case all nets are exported.
2496
+ Nets to export.
2673
2497
  num_cores : int, optional
2674
- Number of cores to use for the export. The default is ``None.``
2498
+ Processing cores to use.
2675
2499
  aedt_file_name : str, optional
2676
- Name of the AEDT output file without the ``.aedt`` extension. The default is ``None``,
2677
- in which case the default name is used.
2500
+ Custom AEDT filename.
2678
2501
  hidden : bool, optional
2679
- Open Siwave in embedding mode. User will only see Siwave Icon but UI will be hidden.
2502
+ Run Siwave in background. Default False.
2680
2503
 
2681
2504
  Returns
2682
2505
  -------
2683
2506
  str
2684
- Full path to the AEDT file.
2685
-
2686
- Examples
2687
- --------
2688
-
2689
- >>> from pyedb import Edb
2690
-
2691
- >>> edb = Edb(edbpath=r"C:\temp\myproject.aedb", edbversion="2021.2")
2692
-
2693
- >>> options_config = {'UNITE_NETS' : 1, 'LAUNCH_Q3D' : 0}
2694
- >>> edb.write_export3d_option_config_file(r"C:\temp", options_config)
2695
- >>> edb.export_maxwell(r"C:\temp")
2507
+ Path to generated AEDT file.
2696
2508
  """
2697
2509
  siwave_s = SiwaveSolve(self.edbpath, aedt_installer_path=self.base_path)
2698
2510
  return siwave_s.export_3d_cad(
@@ -2705,12 +2517,12 @@ class Edb(EdbInit):
2705
2517
  )
2706
2518
 
2707
2519
  def solve_siwave(self):
2708
- """Close EDB and solve it with Siwave.
2520
+ """Solve with SIwave.
2709
2521
 
2710
2522
  Returns
2711
2523
  -------
2712
2524
  str
2713
- Siwave project path.
2525
+ Path to SIwave project.
2714
2526
  """
2715
2527
  process = SiwaveSolve(self.edbpath, aedt_version=self.edbversion)
2716
2528
  try:
@@ -2733,35 +2545,35 @@ class Edb(EdbInit):
2733
2545
  power_tree=True,
2734
2546
  loop_res=True,
2735
2547
  ):
2736
- """Close EDB and solve it with Siwave.
2548
+ """Export SIwave DC results.
2737
2549
 
2738
2550
  Parameters
2739
2551
  ----------
2740
2552
  siwave_project : str
2741
- Siwave full project name.
2553
+ SIwave project path.
2742
2554
  solution_name : str
2743
- Siwave DC Analysis name.
2555
+ DC analysis name.
2744
2556
  output_folder : str, optional
2745
- Ouptu folder where files will be downloaded.
2557
+ Custom output folder.
2746
2558
  html_report : bool, optional
2747
- Either if generate or not html report. Default is `True`.
2559
+ Generate HTML report. Default True.
2748
2560
  vias : bool, optional
2749
- Either if generate or not vias report. Default is `True`.
2561
+ Export vias report. Default True.
2750
2562
  voltage_probes : bool, optional
2751
- Either if generate or not voltage probe report. Default is `True`.
2563
+ Export voltage probes. Default True.
2752
2564
  current_sources : bool, optional
2753
- Either if generate or not current source report. Default is `True`.
2565
+ Export current sources. Default True.
2754
2566
  voltage_sources : bool, optional
2755
- Either if generate or not voltage source report. Default is `True`.
2567
+ Export voltage sources. Default True.
2756
2568
  power_tree : bool, optional
2757
- Either if generate or not power tree image. Default is `True`.
2569
+ Export power tree. Default True.
2758
2570
  loop_res : bool, optional
2759
- Either if generate or not loop resistance report. Default is `True`.
2571
+ Export loop resistance. Default True.
2760
2572
 
2761
2573
  Returns
2762
2574
  -------
2763
2575
  list[str]
2764
- List of files generated.
2576
+ Generated report files.
2765
2577
  """
2766
2578
  process = SiwaveSolve(self.edbpath, aedt_version=self.edbversion)
2767
2579
  try:
@@ -2783,11 +2595,17 @@ class Edb(EdbInit):
2783
2595
  )
2784
2596
 
2785
2597
  def variable_exists(self, variable_name):
2786
- """Check if a variable exists or not.
2598
+ """Check if variable exists.
2599
+
2600
+ Parameters
2601
+ ----------
2602
+ variable_name : str
2603
+ Variable name.
2787
2604
 
2788
2605
  Returns
2789
2606
  -------
2790
2607
  bool
2608
+ True if variable exists.
2791
2609
  """
2792
2610
  if "$" in variable_name:
2793
2611
  if variable_name.index("$") == 0:
@@ -2801,15 +2619,17 @@ class Edb(EdbInit):
2801
2619
  return False
2802
2620
 
2803
2621
  def get_variable(self, variable_name):
2804
- """Return Variable Value if variable exists.
2622
+ """Get variable value.
2805
2623
 
2806
2624
  Parameters
2807
2625
  ----------
2808
- variable_name
2626
+ variable_name : str
2627
+ Variable name.
2809
2628
 
2810
2629
  Returns
2811
2630
  -------
2812
- float
2631
+ float or bool
2632
+ Variable value if exists, else False.
2813
2633
  """
2814
2634
  if self.variable_exists(variable_name):
2815
2635
  if "$" in variable_name:
@@ -2821,99 +2641,73 @@ class Edb(EdbInit):
2821
2641
  self.logger.info(f"Variable {variable_name} doesn't exists.")
2822
2642
  return False
2823
2643
 
2824
- def add_project_variable(self, variable_name, variable_value):
2825
- """Add a variable to database. The variable will have the prefix `$`.
2644
+ def add_project_variable(self, variable_name, variable_value, description=None) -> bool:
2645
+ """Add project variable.
2826
2646
 
2827
2647
  Parameters
2828
- ----------
2829
- variable_name : str
2830
- Name of the variable. Name can be provided without ``$`` prefix.
2831
- variable_value : str, float
2832
- Value of the variable with units.
2833
-
2834
- Returns
2835
- -------
2836
- bool
2837
-
2838
- Examples
2839
- --------
2840
-
2841
- >>> from pyedb import Edb
2842
- >>> edb_app = Edb()
2843
- >>> boolean_1, ant_length = edb_app.add_project_variable("my_local_variable", "1cm")
2844
- >>> print(edb_app["$my_local_variable"]) #using getitem
2845
- >>> edb_app["$my_local_variable"] = "1cm" #using setitem
2648
+ ----------
2649
+ variable_name : str
2650
+ Variable name (auto-prefixed with '$').
2651
+ variable_value : str, float
2652
+ Variable value with units.
2653
+ description : str, optional
2654
+ Variable description.
2846
2655
 
2656
+ Returns
2657
+ -------
2658
+ bool
2659
+ True if successful, False if variable exists.
2847
2660
  """
2848
2661
  if not variable_name.startswith("$"):
2849
2662
  variable_name = f"${variable_name}"
2850
2663
  if not self.variable_exists(variable_name):
2851
- return self.active_db.add_variable(variable_name, variable_value)
2664
+ var = self.active_db.add_variable(variable_name, variable_value)
2665
+ if description:
2666
+ self.active_db.set_variable_desc(name=variable_name, desc=description)
2667
+ return var
2852
2668
  else:
2853
2669
  self.logger.error(f"Variable {variable_name} already exists.")
2854
2670
  return False
2855
2671
 
2856
- def add_design_variable(self, variable_name, variable_value, is_parameter=False):
2857
- """Add a variable to edb. The variable can be a design one or a project variable (using ``$`` prefix).
2672
+ def add_design_variable(self, variable_name, variable_value, is_parameter=False, description=None) -> bool:
2673
+ """Add design variable.
2858
2674
 
2859
2675
  Parameters
2860
2676
  ----------
2861
2677
  variable_name : str
2862
- Name of the variable. To added the variable as a project variable, the name
2863
- must begin with ``$``.
2678
+ Variable name.
2864
2679
  variable_value : str, float
2865
- Value of the variable with units.
2680
+ Variable value with units.
2866
2681
  is_parameter : bool, optional
2867
- Whether to add the variable as a local variable. The default is ``False``.
2868
- When ``True``, the variable is added as a parameter default.
2682
+ Add as local variable. Default False.
2683
+ description : str, optional
2684
+ Variable description.
2869
2685
 
2870
2686
  Returns
2871
2687
  -------
2872
- bool.
2873
-
2874
- Examples
2875
- --------
2876
-
2877
- >>> from pyedb import Edb
2878
- >>> edb_app = Edb()
2879
- >>> boolean_1, ant_length = edb_app.add_design_variable("my_local_variable", "1cm")
2880
- >>> print(edb_app["my_local_variable"]) #using getitem
2881
- >>> edb_app["my_local_variable"] = "1cm" #using setitem
2882
- >>> boolean_2, para_length = edb_app.change_design_variable_value("my_parameter", "1m", is_parameter=True
2883
- >>> boolean_3, project_length = edb_app.change_design_variable_value("$my_project_variable", "1m")
2884
-
2885
-
2688
+ bool
2689
+ True if successful, False if variable exists.
2886
2690
  """
2887
2691
  if variable_name.startswith("$"):
2888
2692
  variable_name = variable_name[1:]
2889
2693
  if not self.variable_exists(variable_name):
2890
- return self.active_cell.add_variable(variable_name, variable_value)
2694
+ var = self.active_cell.add_variable(variable_name, variable_value)
2695
+ if description:
2696
+ self.active_cell.set_variable_desc(name=variable_name, desc=description)
2697
+ return var
2891
2698
  else:
2892
2699
  self.logger.error(f"Variable {variable_name} already exists.")
2893
2700
  return False
2894
2701
 
2895
2702
  def change_design_variable_value(self, variable_name, variable_value):
2896
- """Change a variable value.
2703
+ """Update variable value.
2897
2704
 
2898
2705
  Parameters
2899
2706
  ----------
2900
2707
  variable_name : str
2901
- Name of the variable.
2708
+ Variable name.
2902
2709
  variable_value : str, float
2903
- Value of the variable with units.
2904
-
2905
- Returns
2906
- -------
2907
- bool.
2908
-
2909
- Examples
2910
- --------
2911
-
2912
- >>> from pyedb import Edb
2913
- >>> edb_app = Edb()
2914
- >>> boolean, ant_length = edb_app.add_design_variable("ant_length", "1cm")
2915
- >>> boolean, ant_length = edb_app.change_design_variable_value("ant_length", "1m")
2916
- >>> print(edb_app["ant_length"]) #using getitem
2710
+ New value with units.
2917
2711
  """
2918
2712
  if self.variable_exists(variable_name):
2919
2713
  if variable_name in self.db.get_all_variable_names():
@@ -2921,55 +2715,45 @@ class Edb(EdbInit):
2921
2715
  elif variable_name in self.active_cell.get_all_variable_names():
2922
2716
  self.active_cell.set_variable_value(variable_name, GrpcValue(variable_value))
2923
2717
 
2924
- def get_bounding_box(self):
2925
- """Get the layout bounding box.
2718
+ def get_bounding_box(self) -> list[list[float, float], list[float, float]]:
2719
+ """Get layout bounding box.
2926
2720
 
2927
2721
  Returns
2928
2722
  -------
2929
- list[float]
2930
- Bounding box as a [lower-left X, lower-left Y, upper-right X, upper-right Y] in meters.
2723
+ list
2724
+ [[min_x, min_y], [max_x, max_y]] in meters.
2931
2725
  """
2932
2726
  lay_inst_polygon_data = [obj_inst.get_bbox() for obj_inst in self.layout_instance.query_layout_obj_instances()]
2933
2727
  layout_bbox = GrpcPolygonData.bbox_of_polygons(lay_inst_polygon_data)
2934
2728
  return [[layout_bbox[0].x.value, layout_bbox[0].y.value], [layout_bbox[1].x.value, layout_bbox[1].y.value]]
2935
2729
 
2936
2730
  def get_statistics(self, compute_area=False):
2937
- """Get the EDBStatistics object.
2731
+ """Get layout statistics.
2732
+
2733
+ Parameters
2734
+ ----------
2735
+ compute_area : bool, optional
2736
+ Calculate net areas. Default False.
2938
2737
 
2939
2738
  Returns
2940
2739
  -------
2941
2740
  :class:`LayoutStatistics <pyedb.grpc.database.utility.layout_statistics.LayoutStatistics>`
2741
+ Layout statistics report.
2942
2742
  """
2943
2743
  return self.modeler.get_layout_statistics(evaluate_area=compute_area, net_list=None)
2944
2744
 
2945
2745
  def are_port_reference_terminals_connected(self, common_reference=None):
2946
- """Check if all terminal references in design are connected.
2947
- If the reference nets are different, there is no hope for the terminal references to be connected.
2948
- After we have identified a common reference net we need to loop the terminals again to get
2949
- the correct reference terminals that uses that net.
2746
+ """Check if port reference terminals are connected.
2950
2747
 
2951
2748
  Parameters
2952
2749
  ----------
2953
2750
  common_reference : str, optional
2954
- Common Reference name. If ``None`` it will be searched in ports terminal.
2955
- If a string is passed then all excitations must have such reference assigned.
2751
+ Reference net name to check.
2956
2752
 
2957
2753
  Returns
2958
2754
  -------
2959
2755
  bool
2960
- Either if the ports are connected to reference_name or not.
2961
-
2962
- Examples
2963
- --------
2964
- >>> from pyedb import Edb
2965
- >>>edb = Edb()
2966
- >>> edb.hfss.create_edge_port_vertical(prim_1_id, ["-66mm", "-4mm"], "port_ver")
2967
- >>> edb.hfss.create_edge_port_horizontal(
2968
- >>> ... prim_1_id, ["-60mm", "-4mm"], prim_2_id, ["-59mm", "-4mm"], "port_hori", 30, "Lower"
2969
- >>> ... )
2970
- >>> edb.hfss.create_wave_port(traces[0].id, trace_paths[0][0], "wave_port")
2971
- >>> edb.cutout(["Net1"])
2972
- >>> assert edb.are_port_reference_terminals_connected()
2756
+ True if all port references are connected.
2973
2757
  """
2974
2758
  all_sources = [i for i in self.excitations.values() if not isinstance(i, (WavePort, GapPort, BundleWavePort))]
2975
2759
  all_sources.extend([i for i in self.sources.values()])
@@ -3030,7 +2814,9 @@ class Edb(EdbInit):
3030
2814
  return True if len(iDintersection) > 0 else False
3031
2815
 
3032
2816
  @property
3033
- def setups(self):
2817
+ def setups(
2818
+ self,
2819
+ ) -> Union[HfssSimulationSetup, SiwaveSimulationSetup, SIWaveDCIRSimulationSetup, RaptorXSimulationSetup]:
3034
2820
  """Get the dictionary of all EDB HFSS and SIwave setups.
3035
2821
 
3036
2822
  Returns
@@ -3056,7 +2842,7 @@ class Edb(EdbInit):
3056
2842
  return self._setups
3057
2843
 
3058
2844
  @property
3059
- def hfss_setups(self):
2845
+ def hfss_setups(self) -> dict[str, HfssSimulationSetup]:
3060
2846
  """Active HFSS setup in EDB.
3061
2847
 
3062
2848
  Returns
@@ -3072,7 +2858,7 @@ class Edb(EdbInit):
3072
2858
  return setups
3073
2859
 
3074
2860
  @property
3075
- def siwave_dc_setups(self):
2861
+ def siwave_dc_setups(self) -> dict[str, SIWaveDCIRSimulationSetup]:
3076
2862
  """Active Siwave DC IR Setups.
3077
2863
 
3078
2864
  Returns
@@ -3084,7 +2870,7 @@ class Edb(EdbInit):
3084
2870
  return {name: i for name, i in self.setups.items() if isinstance(i, SIWaveDCIRSimulationSetup)}
3085
2871
 
3086
2872
  @property
3087
- def siwave_ac_setups(self):
2873
+ def siwave_ac_setups(self) -> dict[str, SiwaveSimulationSetup]:
3088
2874
  """Active Siwave SYZ setups.
3089
2875
 
3090
2876
  Returns
@@ -3094,7 +2880,9 @@ class Edb(EdbInit):
3094
2880
  """
3095
2881
  return {name: i for name, i in self.setups.items() if isinstance(i, SiwaveSimulationSetup)}
3096
2882
 
3097
- def create_hfss_setup(self, name=None, start_frequency="0GHz", stop_frequency="20GHz", step_frequency="10MHz"):
2883
+ def create_hfss_setup(
2884
+ self, name=None, start_frequency="0GHz", stop_frequency="20GHz", step_frequency="10MHz"
2885
+ ) -> HfssSimulationSetup:
3098
2886
  """Create an HFSS simulation setup from a template.
3099
2887
 
3100
2888
  . deprecated:: pyedb 0.30.0
@@ -3122,18 +2910,19 @@ class Edb(EdbInit):
3122
2910
  step_freq=step_frequency,
3123
2911
  )
3124
2912
 
3125
- def create_raptorx_setup(self, name=None):
3126
- """Create an RaptorX simulation setup from a template.
2913
+ def create_raptorx_setup(self, name=None) -> RaptorXSimulationSetup:
2914
+ """Create RaptorX analysis setup (2024R2+ only).
3127
2915
 
3128
2916
  Parameters
3129
2917
  ----------
3130
2918
  name : str, optional
3131
- Setup name.
2919
+ Setup name. Auto-generated if None.
3132
2920
 
3133
2921
  Returns
3134
2922
  -------
3135
- :class:`RaptorXSimulationSetup <legacy.database.edb_data.raptor_x_simulation_setup_data.RaptorXSimulationSetup>`
3136
-
2923
+ :class:`RaptorXSimulationSetup
2924
+ <pyedb.grpc.database.simulation_setup.raptor_x_simulation_setup.RaptorXSimulationSetup>`
2925
+ RaptorX setup or False if unsupported.
3137
2926
  """
3138
2927
  from ansys.edb.core.simulation_setup.raptor_x_simulation_setup import (
3139
2928
  RaptorXSimulationSetup as GrpcRaptorXSimulationSetup,
@@ -3176,29 +2965,21 @@ class Edb(EdbInit):
3176
2965
  # TODO check HFSS-PI with Grpc. seems to defined at terminal level not setup.
3177
2966
  pass
3178
2967
 
3179
- def create_siwave_syz_setup(self, name=None, **kwargs):
3180
- """Create a setup from a template.
2968
+ def create_siwave_syz_setup(self, name=None, **kwargs) -> SiwaveSimulationSetup:
2969
+ """Create SIwave SYZ analysis setup.
3181
2970
 
3182
2971
  Parameters
3183
2972
  ----------
3184
2973
  name : str, optional
3185
- Setup name.
2974
+ Setup name. Auto-generated if None.
2975
+ **kwargs
2976
+ Setup properties to modify.
3186
2977
 
3187
2978
  Returns
3188
2979
  -------
3189
2980
  :class:`SiwaveSimulationSetup
3190
2981
  <pyedb.grpc.database.simulation_setup.siwave_simulation_setup.SiwaveSimulationSetup>`
3191
-
3192
- Examples
3193
- --------
3194
- >>> from pyedb import Edb
3195
- >>> edbapp = Edb()
3196
- >>> setup1 = edbapp.create_siwave_syz_setup("setup1")
3197
- >>> setup1.add_frequency_sweep(frequency_sweep=[
3198
- ... ["linear count", "0", "1kHz", 1],
3199
- ... ["log scale", "1kHz", "0.1GHz", 10],
3200
- ... ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
3201
- ... ])
2982
+ SYZ analysis setup.
3202
2983
  """
3203
2984
  if not name:
3204
2985
  name = generate_unique_name("Siwave_SYZ")
@@ -3213,26 +2994,21 @@ class Edb(EdbInit):
3213
2994
  setattr(setup, k, v)
3214
2995
  return self.setups[name]
3215
2996
 
3216
- def create_siwave_dc_setup(self, name=None, **kwargs):
3217
- """Create a setup from a template.
2997
+ def create_siwave_dc_setup(self, name=None, **kwargs) -> GrpcSIWaveDCIRSimulationSetup:
2998
+ """Create SIwave DC analysis setup.
3218
2999
 
3219
3000
  Parameters
3220
3001
  ----------
3221
3002
  name : str, optional
3222
- Setup name.
3003
+ Setup name. Auto-generated if None.
3004
+ **kwargs
3005
+ Setup properties to modify.
3223
3006
 
3224
3007
  Returns
3225
3008
  -------
3226
3009
  :class:`SIWaveDCIRSimulationSetup
3227
3010
  <pyedb.grpc.database.simulation_setup.siwave_dcir_simulation_setup.SIWaveDCIRSimulationSetup>`
3228
-
3229
- Examples
3230
- --------
3231
- >>> from pyedb import Edb
3232
- >>> edbapp = Edb()
3233
- >>> setup1 = edbapp.create_siwave_dc_setup("setup1")
3234
- >>> setup1.mesh_bondwires = True
3235
-
3011
+ DC analysis setup.
3236
3012
  """
3237
3013
  if not name:
3238
3014
  name = generate_unique_name("Siwave_DC")
@@ -3459,6 +3235,9 @@ class Edb(EdbInit):
3459
3235
  def create_port(self, terminal, ref_terminal=None, is_circuit_port=False, name=None):
3460
3236
  """Create a port.
3461
3237
 
3238
+ ..deprecated:: 0.51.0
3239
+ Use: func:`create_port` has been move to source_excitation.create_port.
3240
+
3462
3241
  Parameters
3463
3242
  ----------
3464
3243
  terminal : class:`pyedb.dotnet.database.edb_data.terminals.EdgeTerminal`,
@@ -3481,22 +3260,16 @@ class Edb(EdbInit):
3481
3260
  list: [:class:`GapPort <pyedb.grpc.database.ports.ports.GapPort`>,
3482
3261
  :class:`WavePort <pyedb.grpc.database.ports.ports.WavePort>`].
3483
3262
  """
3484
- from ansys.edb.core.terminal.terminal import BoundaryType as GrpcBoundaryType
3485
-
3486
- if terminal.boundary_type == "port":
3487
- terminal.boundary_type = GrpcBoundaryType.PORT
3488
- terminal.is_circuit_port = is_circuit_port
3489
- if ref_terminal:
3490
- if ref_terminal.boundary_type == "port":
3491
- ref_terminal.boundary_type = GrpcBoundaryType.PORT
3492
- terminal.reference_terminal = ref_terminal
3493
- if name:
3494
- terminal.name = name
3495
- return self.ports[terminal.name]
3263
+
3264
+ warnings.warn("Use create_port from edb.source_excitation.create_port", DeprecationWarning)
3265
+ return self.source_excitation.create_port(terminal, ref_terminal, is_circuit_port, name)
3496
3266
 
3497
3267
  def create_voltage_probe(self, terminal, ref_terminal):
3498
3268
  """Create a voltage probe.
3499
3269
 
3270
+ ..deprecated:: 0.50.0
3271
+ Use: func:`create_voltage_probe` located in edb.source_excitation.create_voltage_probe instead.
3272
+
3500
3273
  Parameters
3501
3274
  ----------
3502
3275
  terminal : :class:`EdgeTerminal <pyedb.grpc.database.terminals.EdgeTerminal>`,
@@ -3514,18 +3287,15 @@ class Edb(EdbInit):
3514
3287
  -------
3515
3288
  :class:`Terminal <pyedb.dotnet.database.edb_data.terminals.Terminal>`
3516
3289
  """
3517
- term = Terminal(self, terminal)
3518
- term.boundary_type = "voltage_probe"
3519
-
3520
- ref_term = Terminal(self, ref_terminal)
3521
- ref_term.boundary_type = "voltage_probe"
3522
-
3523
- term.ref_terminal = ref_terminal
3524
- return term
3290
+ warnings.warn("Use create_voltage_probe located in edb.source_excitation instead", DeprecationWarning)
3291
+ return self.source_excitation.create_voltage_probe(terminal, ref_terminal)
3525
3292
 
3526
3293
  def create_voltage_source(self, terminal, ref_terminal):
3527
3294
  """Create a voltage source.
3528
3295
 
3296
+ ..deprecated:: 0.50.0
3297
+ Use: func:`create_voltage_source` located in edb.source_excitation.create_voltage_source instead.
3298
+
3529
3299
  Parameters
3530
3300
  ----------
3531
3301
  terminal : :class:`EdgeTerminal <pyedb.grpc.database.terminals.EdgeTerminal>`,
@@ -3543,18 +3313,18 @@ class Edb(EdbInit):
3543
3313
  -------
3544
3314
  class:`ExcitationSources <legacy.database.edb_data.ports.ExcitationSources>`
3545
3315
  """
3546
- term = Terminal(self, terminal)
3547
- term.boundary_type = "voltage_source"
3548
-
3549
- ref_term = Terminal(self, ref_terminal)
3550
- ref_term.boundary_type = "voltage_source"
3551
-
3552
- term.ref_terminal = ref_terminal
3553
- return term
3316
+ warnings.warn(
3317
+ "use create_voltage_source located in edb.source_excitation.create_voltage_source instead",
3318
+ DeprecationWarning,
3319
+ )
3320
+ return self.source_excitation.create_voltage_source(terminal, ref_terminal)
3554
3321
 
3555
3322
  def create_current_source(self, terminal, ref_terminal):
3556
3323
  """Create a current source.
3557
3324
 
3325
+ ..deprecated:: 0.50.0
3326
+ Use: func:`create_current_source` located in edb.source_excitation.create_current_source instead.
3327
+
3558
3328
  Parameters
3559
3329
  ----------
3560
3330
  terminal : :class:`EdgeTerminal <pyedb.grpc.database.terminals.EdgeTerminal>`,
@@ -3572,17 +3342,17 @@ class Edb(EdbInit):
3572
3342
  -------
3573
3343
  :class:`ExcitationSources <legacy.database.edb_data.ports.ExcitationSources>`
3574
3344
  """
3575
- term = Terminal(self, terminal)
3576
- term.boundary_type = "current_source"
3577
-
3578
- ref_term = Terminal(self, ref_terminal)
3579
- ref_term.boundary_type = "current_source"
3580
-
3581
- term.ref_terminal = ref_terminal
3582
- return term
3345
+ warnings.warn(
3346
+ "use create_current_source located in edb.source_excitation.create_current_source instead",
3347
+ DeprecationWarning,
3348
+ )
3349
+ return self.source_excitation.create_current_source(terminal, ref_terminal)
3583
3350
 
3584
3351
  def get_point_terminal(self, name, net_name, location, layer):
3585
- """Place a voltage probe between two points.
3352
+ """Place terminal between two points.
3353
+
3354
+ ..deprecated:: 0.50.0
3355
+ Use: func:`get_point_terminal` located in edb.source_excitation.get_point_terminal instead.
3586
3356
 
3587
3357
  Parameters
3588
3358
  ----------
@@ -3599,9 +3369,11 @@ class Edb(EdbInit):
3599
3369
  -------
3600
3370
  :class:`PointTerminal <pyedb.grpc.database.terminal.point_terminal.PointTerminal>`
3601
3371
  """
3602
- from pyedb.grpc.database.terminal.point_terminal import PointTerminal
3603
3372
 
3604
- return PointTerminal.create(layout=self.active_layout, name=name, net=net_name, layer=layer, point=location)
3373
+ warnings.warn(
3374
+ "use get_point_terminal located in edb.source_excitation.get_point_terminal instead", DeprecationWarning
3375
+ )
3376
+ return self.source_excitation.get_point_terminal(name, net_name, location, layer)
3605
3377
 
3606
3378
  def auto_parametrize_design(
3607
3379
  self,
@@ -3623,51 +3395,49 @@ class Edb(EdbInit):
3623
3395
  expand_voids_size=0,
3624
3396
  via_offset=True,
3625
3397
  ):
3626
- """Assign automatically design and project variables with current values.
3398
+ """Automatically parametrize design elements.
3627
3399
 
3628
3400
  Parameters
3629
3401
  ----------
3630
3402
  layers : bool, optional
3631
- Enable layer thickness parametrization. Default value is ``True``.
3403
+ Parametrize layer thicknesses. Default True.
3632
3404
  materials : bool, optional
3633
- Enable material parametrization. Default value is ``True``.
3405
+ Parametrize material properties. Default True.
3634
3406
  via_holes : bool, optional
3635
- Enable via diameter parametrization. Default value is ``True``.
3407
+ Parametrize via holes. Default True.
3636
3408
  pads : bool, optional
3637
- Enable pads size parametrization. Default value is ``True``.
3409
+ Parametrize pads. Default True.
3638
3410
  antipads : bool, optional
3639
- Enable anti pads size parametrization. Default value is ``True``.
3411
+ Parametrize antipads. Default True.
3640
3412
  traces : bool, optional
3641
- Enable trace width parametrization. Default value is ``True``.
3642
- layer_filter : str, List(str), optional
3643
- Enable layer filter. Default value is ``None``, all layers are parametrized.
3644
- material_filter : str, List(str), optional
3645
- Enable material filter. Default value is ``None``, all material are parametrized.
3646
- padstack_definition_filter : str, List(str), optional
3647
- Enable padstack definition filter. Default value is ``None``, all padsatcks are parametrized.
3648
- trace_net_filter : str, List(str), optional
3649
- Enable nets filter for trace width parametrization. Default value is ``None``, all layers are parametrized.
3413
+ Parametrize trace widths. Default True.
3414
+ layer_filter : list, optional
3415
+ Layers to include. All if None.
3416
+ material_filter : list, optional
3417
+ Materials to include. All if None.
3418
+ padstack_definition_filter : list, optional
3419
+ Padstacks to include. All if None.
3420
+ trace_net_filter : list, optional
3421
+ Nets to parametrize. All if None.
3650
3422
  use_single_variable_for_padstack_definitions : bool, optional
3651
- Whether to use a single design variable for each padstack definition or a variable per pad layer.
3652
- Default value is ``True``.
3423
+ Single variable per padstack. Default True.
3653
3424
  use_relative_variables : bool, optional
3654
- Whether if use an absolute variable for each trace, padstacks and layers or a delta variable instead.
3655
- Default value is ``True``.
3425
+ Use delta variables. Default True.
3656
3426
  output_aedb_path : str, optional
3657
- Full path and name for the new AEDB file. If None, then current aedb will be cutout.
3427
+ Output AEDB path.
3658
3428
  open_aedb_at_end : bool, optional
3659
- Whether to open the cutout at the end. The default is ``True``.
3429
+ Open AEDB when finished. Default True.
3660
3430
  expand_polygons_size : float, optional
3661
- Expansion size on polygons. Polygons will be expanded in all directions. The default is ``0``.
3431
+ Polygon expansion size. Default 0.
3662
3432
  expand_voids_size : float, optional
3663
- Expansion size on polygon voids. Polygons voids will be expanded in all directions. The default is ``0``.
3433
+ Void expansion size. Default 0.
3664
3434
  via_offset : bool, optional
3665
- Whether if offset the via position or not. The default is ``True``.
3435
+ Parametrize via positions. Default True.
3666
3436
 
3667
3437
  Returns
3668
3438
  -------
3669
- List(str)
3670
- List of all parameter name created.
3439
+ list[str]
3440
+ Created parameter names.
3671
3441
  """
3672
3442
  edb_original_path = self.edbpath
3673
3443
  if output_aedb_path:
@@ -3894,41 +3664,27 @@ class Edb(EdbInit):
3894
3664
  output_edb=None,
3895
3665
  launching_box_thickness="100um",
3896
3666
  ):
3897
- """Generate EDB design to be consumed by PyAEDT to generate arbitrary wave ports shapes.
3898
- This model has to be considered as merged onto another one. The current opened design must have voids
3899
- surrounding the pad-stacks where wave ports terminal will be created. THe open design won't be edited, only
3900
- primitives like voids and pads-stack definition included in the voids are collected to generate a new design.
3667
+ """Create simplified model for arbitrary wave port generation.
3901
3668
 
3902
3669
  Parameters
3903
3670
  ----------
3904
3671
  temp_directory : str
3905
- Temporary directory used during the method execution.
3906
-
3907
- mounting_side : str
3908
- Gives the orientation to be considered for the current design. 2 options are available ``"top"`` and
3909
- ``"bottom". Default value is ``"top"``. If ``"top"`` is selected the method will voids at the top signal
3910
- layer, and the bottom layer if ``"bottom"`` is used.
3911
-
3912
- signal_nets : List[str], optional
3913
- Provides the nets to be included for the model creation. Default value is ``None``. If None is provided,
3914
- all nets will be included.
3915
-
3916
- terminal_diameter : float, str, optional
3917
- When ``None``, the terminal diameter is evaluated at each pads-tack instance found inside the voids. The top
3918
- or bottom layer pad diameter will be taken, depending on ``mounting_side`` selected. If value is provided,
3919
- it will overwrite the evaluated diameter.
3920
-
3672
+ Working directory.
3673
+ mounting_side : str, optional
3674
+ Board orientation ("top" or "bottom").
3675
+ signal_nets : list, optional
3676
+ Nets to include. All if None.
3677
+ terminal_diameter : float, optional
3678
+ Custom terminal diameter. Auto-calculated if None.
3921
3679
  output_edb : str, optional
3922
- The output EDB absolute. If ``None`` the edb is created in the ``temp_directory`` as default name
3923
- `"waveport_model.aedb"``
3924
-
3925
- launching_box_thickness : float, str, optional
3926
- Launching box thickness used for wave ports. Default value is ``"100um"``.
3680
+ Output AEDB path.
3681
+ launching_box_thickness : str, optional
3682
+ Wave port box thickness.
3927
3683
 
3928
3684
  Returns
3929
3685
  -------
3930
3686
  bool
3931
- ``True`` when succeeded, ``False`` if failed.
3687
+ True if successful, False otherwise.
3932
3688
  """
3933
3689
  if not temp_directory:
3934
3690
  self.logger.error("Temp directory must be provided when creating model foe arbitrary wave port")
@@ -4049,11 +3805,12 @@ class Edb(EdbInit):
4049
3805
 
4050
3806
  @property
4051
3807
  def definitions(self):
4052
- """Returns Definitions class.
3808
+ """EDB definitions access.
4053
3809
 
4054
3810
  Returns
4055
3811
  -------
4056
3812
  :class:`Definitions <pyedb.grpc.database.definitions.Definitions>`
3813
+ Definitions interface.
4057
3814
  """
4058
3815
  from pyedb.grpc.database.definitions import Definitions
4059
3816
 
@@ -4061,28 +3818,31 @@ class Edb(EdbInit):
4061
3818
 
4062
3819
  @property
4063
3820
  def workflow(self):
4064
- """Returns workflow class.
3821
+ """Workflow automation interface.
4065
3822
 
4066
3823
  Returns
4067
- ------
3824
+ -------
4068
3825
  :class:`Workflow <pyedb.workflow.Workflow>`
3826
+ Workflow automation tools.
4069
3827
  """
4070
3828
  return Workflow(self)
4071
3829
 
4072
3830
  def export_gds_comp_xml(self, comps_to_export, gds_comps_unit="mm", control_path=None):
4073
- """Exports an XML file with selected components information for use in a GDS import.
3831
+ """Export component data to GDS XML control file.
3832
+
4074
3833
  Parameters
4075
3834
  ----------
4076
3835
  comps_to_export : list
4077
- List of components whose information will be exported to xml file.
3836
+ Components to export.
4078
3837
  gds_comps_unit : str, optional
4079
- GDS_COMPONENTS section units. Default is ``"mm"``.
3838
+ Output units. Default "mm".
4080
3839
  control_path : str, optional
4081
- Path for outputting the XML file.
3840
+ Output XML path.
3841
+
4082
3842
  Returns
4083
3843
  -------
4084
3844
  bool
4085
- ``True`` when successful, ``False`` when failed.
3845
+ True if successful, False otherwise.
4086
3846
  """
4087
3847
  from pyedb.generic.general_methods import ET
4088
3848