Skip to content

Commit

Permalink
FEAT: Improve extensions quality (#5549)
Browse files Browse the repository at this point in the history
Co-authored-by: gmalinve <[email protected]>
  • Loading branch information
Samuelopez-ansys and gmalinve authored Dec 12, 2024
1 parent 4ab7475 commit 3735ef4
Show file tree
Hide file tree
Showing 43 changed files with 1,713 additions and 485 deletions.
79 changes: 74 additions & 5 deletions doc/source/User_guide/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Project extensions
~~~~~~~~~~~~~~~~~~

Pre-installed extensions are available at project level so they are available for all AEDT applications.
They are small automated workflow with a simple UI.
They are small automated workflows with a simple UI.

.. grid:: 2

Expand Down Expand Up @@ -60,7 +60,7 @@ HFSS 3D Layout extensions
~~~~~~~~~~~~~~~~~~~~~~~~~

Pre-installed extensions are available at HFSS 3D Layout level.
They are small automated workflow with a simple UI.
They are small automated workflows with a simple UI.

.. grid:: 2

Expand All @@ -79,12 +79,40 @@ They are small automated workflow with a simple UI.

Generate arbitrary wave ports in HFSS.

.. grid-item-card:: Push excitation from file
:link: pyaedt_extensions_doc/hfss3dlayout/push_excitation
:link-type: doc
:margin: 2 2 0 0

Edit a source from file data in HFSS 3D Layout.

.. grid-item-card:: Cutout
:link: pyaedt_extensions_doc/hfss3dlayout/cutout
:link-type: doc
:margin: 2 2 0 0

Advanced layout cutout.

.. grid-item-card:: Export layout
:link: pyaedt_extensions_doc/hfss3dlayout/export_layout
:link-type: doc
:margin: 2 2 0 0

Export layout.

.. grid-item-card:: Export to 3D
:link: pyaedt_extensions_doc/hfss3dlayout/export_3d
:link-type: doc
:margin: 2 2 0 0

Export layout to 3D.


HFSS extensions
~~~~~~~~~~~~~~~

Pre-installed extensions are available at HFSS level.
They are small automated workflow with a simple UI.
They are small automated workflows with a simple UI.

.. grid:: 2

Expand All @@ -95,12 +123,19 @@ They are small automated workflow with a simple UI.

Design a choke and import it in HFSS.

.. grid-item-card:: Push excitation from file
:link: pyaedt_extensions_doc/hfss/push_excitation
:link-type: doc
:margin: 2 2 0 0

Edit a source from file data in HFSS.


Icepak extensions
~~~~~~~~~~~~~~~~~

Pre-installed extensions are available at Icepak level.
They are small automated workflow with a simple UI.
They are small automated workflows with a simple UI.

.. grid:: 2

Expand All @@ -112,6 +147,38 @@ They are small automated workflow with a simple UI.
Import a CSV file containing sources layout and power dissipation information.


Circuit extensions
~~~~~~~~~~~~~~~~~~

Pre-installed extensions are available at Circuit level.
They are small automated workflows with a simple UI.

.. grid:: 2

.. grid-item-card:: Schematic import
:link: pyaedt_extensions_doc/circuit/import_schematic
:link-type: doc
:margin: 2 2 0 0

Import different schematic files (.asc, .sp, .cir, .qcv) into Circuit.


Twin Builder extensions
~~~~~~~~~~~~~~~~~~~~~~~

Pre-installed extensions are available at Twin Builder level.
They are small automated workflows with a simple UI.

.. grid:: 2

.. grid-item-card:: Convert to Circuit
:link: pyaedt_extensions_doc/twinbuilder/convert_to_circuit
:link-type: doc
:margin: 2 2 0 0

Convert Twin Builder design to Circuit.


.. toctree::
:hidden:
:maxdepth: 1
Expand All @@ -120,6 +187,8 @@ They are small automated workflow with a simple UI.
pyaedt_extensions_doc/hfss3dlayout/index
pyaedt_extensions_doc/hfss/index
pyaedt_extensions_doc/icepak/index
pyaedt_extensions_doc/circuit/index
pyaedt_extensions_doc/twinbuilder/index


Open source toolkits
Expand Down Expand Up @@ -180,7 +249,7 @@ The Python script requires a common initial part to define the port and the vers
active_project = app.active_project()
active_design = app.active_design(active_project)
# no need to hardcode you application but get_pyaedt_app will detect it for you
# no need to hardcode your application but get_pyaedt_app detects it for you
aedtapp = ansys.aedt.core.get_pyaedt_app(design_name=active_design.GetName(), desktop=app)
# your workflow
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Import schematic
================

Import different schematic files (.asc, .sp, .cir, .qcv) into Circuit.

The extension provides a graphical user interface for configuration,
or it can be used in batch mode via command line arguments.

The following image shows the extension user interface:

.. image:: ../../../_static/extensions/import_schematic_ui.png
:width: 800
:alt: Import schematic UI


Using the extension
--------------------

1. Open the **Automation** tab in the Circuit interface.
2. Locate and click the **Import Schematic** icon under the Extension Manager.
3. In the user interface:
- Browse for a supported schematic file.
- Select the file and ensure its path appears in the text field.
- Click **Import** to load the schematic into Circuit.
4. Toggle between light and dark themes using the button in the bottom-right corner.


Command line
------------

You can also launch the extension directly from the terminal.

The script accepts the following argument:

- ``**asc_file**``:
Specifies the path to the schematic file to be imported.
The file must exist and should have one of the supported extensions.
Example: `"C:/schematics/example.asc"`

Use the following command syntax:

.. toctree::
:maxdepth: 2

../commandline


Supported file types
--------------------

The following schematic file formats are supported:
- **.asc**: Schematic files
- **.sp**: SPICE netlist files
- **.cir**: Circuit schematic files
- **.qcv**: QCV-specific files

Each file type can be imported using the user interface or through the command line.
Ensure that the file exists at the specified path and is properly formatted.
11 changes: 11 additions & 0 deletions doc/source/User_guide/pyaedt_extensions_doc/circuit/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Circuit extensions
==================

.. grid:: 2

.. grid-item-card:: Import schematic
:link: import_schematic
:link-type: doc
:margin: 2 2 0 0

Import different schematic files (.asc, .sp, .cir, .qcv) into Circuit.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Choke designer
==============

You can design a choke in HFSS.
The **Choke designer** extension enables users to create and customize choke configurations and export the generated
geometry to HFSS.

You can access the extension from the icon created on the **Automation** tab using the Extension Manager.
The extension provides a graphical user interface for configuration,
or it can be used in batch mode via command line arguments.

The following image shows the extension user interface:

Expand All @@ -12,14 +14,57 @@ The following image shows the extension user interface:
:alt: Choke Designer UI


The available argument is: ``choke_config``.
Features
--------

The ``choke_config`` parameter is a dictionary with choke configuration file content. See more information: :ref:`choke-file`.
- Configuring choke parameters including core dimensions, windings, layers, and material properties.
- Exporting designs to HFSS.
- Saving and loading configurations as JSON files.
- Switching between light and dark themes in the user interface.

You can also launch the extension user interface from the terminal. An example can be found here:

Using the extension
-------------------

1. Open the **Automation** tab in the HFSS interface.
2. Locate and click the **Choke designer** icon under the Extension Manager.
3. In the user interface:
- Adjust configuration parameters in the **Left panel** using radio buttons for options such as number of windings and layer types.
- Modify detailed parameters for the core and windings in the **Right Panel** under respective tabs.
- Use the buttons at the bottom to:
- Save the current configuration as a `.json` file.
- Load an existing configuration file.
- Toggle between light and dark themes.
4. To export to HFSS, click **Export to HFSS**. Ensure that parameters are valid before exporting.
5. Adjust the settings for light or dark theme using the toggle button in the bottom-right corner.


Command line
------------

The extension can also be used directly via the command line for batch processing.


Use the following syntax to run the extension:

.. toctree::
:maxdepth: 2

../commandline
../commandline


Example configuration file
--------------------------

Here is an example of a choke configuration in JSON format: :ref:`choke-file`.

Ensure the parameters are valid before importing.


Validation rules
----------------

- The outer radius must be greater than the inner radius for the core and windings.
- Heights and wire diameters must be positive.

The user interface provides detailed feedback on validation errors in the form of message boxes.
7 changes: 7 additions & 0 deletions doc/source/User_guide/pyaedt_extensions_doc/hfss/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ HFSS extensions
:margin: 2 2 0 0

Design a choke and import it in HFSS.

.. grid-item-card:: Push excitation from file
:link: push_excitation
:link-type: doc
:margin: 2 2 0 0

Edit a source from file data in HFSS.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Push excitation from file
=========================

The **push excitation from file** extension allows users to assign a time-domain excitation to a port in an HFSS design
by importing data from a file.

The extension provides a graphical user interface (GUI) for configuration,
or it can be used in batch mode via command line arguments.

Features
--------

- Automatically detects and lists available ports in the active HFSS design.
- Allows users to browse and select a time-domain excitation file.
- Supports both light and dark themes for the GUI.
- Assigns excitations programmatically using a batch-mode interface.
- Validates file paths and port selections to ensure proper configuration.

The following image shows the extension user interface:

.. image:: ../../../_static/extensions/push_excitation.png
:width: 800
:alt: Push excitation UI


Using the extension
--------------------

1. Open the **Automation** tab in the HFSS interface.
2. Locate and click the **push excitation from file** icon under the Extension Manager.
3. The main window displays the following elements:
- **Port selection**: A dropdown menu to select the desired port from the HFSS design.
- **File browser**: A text box and button to select the excitation file.
- **Push excitation button**: A button to assign the excitation to the selected port.
- **Theme toggle**: A button to switch between light and dark themes.
3. Click **Push excitation** after selecting the port and file to apply the configuration.


Command line
------------

The extension can also be used directly via the command line for batch processing.

Supported arguments include:

- **file path**: Path to the excitation file.
- **choice**: Name of the port to assign the excitation.
- **is batch**: Boolean flag to enable batch mode.

Use the following syntax to run the extension:

.. toctree::
:maxdepth: 2

../commandline
Loading

0 comments on commit 3735ef4

Please sign in to comment.