-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test most recent what's new development
- Loading branch information
Showing
8 changed files
with
141 additions
and
153 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
fragments: | ||
|
||
- title: Launch GUI | ||
version: 0.11.8 | ||
content: | | ||
The `launch_gui() <../api/ansys/mechanical/core/embedding/launch_gui/index.html>`_ function | ||
graphically launches the current state of the embedded instance when the | ||
`App <../api/ansys/mechanical/core/embedding/app/App.html>`_ has been saved. | ||
The `launch_gui()` function saves the active `.mechdb` file and creates a copy of the existing | ||
`.mechdb` file with a temporary name. The temporary `.mechdb` file is used to launch the GUI. | ||
By default, the temporary `.mechdb` file is deleted after the GUI is closed, but the user can | ||
specify whether or not to delete the temporary file. | ||
Usage: | ||
.. code:: python | ||
import ansys.mechanical.core as pymechanical | ||
# Initialize and save the app | ||
app = pymechanical.App() | ||
app.save() | ||
# Launch the GUI and delete the temporary `.mechdb` file when the GUI is closed | ||
app.launch_gui() | ||
# Launch the GUI and keep the temporary `.mechdb` file when the GUI is closed | ||
app.launch_gui(delete_tmp_on_close=False) | ||
- title: Autocomplete settings command | ||
version: 0.11.8 | ||
content: | | ||
The ``ansys-mechanical-ideconfig`` command prints the settings that are necessary for | ||
autocomplete to work with ``ansys-mechanical-stubs``. This command takes in three arguments: | ||
- ``--ide``: The IDE that you are using. Currently, the only supported IDE is ``vscode``. | ||
- ``--target``: The location of the settings.json file for VS Code. Can be ``user`` or ``workspace``. | ||
- ``--revision``: The revision of the Mechanical stubs that you want to use. If not provided, | ||
``ansys-tools-path`` will retrieve the Mechanical version from your system. | ||
Usage: | ||
.. code:: shell | ||
ansys-mechanical-ideconfig --ide vscode --target user --revision 251 | ||
Terminal output for Windows user's settings.json file: | ||
.. code:: shell | ||
Update C:\Users\{username}\AppData\Roaming\Code\User\settings.json with the following information: | ||
{ | ||
"python.autoComplete.extraPaths": [ | ||
"{project_directory}\\.venv\\Lib\\site-packages\\ansys\\mechanical\\stubs\\v251" | ||
], | ||
"python.analysis.extraPaths": [ | ||
"{project_directory}\\.venv\\Lib\\site-packages\\ansys\\mechanical\\stubs\\v251" | ||
] | ||
} | ||
- title: Print the Mechanical project tree | ||
version: 0.11.1 | ||
content: | | ||
The `app.print_tree()` function prints the hierarchical tree representation of the | ||
Mechanical project structure and shows whether an object is suppressed or not. | ||
Usage: | ||
.. code:: python | ||
import ansys.mechanical.core as mech | ||
# Initialize the app and update globals | ||
app = mech.App() | ||
app.update_globals(globals()) | ||
# Print the entire tree | ||
app.print_tree() | ||
# Print the entire tree but truncate the output after 2 lines | ||
app.print_tree(max_lines=2) | ||
# Print the tree for the Model and truncate after 3 lines | ||
app.print_tree('Model', 3) | ||
Output for `app.print_tree()`: | ||
.. code:: shell | ||
├── Project | ||
| ├── Model | ||
| | ├── Geometry Imports (⚡︎) | ||
| | ├── Geometry (?) | ||
| | ├── Materials (✓) | ||
| | ├── Coordinate Systems (✓) | ||
| | | ├── Global Coordinate System (✓) | ||
| | ├── Remote Points (✓) | ||
| | ├── Mesh (?) | ||
- title: Visualize geometry in 3D | ||
version: 0.11.4 | ||
content: | | ||
The `app.plot()` function allows you to visualize imported geometry in 3D. This feature is | ||
available only from 24R1 or later and requires the `ansys-mechanical-core[viz]` dependencies | ||
to be installed: | ||
.. code:: shell | ||
pip install ansys-mechanical-core[viz] | ||
Usage: | ||
.. code:: python | ||
import ansys.mechanical.core as mech | ||
# Initialize the app and update globals | ||
app = mech.App() | ||
app.update_globals(globals()) | ||
# Import the geometry | ||
app.open("path/to/file.mechdat") | ||
# Visualize | ||
app.plot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters