Skip to content

#14439 Create 2D intersection views for views in a grid ensemble - #14440

Draft
magnesj wants to merge 1 commit into
devfrom
14439-2d-intersection-view-grid-ensemble
Draft

#14439 Create 2D intersection views for views in a grid ensemble#14440
magnesj wants to merge 1 commit into
devfrom
14439-2d-intersection-view-grid-ensemble

Conversation

@magnesj

@magnesj magnesj commented Aug 1, 2026

Copy link
Copy Markdown
Member

Fixes #14439

Problem

Rim2dIntersectionViewCollection::syncFromExistingIntersections() collected the intersections to create 2D views for by walking the PDM child tree of the case:

parentCase->descendantsIncludingThisOfType<RimExtrudedCurveIntersection>();

This only works when the 3D view is a child of the case. Views located in RimReservoirGridEnsemble::m_viewCollection, RimEclipseCaseEnsemble::m_viewCollection or RimOilField::eclipseViewCollection are not, so no Rim2dIntersectionView was created, RimExtrudedCurveIntersection::correspondingIntersectionView() returned nullptr and "Show 2D Intersection View" did nothing. This is also the root cause of the crash in #14379, which was only guarded against in febea598dc.

Changes

Rim2dIntersectionViewCollection

  • Build the intersection list from the grid views that display the case instead of from PDM descendants of the case. A file local gridViewsForCase() starts from RimCase::gridViews() and adds the views of the owning RimEclipseCaseEnsemble / RimReservoirGridEnsemble view collection, filtered on ownerCase().
  • Update the connected editors of the owning grid ensemble after sync, so the new tree node shows up.

RimReservoirGridEnsemble

  • Added defineUiTreeOrdering() placing the non-empty "2D Intersection Views" collections of the member cases directly under the ensemble, right after "Views". Only active for MainWindow.ProjectTree, other tree configurations keep the default children.

RimEclipseCase

  • Do not add m_2dIntersectionViewCollection under the case node when the case belongs to a RimReservoirGridEnsemble, to avoid showing the same object twice in the project tree.

Not addressed

RimEclipseCase::reservoirViews() still does not report views located in an ensemble view collection, so RimCase::views() and RimProject::allViews() remain incomplete for ensemble views. Fixing that would likely repair this and other features at once, but is a considerably broader behavioural change.

Draft: builds clean and the unit tests pass, but the tree placement and the "Show 2D Intersection View" action have not been verified interactively on an ensemble project yet.

Rim2dIntersectionViewCollection::syncFromExistingIntersections() found the
intersections by walking the PDM child tree of the case. Views located in a
grid ensemble view collection or in the project level view collection are not
children of the case, so no 2D intersection view was created for their
intersections and "Show 2D Intersection View" did nothing.

Collect the intersections from the grid views displaying the case instead.

Display the 2D intersection views as a child of RimReservoirGridEnsemble, next
to the 3D views they are created from, and skip the node on the case to avoid
showing the same object twice in the project tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2D Intersection View missing for views in a grid ensemble

1 participant