mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#584) Linked Views: Use Range filter mapping only when ecl bbox is inside geom bbox
Set range and propfilter linking default off
This commit is contained in:
parent
0405584bb6
commit
658849eefc
@ -76,8 +76,8 @@ RimViewController::RimViewController(void)
|
||||
m_syncVisibleCells.xmlCapability()->setIOWritable(false);
|
||||
m_syncVisibleCells.xmlCapability()->setIOReadable(false);
|
||||
|
||||
CAF_PDM_InitField(&m_syncRangeFilters, "SyncRangeFilters", true, "Range Filters", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncPropertyFilters, "SyncPropertyFilters", true,"Property Filters", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncRangeFilters, "SyncRangeFilters", false, "Range Filters", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncPropertyFilters, "SyncPropertyFilters", false,"Property Filters", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -729,7 +729,30 @@ bool RimViewController::isVisibleCellsOveridden()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimViewController::isRangeFilterControlPossible()
|
||||
{
|
||||
return true; //!isMasterAndDepViewDifferentType();
|
||||
if (!isMasterAndDepViewDifferentType()) return true;
|
||||
|
||||
// Make sure the cases are in the same domain
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(masterView());
|
||||
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>(masterView());
|
||||
if (!geomView) geomView = managedGeoView();
|
||||
if (!eclipseView) eclipseView = managedEclipseView();
|
||||
|
||||
if (eclipseView && geomView)
|
||||
{
|
||||
if (eclipseView->eclipseCase()->reservoirData() && geomView->geoMechCase()->geoMechData())
|
||||
{
|
||||
RigMainGrid* eclGrid = eclipseView->eclipseCase()->reservoirData()->mainGrid();
|
||||
RigFemPart* femPart = geomView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||
|
||||
if (eclGrid && femPart)
|
||||
{
|
||||
cvf::BoundingBox fembb = femPart->boundingBox();
|
||||
cvf::BoundingBox eclbb = eclGrid->boundingBox();
|
||||
return fembb.contains(eclbb.min()) && fembb.contains(eclbb.max());
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -477,3 +477,17 @@ void RigMainGrid::findIntersectingCells(const cvf::BoundingBox& inputBB, std::ve
|
||||
|
||||
m_cellSearchTree->findIntersections(inputBB, cellIndices);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RigMainGrid::boundingBox() const
|
||||
{
|
||||
if (m_boundingBox.isValid()) return m_boundingBox;
|
||||
|
||||
for (size_t i = 0; i < m_nodes.size(); ++i)
|
||||
{
|
||||
m_boundingBox.add(m_nodes[i]);
|
||||
}
|
||||
return m_boundingBox;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
void setFlipAxis(bool flipXAxis, bool flipYAxis);
|
||||
void findIntersectingCells(const cvf::BoundingBox& inputBB, std::vector<size_t>* cellIndices) const;
|
||||
|
||||
cvf::BoundingBox boundingBox() const;
|
||||
private:
|
||||
void initAllSubGridsParentGridPointer();
|
||||
void initAllSubCellsMainGridCellIndex();
|
||||
@ -87,7 +87,8 @@ private:
|
||||
cvf::ref<RigFaultsPrCellAccumulator> m_faultsPrCellAcc;
|
||||
|
||||
cvf::Vec3d m_displayModelOffset;
|
||||
mutable cvf::ref<cvf::BoundingBoxTree> m_cellSearchTree;
|
||||
mutable cvf::ref<cvf::BoundingBoxTree> m_cellSearchTree;
|
||||
mutable cvf::BoundingBox m_boundingBox;
|
||||
|
||||
bool m_flipXAxis;
|
||||
bool m_flipYAxis;
|
||||
|
Loading…
Reference in New Issue
Block a user