From 9d4433267903bc4c5dc9e981b1d8dfd23a4ab89f Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Thu, 3 Oct 2024 08:46:25 -0500 Subject: [PATCH 01/26] adding whatsnew.rst --- doc/source/index.rst | 4 ++-- doc/source/whatsnew.rst | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 doc/source/whatsnew.rst diff --git a/doc/source/index.rst b/doc/source/index.rst index 73478d69e..42a7d002e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -14,7 +14,6 @@ :width: 580px :align: center - Python API to interact with `Ansys Mechanical`_ (FEA software for structural engineering) from **2023R2** and later versions. .. grid:: 3 @@ -118,4 +117,5 @@ Python API to interact with `Ansys Mechanical`_ (FEA software for structural eng contributing kil/index faq - changelog \ No newline at end of file + changelog + whatsnew \ No newline at end of file diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst new file mode 100644 index 000000000..09e6580fa --- /dev/null +++ b/doc/source/whatsnew.rst @@ -0,0 +1,39 @@ +.. _ref_whatsnew: + +What's new +========== + +Discover the latest updates in PyMechanical, including new features, +performance enhancements, and bug fixes designed to improve your experience. + +v0.11.x +------- + +Launch GUI +^^^^^^^^^^ + +Open the project files with Mechanical GUI. + +.. code:: python + + launch_gui() + +Opens up the saved ``.mechdb`` or ``.mechdat`` files. + +Visualize geometry in 3D +^^^^^^^^^^^^^^^^^^^^^^^^ + +Visualize imported geometry in 3D. This feature is available only from 24R1 or later. + +.. code:: python + + import ansys.mechanical.core as mech + from ansys.mechanical.core.examples import delete_downloads, download_file + + app = mech.App(version=242) + app.update_globals(globals()) + + # Import the geometry + + # visualize + app.plot() From 8cf817e30cc38d9e71e547bd2ad8ac945769e3e9 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Thu, 10 Oct 2024 08:59:50 +0200 Subject: [PATCH 02/26] feat: add html and sphinx event --- doc/source/_templates/whatsnew_sidebar.html | 62 +++++++++++++++++++++ doc/source/conf.py | 36 ++++++++++-- doc/source/whatsnew.rst | 4 ++ 3 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 doc/source/_templates/whatsnew_sidebar.html diff --git a/doc/source/_templates/whatsnew_sidebar.html b/doc/source/_templates/whatsnew_sidebar.html new file mode 100644 index 000000000..054134862 --- /dev/null +++ b/doc/source/_templates/whatsnew_sidebar.html @@ -0,0 +1,62 @@ +
+

What's New

+
    + {% for whatsnew in whatsnew_content %} + {{ whatsnew }} + {% set title = whatsnew.get('title') %} + {% set url = whatsnew.get('url') %} + {% set children = whatsnew.get('children') %} +
  • + {{ title }} + +
  • + {% endfor %} +
+
+ + + \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 3d403f2f8..c6a8e73d6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -207,10 +207,10 @@ "icon": "fa fa-comment fa-fw", }, ], - "cheatsheet": { - "file": "cheatsheet/cheat_sheet.qmd", - "title": "PyMechanical cheat sheet", - }, + # "cheatsheet": { + # "file": "cheatsheet/cheat_sheet.qmd", + # "title": "PyMechanical cheat sheet", + # }, "ansys_sphinx_theme_autoapi": {"project": project, "templates": "_templates/autoapi"}, "navigation_depth": 10, } @@ -224,6 +224,7 @@ "changelog": [], "examples/index": [], "contributing": [], + "index": ["sidebar-nav-bs.html", "whatsnew_sidebar.html"], } html_show_sourcelink = False @@ -314,3 +315,30 @@ linkcheck_ignore.append( f"https://github.com/ansys/pymechanical/releases/tag/v{pymechanical.__version__}" ) + + +from docutils import nodes + +def add_whatsnew(app, pagename, templatename, context, doctree): + """Add what's new section to the context.""" + if pagename != "whatsnew": + return + + docs_content = doctree.traverse(nodes.section) + + for docs_content in docs_content: + contents = { + "title": docs_content[0].astext(), + "children": docs_content.traverse(nodes.paragraph)[0].astext(), + "url": "", + } + yield contents if contents["title"].startswith("v0") else None + + # filter the whatsnew content, only take the title strat with v0 * + # whats_new_content = [content for content in whats_new_content if content["title"].startswith("v0")] + print(contents) + # context["whatsnew_content"] = whats_new_content + + +def setup(app): + app.connect("html-page-context", add_whatsnew) \ No newline at end of file diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst index 09e6580fa..d0aa79498 100644 --- a/doc/source/whatsnew.rst +++ b/doc/source/whatsnew.rst @@ -20,6 +20,10 @@ Open the project files with Mechanical GUI. Opens up the saved ``.mechdb`` or ``.mechdat`` files. + +v0.10.x +------- + Visualize geometry in 3D ^^^^^^^^^^^^^^^^^^^^^^^^ From 14ac8e6f48f3b320d3baaa542140b453c2c91b1d Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 15 Oct 2024 10:45:42 +0200 Subject: [PATCH 03/26] fix: update the conf file --- doc/source/_templates/whatsnew_sidebar.html | 62 --------------------- doc/source/conf.py | 42 ++++---------- pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 95 deletions(-) delete mode 100644 doc/source/_templates/whatsnew_sidebar.html diff --git a/doc/source/_templates/whatsnew_sidebar.html b/doc/source/_templates/whatsnew_sidebar.html deleted file mode 100644 index 054134862..000000000 --- a/doc/source/_templates/whatsnew_sidebar.html +++ /dev/null @@ -1,62 +0,0 @@ -
-

What's New

-
    - {% for whatsnew in whatsnew_content %} - {{ whatsnew }} - {% set title = whatsnew.get('title') %} - {% set url = whatsnew.get('url') %} - {% set children = whatsnew.get('children') %} -
  • - {{ title }} - -
  • - {% endfor %} -
-
- - - \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index c6a8e73d6..c4ccc9899 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -183,6 +183,7 @@ "github_repo": "pymechanical", "github_version": "main", "doc_path": "doc/source", + # "whatsnew": [{'title': 'v0.11.x', 'children': 'Open the project files with Mechanical GUI.', 'url': ''}, {'title': 'v0.10.x', 'children': 'Visualize imported geometry in 3D. This feature is available only from 24R1 or later.', 'url': ''}] } html_theme_options = { "logo": "pyansys", @@ -207,12 +208,16 @@ "icon": "fa fa-comment fa-fw", }, ], - # "cheatsheet": { - # "file": "cheatsheet/cheat_sheet.qmd", - # "title": "PyMechanical cheat sheet", - # }, + "cheatsheet": { + "file": "cheatsheet/cheat_sheet.qmd", + "title": "PyMechanical cheat sheet", + }, "ansys_sphinx_theme_autoapi": {"project": project, "templates": "_templates/autoapi"}, "navigation_depth": 10, + "whatsnew": { + "file": "whatsnew", + "pages": ["index"], + } } # -- Options for HTMLHelp output --------------------------------------------- @@ -224,7 +229,7 @@ "changelog": [], "examples/index": [], "contributing": [], - "index": ["sidebar-nav-bs.html", "whatsnew_sidebar.html"], + "index": ["sidebar-nav-bs.html"], } html_show_sourcelink = False @@ -315,30 +320,3 @@ linkcheck_ignore.append( f"https://github.com/ansys/pymechanical/releases/tag/v{pymechanical.__version__}" ) - - -from docutils import nodes - -def add_whatsnew(app, pagename, templatename, context, doctree): - """Add what's new section to the context.""" - if pagename != "whatsnew": - return - - docs_content = doctree.traverse(nodes.section) - - for docs_content in docs_content: - contents = { - "title": docs_content[0].astext(), - "children": docs_content.traverse(nodes.paragraph)[0].astext(), - "url": "", - } - yield contents if contents["title"].startswith("v0") else None - - # filter the whatsnew content, only take the title strat with v0 * - # whats_new_content = [content for content in whats_new_content if content["title"].startswith("v0")] - print(contents) - # context["whatsnew_content"] = whats_new_content - - -def setup(app): - app.connect("html-page-context", add_whatsnew) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5da7fc68b..b2282e896 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ tests = [ ] doc = [ "sphinx==8.0.2", - "ansys-sphinx-theme[autoapi]==1.1.2", + "ansys-sphinx-theme[autoapi] @ git+https://github.com/ansys/ansys-sphinx-theme.git@fix/whatsnew", "grpcio==1.66.2", "imageio-ffmpeg==0.5.1", "imageio==2.35.1", From 8f8c1a679d88935a714e3d9a99554a4fa725ed29 Mon Sep 17 00:00:00 2001 From: Revathy Venugopal <104772255+Revathyvenugopal162@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:47:24 +0200 Subject: [PATCH 04/26] fix: Update doc/source/conf.py --- doc/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index c4ccc9899..f3523da98 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -183,7 +183,6 @@ "github_repo": "pymechanical", "github_version": "main", "doc_path": "doc/source", - # "whatsnew": [{'title': 'v0.11.x', 'children': 'Open the project files with Mechanical GUI.', 'url': ''}, {'title': 'v0.10.x', 'children': 'Visualize imported geometry in 3D. This feature is available only from 24R1 or later.', 'url': ''}] } html_theme_options = { "logo": "pyansys", From f476255bb81bfeb5119289e1f284ae77c8999cbc Mon Sep 17 00:00:00 2001 From: Revathy Venugopal <104772255+Revathyvenugopal162@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:48:01 +0200 Subject: [PATCH 05/26] fix: remove unused sidebar --- doc/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index f3523da98..15531a66f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -228,7 +228,6 @@ "changelog": [], "examples/index": [], "contributing": [], - "index": ["sidebar-nav-bs.html"], } html_show_sourcelink = False From 65a359b5c31f11c79079587db14d0a15ec22ca36 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:48:53 +0000 Subject: [PATCH 06/26] chore: auto fixes from pre-commit hooks --- doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 15531a66f..50b33ab54 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -216,7 +216,7 @@ "whatsnew": { "file": "whatsnew", "pages": ["index"], - } + }, } # -- Options for HTMLHelp output --------------------------------------------- From 1c9706b8f488df60a3f844b177c0049e6860ee40 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:50:15 +0000 Subject: [PATCH 07/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/945.added.md diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md new file mode 100644 index 000000000..462ce19c0 --- /dev/null +++ b/doc/changelog.d/945.added.md @@ -0,0 +1 @@ +add whats new section \ No newline at end of file From eb5b0086652637db354257e52a95b1e8a79af378 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:50:28 +0000 Subject: [PATCH 08/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From 30faa52d5a5d72e81797b51e041d3fbe1c68eb81 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:51:43 +0000 Subject: [PATCH 09/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..462ce19c0 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add whats new section \ No newline at end of file From 02cd39d9f64d8493bd51b49e6ecbb16d98dc4682 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:52:03 +0000 Subject: [PATCH 10/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From 0645cb33c06ac1af6bab2c89145becf54191b7d9 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:53:29 +0000 Subject: [PATCH 11/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..462ce19c0 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add whats new section \ No newline at end of file From 6d6b3dfd5f4b57a5947f7da0b1f2c1f20a54c370 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:55:23 +0000 Subject: [PATCH 12/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From ae91c0cb067ea5a7672d8d46ecbc93d11b7cc45c Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:56:35 +0000 Subject: [PATCH 13/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..462ce19c0 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add whats new section \ No newline at end of file From 8dad6a5950d4fca755523e07627c9c90f1b95a6c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:59:34 +0000 Subject: [PATCH 14/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From eff8a1545d4e8b3504715ab02306a9a08c9b7822 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:00:38 +0000 Subject: [PATCH 15/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..462ce19c0 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add whats new section \ No newline at end of file From c97bbfcf3e709973c721b4f174a7afae90e19de1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:01:06 +0000 Subject: [PATCH 16/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From 6ebf95989188a801fca328acd34edb45969c9f84 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:02:12 +0000 Subject: [PATCH 17/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..462ce19c0 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add whats new section \ No newline at end of file From a42c57880fdca282485ff31699bccbe2ddc06e34 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:03:47 +0000 Subject: [PATCH 18/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From 470379506a3df9a44eaec5613f349dd74c1cb78d Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:04:47 +0000 Subject: [PATCH 19/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..462ce19c0 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add whats new section \ No newline at end of file From 86efa2829d2742a4fdeca55456d2a3cc51cb79cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:04:59 +0000 Subject: [PATCH 20/26] chore: auto fixes from pre-commit hooks --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 462ce19c0..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add whats new section \ No newline at end of file +add what's new section \ No newline at end of file From 6ed5d60dfda232ae47b5b3d717e342b29bc37bd4 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:06:54 +0000 Subject: [PATCH 21/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index 3e8462150..fcc44ffdf 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what's new section \ No newline at end of file +add what is new section \ No newline at end of file From 6d134367cd6d4778e87e759de1608100e1479991 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Tue, 15 Oct 2024 09:22:14 +0000 Subject: [PATCH 22/26] chore: adding changelog file 945.added.md [dependabot-skip] --- doc/changelog.d/945.added.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/945.added.md b/doc/changelog.d/945.added.md index fcc44ffdf..3e8462150 100644 --- a/doc/changelog.d/945.added.md +++ b/doc/changelog.d/945.added.md @@ -1 +1 @@ -add what is new section \ No newline at end of file +add what's new section \ No newline at end of file From 494924ef3d9db534ba2d2970ac890f287977d9a0 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 15 Oct 2024 16:16:35 +0200 Subject: [PATCH 23/26] fix: update the conf file --- doc/source/conf.py | 2 +- doc/source/whatsnew.rst | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index c4ccc9899..88b22a19b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -216,7 +216,7 @@ "navigation_depth": 10, "whatsnew": { "file": "whatsnew", - "pages": ["index"], + "pages": ["index", "changelog"], } } diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst index d0aa79498..7edc095cc 100644 --- a/doc/source/whatsnew.rst +++ b/doc/source/whatsnew.rst @@ -20,6 +20,17 @@ Open the project files with Mechanical GUI. Opens up the saved ``.mechdb`` or ``.mechdat`` files. +Launch GUI with a specific project file +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Open the project files with Mechanical GUI. + +.. code:: python + + launch_gui('path/to/project.mechdb') + +Opens up the specified project file. + v0.10.x ------- @@ -41,3 +52,21 @@ Visualize imported geometry in 3D. This feature is available only from 24R1 or l # visualize app.plot() + +v0.9.x +------- + +Visualize imported geometry in 3D. This feature is available only from 24R1 or later. + +.. code:: python + + import ansys.mechanical.core as mech + from ansys.mechanical.core.examples import delete_downloads, download_file + + app = mech.App(version=242) + app.update_globals(globals()) + + # Import the geometry + + # visualize + app.plot() \ No newline at end of file From 6929fe4a79e67fffbe57defdc1551534d5f614c0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:17:28 +0000 Subject: [PATCH 24/26] chore: auto fixes from pre-commit hooks --- doc/source/whatsnew.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst index 7edc095cc..8b4bebdd4 100644 --- a/doc/source/whatsnew.rst +++ b/doc/source/whatsnew.rst @@ -27,7 +27,7 @@ Open the project files with Mechanical GUI. .. code:: python - launch_gui('path/to/project.mechdb') + launch_gui("path/to/project.mechdb") Opens up the specified project file. From 5a3b5f1c431d049105ea819b812e9c913819dc9c Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Wed, 16 Oct 2024 13:12:42 -0500 Subject: [PATCH 25/26] update whatsnew --- doc/source/whatsnew.rst | 53 ++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst index 8b4bebdd4..68c7690db 100644 --- a/doc/source/whatsnew.rst +++ b/doc/source/whatsnew.rst @@ -12,56 +12,61 @@ v0.11.x Launch GUI ^^^^^^^^^^ -Open the project files with Mechanical GUI. +Open the current project with Mechanical GUI. .. code:: python - launch_gui() + from ansys.mechanical.core import App + app = App() + app.save() + app.launch_gui() -Opens up the saved ``.mechdb`` or ``.mechdat`` files. +Above code opens up the temporarily saved ``.mechdb`` or ``.mechdat`` files. +The files are deleted when GUI is closed . For more info check +`launch_gui() <../api/ansys/mechanical/core/embedding/launch_gui/index.html>`_ function -Launch GUI with a specific project file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Open the project files with Mechanical GUI. +Opens up the specified project file. .. code:: python launch_gui("path/to/project.mechdb") -Opens up the specified project file. - - -v0.10.x -------- +Prints Mechanical project tree +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Visualize geometry in 3D -^^^^^^^^^^^^^^^^^^^^^^^^ - -Visualize imported geometry in 3D. This feature is available only from 24R1 or later. +This feature let you see the heirachial Mechanical project tree. +It also shows whether an object is supressed or not. .. code:: python import ansys.mechanical.core as mech - from ansys.mechanical.core.examples import delete_downloads, download_file - - app = mech.App(version=242) + app = mech.App() app.update_globals(globals()) + app.print_tree() - # Import the geometry +.. code:: shell - # visualize - app.plot() + ... ├── Project + ... | ├── Model + ... | | ├── Geometry Imports + ... | | ├── Geometry + ... | | ├── Materials + ... | | ├── Coordinate Systems + ... | | | ├── Global Coordinate System + ... | | ├── Remote Points + ... | | ├── Mesh -v0.9.x +v0.10.x ------- +Visualize geometry in 3D +^^^^^^^^^^^^^^^^^^^^^^^^ + Visualize imported geometry in 3D. This feature is available only from 24R1 or later. .. code:: python import ansys.mechanical.core as mech - from ansys.mechanical.core.examples import delete_downloads, download_file app = mech.App(version=242) app.update_globals(globals()) From 78477ed49d7e64848397a8b2545d3389cb09fe83 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:13:08 +0000 Subject: [PATCH 26/26] chore: auto fixes from pre-commit hooks --- doc/source/whatsnew.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst index 68c7690db..cbc606b07 100644 --- a/doc/source/whatsnew.rst +++ b/doc/source/whatsnew.rst @@ -12,11 +12,12 @@ v0.11.x Launch GUI ^^^^^^^^^^ -Open the current project with Mechanical GUI. +Open the current project with Mechanical GUI. .. code:: python from ansys.mechanical.core import App + app = App() app.save() app.launch_gui() @@ -35,11 +36,12 @@ Prints Mechanical project tree ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This feature let you see the heirachial Mechanical project tree. -It also shows whether an object is supressed or not. +It also shows whether an object is suppressed or not. .. code:: python import ansys.mechanical.core as mech + app = mech.App() app.update_globals(globals()) app.print_tree()