Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance: Add a file dialog for loading Gmsh file #449

Merged
merged 2 commits into from
Jan 1, 2025

Conversation

yungyuc
Copy link
Member

@yungyuc yungyuc commented Jan 1, 2025

Also upgrade Windows Qt/PySide6 to 6.8.1 with win64_msvc2022_64.

@yungyuc yungyuc added pilot GUI and visualization build Build system and automation mesh Spatial mesh labels Jan 1, 2025
Copy link
Member Author

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Gmsh file dialog:
image

The loaded mesh:
image

This PR adds the file dialog. Additional code restructuring is being worked out and still has issues with Windows CI.

@@ -153,7 +153,7 @@ jobs:
- name: dependency by pip
run: |
sudo pip3 install setuptools
sudo pip3 install numpy pytest flake8 jsonschema
sudo pip3 install numpy matplotlib pytest flake8 jsonschema
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added matplotlib is for followup refactor. It's included with the Qt upgrade so that the other branch of mine does not need to duplicate it.

host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
arch: 'win64_msvc2022_64'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminded by @terrychan999 .

@@ -39,13 +39,15 @@
enable = False
try:
from _modmesh import pilot as _vimpl # noqa: F401

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added by Clion linter.

@@ -71,6 +73,9 @@ def _load():
del _load


_holder = {}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A temporary hack to keep object lifetime.

tip="Create new file",
funcname=lambda: print("This is only a demo: Create new file!"),
)
_holder['gmsh_dialog'] = _mesh.GmshFileDialog(mgr=wm)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a file dialog manager.

@staticmethod
def _get_initial_path():
"""
Search for `tests/data/rectangle.msh` and return the directory holding
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look for the sample data directory.

@@ -68,17 +68,19 @@ class PilotCameraTB:

@classmethod
def setUpClass(cls):
widget = pilot.RManager.instance.setUp().add3DWidget()
if modmesh.HAS_PILOT:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make pilot testing skip more robust.

@yungyuc yungyuc self-assigned this Jan 1, 2025
@yungyuc yungyuc merged commit fa52b10 into solvcon:master Jan 1, 2025
12 checks passed
@yungyuc yungyuc deleted the feature/gmsh-dialog3 branch January 1, 2025 14:52
@yungyuc
Copy link
Member Author

yungyuc commented Jan 1, 2025

@terrychan999 @j8xixo12 I merged the enhancement. If there are issues I will fix in a followup PR.

I continue to restructure the mesh GUI code. It broke windows CI run and I am still troubleshooting.

@yungyuc yungyuc linked an issue Jan 2, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system and automation mesh Spatial mesh pilot GUI and visualization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve code structure for mesh GUI
1 participant