mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#815 Initialize intersection boxes after loading of case
This commit is contained in:
@@ -706,6 +706,8 @@ void RimEclipseView::loadDataAndUpdate()
|
|||||||
this->faultCollection()->setReservoirView(this);
|
this->faultCollection()->setReservoirView(this);
|
||||||
this->faultCollection()->syncronizeFaults();
|
this->faultCollection()->syncronizeFaults();
|
||||||
|
|
||||||
|
this->intersectionBoxCollection()->initialize();
|
||||||
|
|
||||||
m_reservoirGridPartManager->clearGeometryCache();
|
m_reservoirGridPartManager->clearGeometryCache();
|
||||||
|
|
||||||
syncronizeWellsWithResults();
|
syncronizeWellsWithResults();
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ void RimGeoMechView::loadDataAndUpdate()
|
|||||||
updateViewerWidget();
|
updateViewerWidget();
|
||||||
|
|
||||||
this->geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters();
|
this->geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters();
|
||||||
|
|
||||||
|
this->intersectionBoxCollection()->initialize();
|
||||||
|
|
||||||
this->scheduleCreateDisplayModelAndRedraw();
|
this->scheduleCreateDisplayModelAndRedraw();
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "RivIntersectionBoxPartMgr.h"
|
#include "RivIntersectionBoxPartMgr.h"
|
||||||
|
|
||||||
#include "cafPdmUiSliderEditor.h"
|
#include "cafPdmUiSliderEditor.h"
|
||||||
|
#include "RimCase.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -97,9 +98,35 @@ void RimIntersectionBox::setModelBoundingBox(cvf::BoundingBox& boundingBox)
|
|||||||
maxXCoord = cvf::Math::ceil(boundingBox.max().x());
|
maxXCoord = cvf::Math::ceil(boundingBox.max().x());
|
||||||
maxYCoord = cvf::Math::ceil(boundingBox.max().y());
|
maxYCoord = cvf::Math::ceil(boundingBox.max().y());
|
||||||
maxZCoord = cvf::Math::ceil(boundingBox.max().z());
|
maxZCoord = cvf::Math::ceil(boundingBox.max().z());
|
||||||
|
|
||||||
|
updateLabelsFromBoundingBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimIntersectionBox::updateLabelsFromBoundingBox()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
QString range = QString(" [%1 - %2]").arg(m_boundingBox.min().x()).arg(m_boundingBox.max().x());
|
||||||
|
minXCoord.uiCapability()->setUiName(QString("Min X") + range);
|
||||||
|
maxXCoord.uiCapability()->setUiName(QString("Min X") + range);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QString range = QString(" [%1 - %2]").arg(m_boundingBox.min().y()).arg(m_boundingBox.max().y());
|
||||||
|
minYCoord.uiCapability()->setUiName(QString("Min Y") + range);
|
||||||
|
maxYCoord.uiCapability()->setUiName(QString("Min Y") + range);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QString range = QString(" [%1 - %2]").arg(m_boundingBox.min().z()).arg(m_boundingBox.max().z());
|
||||||
|
minZCoord.uiCapability()->setUiName(QString("Min Z") + range);
|
||||||
|
maxZCoord.uiCapability()->setUiName(QString("Min Z") + range);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -110,6 +137,21 @@ RivIntersectionBoxPartMgr* RimIntersectionBox::intersectionBoxPartMgr()
|
|||||||
return m_intersectionBoxPartMgr.p();
|
return m_intersectionBoxPartMgr.p();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimIntersectionBox::initialize()
|
||||||
|
{
|
||||||
|
RimCase* rimCase = NULL;
|
||||||
|
firstAnchestorOrThisOfType(rimCase);
|
||||||
|
if (rimCase)
|
||||||
|
{
|
||||||
|
m_boundingBox = rimCase->activeCellsBoundingBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
updateLabelsFromBoundingBox();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -155,12 +197,23 @@ void RimIntersectionBox::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
|
|||||||
{
|
{
|
||||||
uiOrdering.add(&name);
|
uiOrdering.add(&name);
|
||||||
|
|
||||||
/*
|
{
|
||||||
uiOrdering.add(&minXCoord);
|
caf::PdmUiGroup* group = uiOrdering.addNewGroup("X Coordinates");
|
||||||
uiOrdering.add(&maxXCoord);
|
group->add(&minXCoord);
|
||||||
|
group->add(&maxXCoord);
|
||||||
|
}
|
||||||
|
|
||||||
uiOrdering.setForgetRemainingFields(true);
|
{
|
||||||
*/
|
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Y Coordinates");
|
||||||
|
group->add(&minYCoord);
|
||||||
|
group->add(&maxYCoord);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Z Coordinates");
|
||||||
|
group->add(&minZCoord);
|
||||||
|
group->add(&maxZCoord);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -47,9 +47,11 @@ public:
|
|||||||
|
|
||||||
RivIntersectionBoxPartMgr* intersectionBoxPartMgr();
|
RivIntersectionBoxPartMgr* intersectionBoxPartMgr();
|
||||||
|
|
||||||
|
void initialize();
|
||||||
void setModelBoundingBox(cvf::BoundingBox& boundingBox);
|
void setModelBoundingBox(cvf::BoundingBox& boundingBox);
|
||||||
|
|
||||||
|
void updateLabelsFromBoundingBox();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||||
|
|||||||
@@ -176,3 +176,14 @@ bool RimIntersectionBoxCollection::hasActiveCrossSectionForSimulationWell(RimEcl
|
|||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimIntersectionBoxCollection::initialize()
|
||||||
|
{
|
||||||
|
for (auto intersectionBox : m_intersectionBoxes())
|
||||||
|
{
|
||||||
|
intersectionBox->initialize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ public:
|
|||||||
|
|
||||||
bool hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const;
|
bool hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const;
|
||||||
|
|
||||||
|
void initialize();
|
||||||
|
|
||||||
// Visualization interface
|
// Visualization interface
|
||||||
|
|
||||||
void applySingleColorEffect();
|
void applySingleColorEffect();
|
||||||
|
|||||||
Reference in New Issue
Block a user