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

grpc: Add extraction of surface geometry and intersection geometry #11199

Open
magnesj opened this issue Feb 14, 2024 · 0 comments · May be fixed by CeetronSolutions/ResInsight#1
Open

grpc: Add extraction of surface geometry and intersection geometry #11199

magnesj opened this issue Feb 14, 2024 · 0 comments · May be fixed by CeetronSolutions/ResInsight#1
Assignees
Labels
Enhancement An addition that can be observed by the user

Comments

@magnesj
Copy link
Member

magnesj commented Feb 14, 2024

The WebViz project want to use ResInsight to extract selected geometry structures from 3D grid models. The following functionality is requested:

  • based on a cell filter, extract the polygons for visible cell surfaces and their corresponding global cell ID
  • based on a polyline, create a vertical fence and extract geometry along this fence

Suggested service API

  • create a new proto file for these two operations GridGeometryExtraction.proto
  • create a file VectorDefines.proto and move Vec3d from Defines.proto into this file. Add Vec2d.
  • use the automation in ResInsight to compile the proto files for C++ and Python
  • add service similar to RiaGrpcProjectService
  • this API is intended to be used directly based on the proto definition, potentially from Go. Do not create additional Python code as other classes used by ResInsight has.

Workflow in ResInsight

When message is received from client

  • open the grid
  • create a view
  • populate view with requested cell filters or intersection geometry
  • produce geometry
  • close down view, but keep grid model loaded
    Send response to client

Grid surface geometry

Investigate existing solution in ResInsight and consider how to access this information. Relevant classes are StructGridGeometryGenerator and RivGridPartMgr

Extraction of geometry based on a polyline

Investigate existing solution in ResInsight and consider how to access this information. Relevant classes are RivExtrudedCurveIntersectionGeometryGenerator

Access this generator from RimExtrudedCurveIntersection::intersectionGeometryGenerator

Development comments

Import of a grid model is a heavy job. Investigate how the grid can be reused between requests, consider eviction of loaded grids based on a count threshold and least recently used concept.

Example of import of model with only grid RicfLoadCase::execute()

Creation of a view and cell filters are considered lightweight and views can be deleted after use.

First prototype

  • create a mock model using RiaApplication::createMockModel()
  • extract geometry using m_vertices in StructGridGeometryGenerator
  • send surface geometry to GRPC
  • use Plotly to investigate the generated geometry https://plotly.com/python/3d-mesh/

Other references

Prototyping of well path extraction data to WebViz using Plotly
equinor/webviz-subsurface@master...magnesj:webviz-subsurface:ri-prototype-intersection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An addition that can be observed by the user
Projects
None yet
2 participants