Skip to content

feat: visualize well intersection in geos-trame #83

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

Merged
merged 7 commits into from
May 23, 2025

Conversation

lucas-givord
Copy link
Contributor

@lucas-givord lucas-givord commented Apr 18, 2025

This PR add intersection capability in geos-trame when a user want to display a well and a perforation (part of #85)

The DeckViewer has been improved to control well and perforation radius with slider widgets.

Preview of the 3DView with few perforation and well

image

close #86

@lucas-givord lucas-givord requested review from mlemayTTE and margauxraguenel and removed request for mlemayTTE April 18, 2025 11:52
@lucas-givord lucas-givord self-assigned this Apr 18, 2025
@lucas-givord lucas-givord changed the title feature: visualize well interesection in geos-trame feat: visualize well interesection in geos-trame Apr 18, 2025
@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch from 63b5196 to 78b5427 Compare April 18, 2025 12:18
@lucas-givord lucas-givord changed the title feat: visualize well interesection in geos-trame feat: visualize well intersection in geos-trame Apr 18, 2025
@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch from 78b5427 to 240f54e Compare April 18, 2025 13:17
Improve DeckViewer to be able to show mesh (Region), wells
(InternalWell, Vtkmesh) and perforation (Perforation)

Update also the gui to be able to hide and control radius property of
these datas.
@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch from 240f54e to 9d78f30 Compare April 18, 2025 13:25
@mlemayTTE
Copy link
Contributor

mlemayTTE commented Apr 22, 2025

@lucas-givord geos-trame install works but when running geos-trame it seems the directory "geos-trame/src/geos_trame/module/serve" is missing. This directory was present in the previous delivery of geos-trame.

geos-trame -I PATH/TO/GEOS_DECK.xml
VCard.water_x is missing
Traceback (most recent call last):
  File "<ROOT>/.venv/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 564, in __init__
    directory = Path(directory).expanduser().resolve(strict=True)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<PYTHON_PATH>/Python-3.11.11/lib/python3.11/pathlib.py", line 993, in resolve
    s = os.path.realpath(self, strict=strict)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 416, in realpath
  File "<frozen posixpath>", line 451, in _joinrealpath
FileNotFoundError: [Errno 2] No such file or directory: '<ROOT>/geos-trame/src/geos_trame/module/serve'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<ROOT>/.venv/bin/geos-trame", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "<ROOT>/geos-trame/src/geos_trame/app/__main__.py", line 35, in main
    app.server.start( **kwargs )
  File "<ROOT>/.venv/lib/python3.11/site-packages/trame_server/core.py", line 687, in start
    task = CoreServer.server_start(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/trame_server/protocol.py", line 50, in server_start
    return server.start_webserver(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/wslink/server.py", line 258, in start_webserver
    ws_server = create_webserver(server_config, backend=backend)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/wslink/server.py", line 168, in create_webserver
    return backends.create_webserver(server_config, backend=backend)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/wslink/backends/__init__.py", line 5, in create_webserver
    return create_webserver(server_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/wslink/backends/aiohttp/__init__.py", line 211, in create_webserver
    return WebAppServer(server_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/wslink/backends/aiohttp/__init__.py", line 109, in __init__
    self.app.add_routes(routes)
  File "<ROOT>/.venv/lib/python3.11/site-packages/aiohttp/web_app.py", line 389, in add_routes
    return self.router.add_routes(routes)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 1281, in add_routes
    registered_routes.extend(route_def.register(self))
                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/aiohttp/web_routedef.py", line 98, in register
    resource = router.add_static(self.prefix, self.path, **self.kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 1205, in add_static
    resource = StaticResource(
               ^^^^^^^^^^^^^^^
  File "<ROOT>/.venv/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 566, in __init__
    raise ValueError(f"'{directory}' does not exist") from error
ValueError: '<ROOT>/geos-trame/src/geos_trame/module/serve' does not exist

@lucas-givord
Copy link
Contributor Author

@mlemayTTE geos_trame/module/serve folder is generated by npm, I believe you need to follow the Build and install the Vue components step. Let me know if it fixed the issue, otherwise I will check and update the README.

@mlemayTTE
Copy link
Contributor

@lucas-givord ok following the README.md, the geos_trame/module/serve folder is generated, and I can launch trame.

@alexbenedicto alexbenedicto self-requested a review May 14, 2025 14:13
@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch 5 times, most recently from d0f8999 to 7f2b31c Compare May 20, 2025 11:32
@lucas-givord
Copy link
Contributor Author

@mlemayTTE could you please review and test it?

Copy link
Contributor

@mlemayTTE mlemayTTE left a comment

Choose a reason for hiding this comment

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

Ok for me ! @alexbenedicto could you merge this PR when you have some time?
By now Trame is independant from the other packages, but we will work on mutualizing functions in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to use git-lfs for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't push this .vtu file, it seems that this repository reached is limit with lfs:

batch response: This repository exceeded its LFS budget. The account responsible for the budget should increase it to restore access.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have modified my test and the associated deck to not have to push this vtu (I reuse the .vtu from another test). Let me know if I need to modify something else

@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch 3 times, most recently from 2f8aae7 to 09de5a0 Compare May 23, 2025 06:56
@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch from 09de5a0 to db0659c Compare May 23, 2025 07:15
Previously we didn't take in account the connectivty.

The geosDeck used in the test has been updated to check this fix.
Adding an alert system to notify user about error. It is used in the
viewer.py to notify the user about missing dataset mandaotry to read a
well or a perforation
To avoid LFS storage limit, test_well_intersection will reuse the mesh
from the other deck xml.
@lucas-givord lucas-givord force-pushed the lgivord/feature/add_intersection_from_polyline branch from db0659c to 4b4c384 Compare May 23, 2025 07:16
@alexbenedicto alexbenedicto merged commit 06f477e into main May 23, 2025
39 checks passed
@alexbenedicto alexbenedicto deleted the lgivord/feature/add_intersection_from_polyline branch May 23, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve ergonomy: trigerring the "eye buttons" to view or not some objects
3 participants