mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merged intersection-box into dev
This commit is contained in:
@@ -75,8 +75,8 @@ ${CEE_CURRENT_LIST_DIR}RimWellLogExtractionCurve.h
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogFile.h
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogFileChannel.h
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogFileCurve.h
|
||||
${CEE_CURRENT_LIST_DIR}RimCrossSection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimCrossSectionCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.h
|
||||
${CEE_CURRENT_LIST_DIR}RimGridCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryPlotCollection.h
|
||||
@@ -91,6 +91,8 @@ ${CEE_CURRENT_LIST_DIR}RimSummaryCaseCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimPlotCurve.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.h
|
||||
${CEE_CURRENT_LIST_DIR}RimEclipseInputCaseOpm.h
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionBox.h
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionBoxCollection.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -164,8 +166,8 @@ ${CEE_CURRENT_LIST_DIR}RimWellLogExtractionCurve.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogFile.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogFileChannel.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogFileCurve.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimCrossSection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimCrossSectionCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimGridCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryPlotCollection.cpp
|
||||
@@ -180,6 +182,8 @@ ${CEE_CURRENT_LIST_DIR}RimSummaryCaseCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimPlotCurve.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryCurveAppearanceCalculator.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimEclipseInputCaseOpm.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionBox.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimIntersectionBoxCollection.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimCellRangeFilter.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCrossSection.h"
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
@@ -42,6 +42,8 @@
|
||||
#include "RimGeoMechPropertyFilterCollection.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimIntersectionBoxCollection.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
@@ -211,7 +213,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
commandIds << "RicNewWellLogFileCurveFeature";
|
||||
commandIds << "RicNewWellLogCurveExtractionFeature";
|
||||
commandIds << "RicNewWellPathCrossSectionFeature";
|
||||
commandIds << "RicNewWellPathIntersectionFeature";
|
||||
commandIds << "RicWellPathDeleteFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimCalcScript*>(uiItem))
|
||||
@@ -297,19 +299,29 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
commandIds << "RicAddWellLogToPlotFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimCrossSectionCollection*>(uiItem))
|
||||
else if (dynamic_cast<RimIntersectionCollection*>(uiItem))
|
||||
{
|
||||
commandIds << "RicAppendCrossSectionFeature";
|
||||
commandIds << "RicAppendIntersectionFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimCrossSection*>(uiItem))
|
||||
else if (dynamic_cast<RimIntersection*>(uiItem))
|
||||
{
|
||||
commandIds << "RicAppendCrossSectionFeature";
|
||||
commandIds << "RicAppendIntersectionFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicDeleteItemFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimIntersectionBoxCollection*>(uiItem))
|
||||
{
|
||||
commandIds << "RicAppendIntersectionBoxFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimIntersectionBox*>(uiItem))
|
||||
{
|
||||
commandIds << "RicAppendIntersectionBoxFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicDeleteItemFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimEclipseWell*>(uiItem))
|
||||
{
|
||||
commandIds << "RicNewSimWellCrossSectionFeature";
|
||||
commandIds << "RicNewSimWellIntersectionFeature";
|
||||
}
|
||||
else if(dynamic_cast<RimFormationNames*>(uiItem))
|
||||
{
|
||||
|
||||
@@ -25,14 +25,15 @@
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigResultAccessor.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCrossSection.h"
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
@@ -41,6 +42,7 @@
|
||||
#include "RimEclipseWellCollection.h"
|
||||
#include "RimFaultCollection.h"
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersectionBoxCollection.h"
|
||||
#include "RimLegendConfig.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
@@ -74,7 +76,6 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <limits.h>
|
||||
#include "RigFormationNames.h"
|
||||
|
||||
|
||||
|
||||
@@ -428,6 +429,7 @@ void RimEclipseView::createDisplayModel()
|
||||
|
||||
m_crossSectionVizModel->removeAllParts();
|
||||
crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
intersectionBoxCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
|
||||
@@ -636,10 +638,12 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
intersectionBoxCollection->updateCellResultColor(m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
intersectionBoxCollection->applySingleColorEffect();
|
||||
}
|
||||
|
||||
// Simulation Well pipes
|
||||
@@ -1342,6 +1346,7 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(m_propertyFilterCollection());
|
||||
uiTreeOrdering.add(intersectionBoxCollection());
|
||||
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class RimEclipseCellColors;
|
||||
class RimEclipseWellCollection;
|
||||
class RiuViewer;
|
||||
class RivReservoirPipesPartMgr;
|
||||
class RivCrossSectionPartMgr;
|
||||
class RivIntersectionPartMgr;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RimEclipseWell.h"
|
||||
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWellCollection.h"
|
||||
|
||||
|
||||
@@ -25,16 +25,18 @@
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartGrid.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechCellColors.h"
|
||||
#include "RimGeoMechPropertyFilterCollection.h"
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersectionBoxCollection.h"
|
||||
#include "RimLegendConfig.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
@@ -61,7 +63,6 @@
|
||||
#include "cvfqtUtils.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include "RigFormationNames.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimGeoMechView, "GeoMechView");
|
||||
@@ -162,7 +163,7 @@ void RimGeoMechView::loadDataAndUpdate()
|
||||
updateViewerWidget();
|
||||
|
||||
this->geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters();
|
||||
|
||||
|
||||
this->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
progress.incrementProgress();
|
||||
@@ -251,6 +252,7 @@ void RimGeoMechView::createDisplayModel()
|
||||
|
||||
m_crossSectionVizModel->removeAllParts();
|
||||
crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), scaleTransform());
|
||||
intersectionBoxCollection->appendPartsToModel(m_crossSectionVizModel.p(), scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
// If the animation was active before recreating everything, make viewer view current frame
|
||||
@@ -264,6 +266,9 @@ void RimGeoMechView::createDisplayModel()
|
||||
{
|
||||
updateLegends();
|
||||
m_vizLogic->updateStaticCellColors(-1);
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
intersectionBoxCollection->applySingleColorEffect();
|
||||
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
}
|
||||
}
|
||||
@@ -299,14 +304,22 @@ void RimGeoMechView::updateCurrentTimeStep()
|
||||
m_vizLogic->updateStaticCellColors(m_currentTimeStep());
|
||||
|
||||
if (this->cellResult()->hasResult())
|
||||
{
|
||||
crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
intersectionBoxCollection->updateCellResultColor(m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
|
||||
intersectionBoxCollection->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vizLogic->updateStaticCellColors(-1);
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
intersectionBoxCollection->applySingleColorEffect();
|
||||
|
||||
m_viewer->animationControl()->slotPause(); // To avoid animation timer spinning in the background
|
||||
}
|
||||
|
||||
@@ -677,7 +690,9 @@ void RimGeoMechView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(m_propertyFilterCollection());
|
||||
|
||||
|
||||
uiTreeOrdering.add(intersectionBoxCollection());
|
||||
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimGridSummaryCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "RigSummaryCaseData.h"
|
||||
#include "RimEclipseCase.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@@ -76,6 +78,8 @@ QString RimGridSummaryCase::summaryHeaderFilename() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGridSummaryCase::caseName() const
|
||||
{
|
||||
if (!m_eclipseCase()) return QString();
|
||||
|
||||
return m_eclipseCase()->caseUserDescription();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimCrossSection.h"
|
||||
#include "RimIntersection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RiuViewer.h"
|
||||
#include "RivCrossSectionPartMgr.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
#include "cafCmdFeatureManager.h"
|
||||
@@ -44,31 +44,31 @@
|
||||
namespace caf {
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RimCrossSection::CrossSectionEnum >::setUp()
|
||||
void caf::AppEnum< RimIntersection::CrossSectionEnum >::setUp()
|
||||
{
|
||||
addItem(RimCrossSection::CS_WELL_PATH, "CS_WELL_PATH", "Well Path");
|
||||
addItem(RimCrossSection::CS_SIMULATION_WELL, "CS_SIMULATION_WELL", "Simulation Well");
|
||||
addItem(RimCrossSection::CS_POLYLINE, "CS_POLYLINE", "Polyline");
|
||||
setDefault(RimCrossSection::CS_WELL_PATH);
|
||||
addItem(RimIntersection::CS_WELL_PATH, "CS_WELL_PATH", "Well Path");
|
||||
addItem(RimIntersection::CS_SIMULATION_WELL, "CS_SIMULATION_WELL", "Simulation Well");
|
||||
addItem(RimIntersection::CS_POLYLINE, "CS_POLYLINE", "Polyline");
|
||||
setDefault(RimIntersection::CS_WELL_PATH);
|
||||
}
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RimCrossSection::CrossSectionDirEnum >::setUp()
|
||||
void caf::AppEnum< RimIntersection::CrossSectionDirEnum >::setUp()
|
||||
{
|
||||
addItem(RimCrossSection::CS_VERTICAL, "CS_VERTICAL", "Vertical");
|
||||
addItem(RimCrossSection::CS_HORIZONTAL, "CS_HORIZONTAL", "Horizontal");
|
||||
setDefault(RimCrossSection::CS_VERTICAL);
|
||||
addItem(RimIntersection::CS_VERTICAL, "CS_VERTICAL", "Vertical");
|
||||
addItem(RimIntersection::CS_HORIZONTAL, "CS_HORIZONTAL", "Horizontal");
|
||||
setDefault(RimIntersection::CS_VERTICAL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimCrossSection, "CrossSection");
|
||||
CAF_PDM_SOURCE_INIT(RimIntersection, "CrossSection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCrossSection::RimCrossSection()
|
||||
RimIntersection::RimIntersection()
|
||||
{
|
||||
CAF_PDM_InitObject("Intersection", ":/CrossSection16x16.png", "", "");
|
||||
|
||||
@@ -98,7 +98,7 @@ RimCrossSection::RimCrossSection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCrossSection::~RimCrossSection()
|
||||
RimIntersection::~RimIntersection()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -106,7 +106,7 @@ RimCrossSection::~RimCrossSection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimIntersection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &isActive ||
|
||||
changedField == &type ||
|
||||
@@ -147,7 +147,7 @@ void RimCrossSection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
void RimIntersection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&name);
|
||||
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Intersecting Geometry");
|
||||
@@ -195,7 +195,7 @@ void RimCrossSection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimCrossSection::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> RimIntersection::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@@ -256,7 +256,7 @@ QList<caf::PdmOptionItemInfo> RimCrossSection::calculateValueOptions(const caf::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimCrossSection::userDescriptionField()
|
||||
caf::PdmFieldHandle* RimIntersection::userDescriptionField()
|
||||
{
|
||||
return &name;
|
||||
}
|
||||
@@ -264,7 +264,7 @@ caf::PdmFieldHandle* RimCrossSection::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimCrossSection::objectToggleField()
|
||||
caf::PdmFieldHandle* RimIntersection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ caf::PdmFieldHandle* RimCrossSection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseWellCollection* RimCrossSection::simulationWellCollection()
|
||||
RimEclipseWellCollection* RimIntersection::simulationWellCollection()
|
||||
{
|
||||
RimEclipseView* eclipseView = NULL;
|
||||
firstAncestorOrThisOfType(eclipseView);
|
||||
@@ -288,7 +288,7 @@ RimEclipseWellCollection* RimCrossSection::simulationWellCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector< std::vector <cvf::Vec3d> > RimCrossSection::polyLines() const
|
||||
std::vector< std::vector <cvf::Vec3d> > RimIntersection::polyLines() const
|
||||
{
|
||||
std::vector< std::vector <cvf::Vec3d> > lines;
|
||||
if (type == CS_WELL_PATH)
|
||||
@@ -336,9 +336,9 @@ std::vector< std::vector <cvf::Vec3d> > RimCrossSection::polyLines() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivCrossSectionPartMgr* RimCrossSection::crossSectionPartMgr()
|
||||
RivIntersectionPartMgr* RimIntersection::crossSectionPartMgr()
|
||||
{
|
||||
if (m_crossSectionPartMgr.isNull()) m_crossSectionPartMgr = new RivCrossSectionPartMgr(this);
|
||||
if (m_crossSectionPartMgr.isNull()) m_crossSectionPartMgr = new RivIntersectionPartMgr(this);
|
||||
|
||||
return m_crossSectionPartMgr.p();
|
||||
}
|
||||
@@ -346,7 +346,7 @@ RivCrossSectionPartMgr* RimCrossSection::crossSectionPartMgr()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::updateWellCenterline() const
|
||||
void RimIntersection::updateWellCenterline() const
|
||||
{
|
||||
if (isActive() && type == CS_SIMULATION_WELL && simulationWell())
|
||||
{
|
||||
@@ -366,7 +366,7 @@ void RimCrossSection::updateWellCenterline() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::addExtents(std::vector<cvf::Vec3d> &polyLine) const
|
||||
void RimIntersection::addExtents(std::vector<cvf::Vec3d> &polyLine) const
|
||||
{
|
||||
size_t lineVxCount = polyLine.size();
|
||||
|
||||
@@ -422,7 +422,7 @@ void RimCrossSection::addExtents(std::vector<cvf::Vec3d> &polyLine) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::updateWellExtentDefaultValue()
|
||||
void RimIntersection::updateWellExtentDefaultValue()
|
||||
{
|
||||
RimCase* ownerCase = NULL;
|
||||
firstAncestorOrThisOfType(ownerCase);
|
||||
@@ -440,7 +440,7 @@ void RimCrossSection::updateWellExtentDefaultValue()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::updateName()
|
||||
void RimIntersection::updateName()
|
||||
{
|
||||
if (type == CS_SIMULATION_WELL && simulationWell())
|
||||
{
|
||||
@@ -460,7 +460,7 @@ void RimCrossSection::updateName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::clipToReservoir(std::vector<cvf::Vec3d> &polyLine) const
|
||||
void RimIntersection::clipToReservoir(std::vector<cvf::Vec3d> &polyLine) const
|
||||
{
|
||||
RimCase* ownerCase = NULL;
|
||||
firstAncestorOrThisOfType(ownerCase);
|
||||
@@ -506,7 +506,7 @@ void RimCrossSection::clipToReservoir(std::vector<cvf::Vec3d> &polyLine) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
void RimIntersection::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (field == &inputFromViewerEnabled)
|
||||
{
|
||||
@@ -534,7 +534,7 @@ void RimCrossSection::defineEditorAttribute(const caf::PdmFieldHandle* field, QS
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::appendPointToPolyLine(const cvf::Vec3d& point)
|
||||
void RimIntersection::appendPointToPolyLine(const cvf::Vec3d& point)
|
||||
{
|
||||
m_userPolyline.v().push_back(point);
|
||||
|
||||
@@ -546,7 +546,7 @@ void RimCrossSection::appendPointToPolyLine(const cvf::Vec3d& point)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::rebuildGeometryAndScheduleCreateDisplayModel()
|
||||
void RimIntersection::rebuildGeometryAndScheduleCreateDisplayModel()
|
||||
{
|
||||
m_crossSectionPartMgr = NULL;
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
class RimEclipseWell;
|
||||
class RimEclipseWellCollection;
|
||||
class RimWellPath;
|
||||
class RivCrossSectionPartMgr;
|
||||
class RivIntersectionPartMgr;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimCrossSection : public caf::PdmObject
|
||||
class RimIntersection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
RimCrossSection();
|
||||
~RimCrossSection();
|
||||
RimIntersection();
|
||||
~RimIntersection();
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<bool> isActive;
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
caf::PdmField< bool > inputFromViewerEnabled;
|
||||
|
||||
std::vector< std::vector <cvf::Vec3d> > polyLines() const;
|
||||
RivCrossSectionPartMgr* crossSectionPartMgr();
|
||||
RivIntersectionPartMgr* crossSectionPartMgr();
|
||||
|
||||
void appendPointToPolyLine(const cvf::Vec3d& point);
|
||||
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
void updateName();
|
||||
void rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
private:
|
||||
cvf::ref<RivCrossSectionPartMgr> m_crossSectionPartMgr;
|
||||
cvf::ref<RivIntersectionPartMgr> m_crossSectionPartMgr;
|
||||
|
||||
mutable
|
||||
std::vector< std::vector <cvf::Vec3d> > m_wellBranchCenterlines;
|
||||
406
ApplicationCode/ProjectDataModel/RimIntersectionBox.cpp
Normal file
406
ApplicationCode/ProjectDataModel/RimIntersectionBox.cpp
Normal file
@@ -0,0 +1,406 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimIntersectionBox.h"
|
||||
|
||||
#include "RimView.h"
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
|
||||
#include "cafPdmUiSliderEditor.h"
|
||||
#include "RimCase.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
#include "RimEclipseView.h"
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void AppEnum< RimIntersectionBox::SinglePlaneState >::setUp()
|
||||
{
|
||||
addItem(RimIntersectionBox::PLANE_STATE_NONE, "PLANE_STATE_NONE", "None");
|
||||
addItem(RimIntersectionBox::PLANE_STATE_X, "PLANE_STATE_X", "X Plane");
|
||||
addItem(RimIntersectionBox::PLANE_STATE_Y, "PLANE_STATE_Y", "Y Plane");
|
||||
addItem(RimIntersectionBox::PLANE_STATE_Z, "PLANE_STATE_Z", "Z Plane");
|
||||
setDefault(RimIntersectionBox::PLANE_STATE_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimIntersectionBox, "IntersectionBox");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionBox::RimIntersectionBox()
|
||||
{
|
||||
CAF_PDM_InitObject("Intersection Box", ":/IntersectionBox16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&name, "UserDescription", QString("Intersection Name"), "Name", "", "", "");
|
||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||
isActive.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_singlePlaneState, "singlePlaneState", caf::AppEnum<SinglePlaneState>(SinglePlaneState::PLANE_STATE_NONE), "Collapse box to plane", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_minXCoord, "MinXCoord", 0.0, "MinXCoord", "", "", "");
|
||||
m_minXCoord.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_maxXCoord, "MaxXCoord", 0.0, "MaxXCoord", "", "", "");
|
||||
m_maxXCoord.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_minYCoord, "MinYCoord", 0.0, "MinYCoord", "", "", "");
|
||||
m_minYCoord.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_maxYCoord, "MaxYCoord", 0.0, "MaxYCoord", "", "", "");
|
||||
m_maxYCoord.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_minZCoord, "MinZCoord", 0.0, "MinZCoord", "", "", "");
|
||||
m_minZCoord.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_maxZCoord, "MaxZCoord", 0.0, "MaxZCoord", "", "", "");
|
||||
m_maxZCoord.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionBox::~RimIntersectionBox()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Mat4d RimIntersectionBox::boxOrigin() const
|
||||
{
|
||||
cvf::Mat4d mx(cvf::Mat4d::IDENTITY);
|
||||
mx.setTranslation(cvf::Vec3d(m_minXCoord, m_minYCoord, m_minZCoord));
|
||||
return mx;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RimIntersectionBox::boxSize() const
|
||||
{
|
||||
return cvf::Vec3d(m_maxXCoord, m_maxYCoord, m_maxZCoord) - cvf::Vec3d(m_minXCoord, m_minYCoord, m_minZCoord);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionBox::SinglePlaneState RimIntersectionBox::singlePlaneState() const
|
||||
{
|
||||
return m_singlePlaneState();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::setToDefaultSizeBox()
|
||||
{
|
||||
cvf::BoundingBox boundingBox = currentCellBoundingBox();
|
||||
cvf::Vec3d center = boundingBox.center();
|
||||
|
||||
double defaultWidthFactor = 0.5;
|
||||
|
||||
m_minXCoord = center.x() - 0.5 * boundingBox.extent().x() * defaultWidthFactor;
|
||||
m_minYCoord = center.y() - 0.5 * boundingBox.extent().y() * defaultWidthFactor;
|
||||
m_minZCoord = center.z() - 0.5 * boundingBox.extent().z() * defaultWidthFactor;
|
||||
m_maxXCoord = center.x() + 0.5 * boundingBox.extent().x() * defaultWidthFactor;
|
||||
m_maxYCoord = center.y() + 0.5 * boundingBox.extent().y() * defaultWidthFactor;
|
||||
m_maxZCoord = center.z() + 0.5 * boundingBox.extent().z() * defaultWidthFactor;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::setToDefaultSizeSlice(SinglePlaneState plane, const cvf::Vec3d& position)
|
||||
{
|
||||
m_singlePlaneState = plane;
|
||||
|
||||
cvf::BoundingBox boundingBox = currentCellBoundingBox();
|
||||
cvf::Vec3d center = position;
|
||||
|
||||
if (center.isUndefined()) center = boundingBox.center();
|
||||
|
||||
double defaultWidthFactor = 0.5;
|
||||
|
||||
m_minXCoord = center[0] - 0.5 * boundingBox.extent().x() * defaultWidthFactor;
|
||||
m_minYCoord = center[1] - 0.5 * boundingBox.extent().y() * defaultWidthFactor;
|
||||
m_minZCoord = center[2] - 0.5 * boundingBox.extent().z() * defaultWidthFactor;
|
||||
m_maxXCoord = center[0] + 0.5 * boundingBox.extent().x() * defaultWidthFactor;
|
||||
m_maxYCoord = center[1] + 0.5 * boundingBox.extent().y() * defaultWidthFactor;
|
||||
m_maxZCoord = center[2] + 0.5 * boundingBox.extent().z() * defaultWidthFactor;
|
||||
|
||||
switch (plane)
|
||||
{
|
||||
case PLANE_STATE_X: m_minXCoord = m_maxXCoord = center[0]; break;
|
||||
case PLANE_STATE_Y: m_minYCoord = m_maxYCoord = center[1]; break;
|
||||
case PLANE_STATE_Z: m_minZCoord = m_maxZCoord = center[2]; break;
|
||||
}
|
||||
|
||||
updateVisibility();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::updateLabelsFromBoundingBox()
|
||||
{
|
||||
cvf::BoundingBox cellsBoundingBox = currentCellBoundingBox();
|
||||
{
|
||||
QString range = QString(" [%1 - %2]").arg(cellsBoundingBox.min().x()).arg(cellsBoundingBox.max().x());
|
||||
m_minXCoord.uiCapability()->setUiName(QString("Min X") + range);
|
||||
m_maxXCoord.uiCapability()->setUiName(QString("Max X") + range);
|
||||
}
|
||||
|
||||
{
|
||||
QString range = QString(" [%1 - %2]").arg(cellsBoundingBox.min().y()).arg(cellsBoundingBox.max().y());
|
||||
m_minYCoord.uiCapability()->setUiName(QString("Min Y") + range);
|
||||
m_maxYCoord.uiCapability()->setUiName(QString("Max Y") + range);
|
||||
}
|
||||
|
||||
{
|
||||
QString range = QString(" [%1 - %2]").arg(cellsBoundingBox.min().z()).arg(cellsBoundingBox.max().z());
|
||||
m_minZCoord.uiCapability()->setUiName(QString("Min Z") + range);
|
||||
m_maxZCoord.uiCapability()->setUiName(QString("Max Z") + range);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivIntersectionBoxPartMgr* RimIntersectionBox::intersectionBoxPartMgr()
|
||||
{
|
||||
if (m_intersectionBoxPartMgr.isNull()) m_intersectionBoxPartMgr = new RivIntersectionBoxPartMgr(this);
|
||||
|
||||
return m_intersectionBoxPartMgr.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_singlePlaneState)
|
||||
{
|
||||
updateVisibility();
|
||||
clampSinglePlaneValues();
|
||||
}
|
||||
else if (changedField == &m_minXCoord)
|
||||
{
|
||||
clampSinglePlaneValues();
|
||||
m_minXCoord = CVF_MIN(m_maxXCoord, m_minXCoord);
|
||||
}
|
||||
else if (changedField == &m_minYCoord)
|
||||
{
|
||||
clampSinglePlaneValues();
|
||||
m_minYCoord = CVF_MIN(m_maxYCoord, m_minYCoord);
|
||||
}
|
||||
else if (changedField == &m_minZCoord)
|
||||
{
|
||||
clampSinglePlaneValues();
|
||||
m_minZCoord = CVF_MIN(m_maxZCoord, m_minZCoord);
|
||||
}
|
||||
else if (changedField == &m_maxXCoord)
|
||||
{
|
||||
m_maxXCoord = CVF_MAX(m_maxXCoord, m_minXCoord);
|
||||
}
|
||||
else if (changedField == &m_maxYCoord)
|
||||
{
|
||||
m_maxYCoord = CVF_MAX(m_maxYCoord, m_minYCoord);
|
||||
}
|
||||
else if (changedField == &m_maxZCoord)
|
||||
{
|
||||
m_maxZCoord = CVF_MAX(m_maxZCoord, m_minZCoord);
|
||||
}
|
||||
|
||||
|
||||
if (changedField != &name)
|
||||
{
|
||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = static_cast<caf::PdmUiDoubleSliderEditorAttribute*>(attribute);
|
||||
|
||||
if (myAttr)
|
||||
{
|
||||
cvf::BoundingBox cellsBoundingBox = currentCellBoundingBox();
|
||||
if (field == &m_minXCoord || field == &m_maxXCoord)
|
||||
{
|
||||
myAttr->m_minimum = cellsBoundingBox.min().x();
|
||||
myAttr->m_maximum = cellsBoundingBox.max().x();
|
||||
}
|
||||
else if (field == &m_minYCoord || field == &m_maxYCoord)
|
||||
{
|
||||
myAttr->m_minimum = cellsBoundingBox.min().y();
|
||||
myAttr->m_maximum = cellsBoundingBox.max().y();
|
||||
}
|
||||
else if (field == &m_minZCoord || field == &m_maxZCoord)
|
||||
{
|
||||
myAttr->m_minimum = cellsBoundingBox.min().z();
|
||||
myAttr->m_maximum = cellsBoundingBox.max().z();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&name);
|
||||
uiOrdering.add(&m_singlePlaneState);
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("X Coordinates");
|
||||
group->add(&m_minXCoord);
|
||||
group->add(&m_maxXCoord);
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Y Coordinates");
|
||||
group->add(&m_minYCoord);
|
||||
group->add(&m_maxYCoord);
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Z Coordinates");
|
||||
group->add(&m_minZCoord);
|
||||
group->add(&m_maxZCoord);
|
||||
}
|
||||
|
||||
updateLabelsFromBoundingBox();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::initAfterRead()
|
||||
{
|
||||
updateVisibility();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimIntersectionBox::userDescriptionField()
|
||||
{
|
||||
return &name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimIntersectionBox::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::rebuildGeometryAndScheduleCreateDisplayModel()
|
||||
{
|
||||
m_intersectionBoxPartMgr = nullptr;
|
||||
|
||||
RimView* rimView = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::updateVisibility()
|
||||
{
|
||||
m_maxXCoord.uiCapability()->setUiReadOnly(false);
|
||||
m_maxYCoord.uiCapability()->setUiReadOnly(false);
|
||||
m_maxZCoord.uiCapability()->setUiReadOnly(false);
|
||||
|
||||
if (m_singlePlaneState == PLANE_STATE_X)
|
||||
{
|
||||
m_maxXCoord.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (m_singlePlaneState == PLANE_STATE_Y)
|
||||
{
|
||||
m_maxYCoord.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (m_singlePlaneState == PLANE_STATE_Z)
|
||||
{
|
||||
m_maxZCoord.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::clampSinglePlaneValues()
|
||||
{
|
||||
if (m_singlePlaneState == PLANE_STATE_X)
|
||||
{
|
||||
m_maxXCoord = m_minXCoord;
|
||||
}
|
||||
else if (m_singlePlaneState == PLANE_STATE_Y)
|
||||
{
|
||||
m_maxYCoord = m_minYCoord;
|
||||
}
|
||||
else if (m_singlePlaneState == PLANE_STATE_Z)
|
||||
{
|
||||
m_maxZCoord = m_minZCoord;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox()
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimCase);
|
||||
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
RimEclipseView* eclView = nullptr;
|
||||
this->firstAnchestorOrThisOfType(eclView);
|
||||
|
||||
bool useAllCells = true;
|
||||
if (eclView)
|
||||
{
|
||||
useAllCells = eclView->showInactiveCells();
|
||||
}
|
||||
|
||||
if(false)//useAllCells) // For now, only use the active CellsBBox.
|
||||
return rimCase->allCellsBoundingBox();
|
||||
else
|
||||
return rimCase->activeCellsBoundingBox();
|
||||
|
||||
}
|
||||
|
||||
93
ApplicationCode/ProjectDataModel/RimIntersectionBox.h
Normal file
93
ApplicationCode/ProjectDataModel/RimIntersectionBox.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
class RivIntersectionBoxPartMgr;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimIntersectionBox : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum SinglePlaneState
|
||||
{
|
||||
PLANE_STATE_NONE,
|
||||
PLANE_STATE_X,
|
||||
PLANE_STATE_Y,
|
||||
PLANE_STATE_Z
|
||||
};
|
||||
|
||||
public:
|
||||
RimIntersectionBox();
|
||||
~RimIntersectionBox();
|
||||
|
||||
// Fields
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
cvf::Mat4d boxOrigin() const;
|
||||
cvf::Vec3d boxSize() const;
|
||||
SinglePlaneState singlePlaneState() const;
|
||||
|
||||
RivIntersectionBoxPartMgr* intersectionBoxPartMgr();
|
||||
|
||||
void setToDefaultSizeBox();
|
||||
void setToDefaultSizeSlice(SinglePlaneState plane, const cvf::Vec3d& position);
|
||||
|
||||
protected:
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void initAfterRead() override;
|
||||
|
||||
private:
|
||||
void rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
void updateVisibility();
|
||||
void updateLabelsFromBoundingBox();
|
||||
void clampSinglePlaneValues();
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum< SinglePlaneState > > m_singlePlaneState;
|
||||
|
||||
caf::PdmField<double> m_minXCoord;
|
||||
caf::PdmField<double> m_minYCoord;
|
||||
caf::PdmField<double> m_minZCoord;
|
||||
|
||||
caf::PdmField<double> m_maxXCoord;
|
||||
caf::PdmField<double> m_maxYCoord;
|
||||
caf::PdmField<double> m_maxZCoord;
|
||||
|
||||
|
||||
cvf::BoundingBox currentCellBoundingBox();
|
||||
|
||||
cvf::ref<RivIntersectionBoxPartMgr> m_intersectionBoxPartMgr;
|
||||
};
|
||||
@@ -0,0 +1,163 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimIntersectionBoxCollection.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimIntersectionBoxCollection, "IntersectionBoxCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionBoxCollection::RimIntersectionBoxCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Intersection Boxes", ":/IntersectionBoxes16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_intersectionBoxes, "IntersectionBoxes", "IntersectionBoxes", "", "", "");
|
||||
m_intersectionBoxes.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||
isActive.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionBoxCollection::~RimIntersectionBoxCollection()
|
||||
{
|
||||
m_intersectionBoxes.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimIntersectionBoxCollection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBoxCollection::applySingleColorEffect()
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx)
|
||||
{
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
cs->intersectionBoxPartMgr()->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBoxCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx)
|
||||
{
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
cs->intersectionBoxPartMgr()->updateCellResultColor(timeStepIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBoxCollection::appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform)
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx)
|
||||
{
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
cs->intersectionBoxPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform);
|
||||
cs->intersectionBoxPartMgr()->appendMeshLinePartsToModel(model, scaleTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBoxCollection::appendIntersectionBox(RimIntersectionBox* intersectionBox)
|
||||
{
|
||||
m_intersectionBoxes.push_back(intersectionBox);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBoxCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &isActive)
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimIntersectionBoxCollection::hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const
|
||||
{
|
||||
if (!isActive) return false;
|
||||
|
||||
/*
|
||||
for (size_t csIdx = 0; csIdx < m_intersectionBoxes.size(); ++csIdx)
|
||||
{
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
|
||||
if (cs->isActive &&
|
||||
cs->type() == RimIntersectionBox::CS_SIMULATION_WELL &&
|
||||
cs->simulationWell() == eclipseWell)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
class RimIntersectionBox;
|
||||
class RimEclipseCellColors;
|
||||
class RimEclipseWell;
|
||||
|
||||
namespace cvf {
|
||||
class ModelBasicList;
|
||||
class Transform;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimIntersectionBoxCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimIntersectionBoxCollection();
|
||||
~RimIntersectionBoxCollection();
|
||||
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
void appendIntersectionBox(RimIntersectionBox* intersectionBox);
|
||||
|
||||
bool hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const;
|
||||
|
||||
// Visualization interface
|
||||
|
||||
void applySingleColorEffect();
|
||||
void updateCellResultColor(size_t timeStepIndex);
|
||||
void appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform);
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimIntersectionBox*> m_intersectionBoxes;
|
||||
};
|
||||
@@ -17,23 +17,23 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
|
||||
#include "RimCrossSection.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "RivCrossSectionPartMgr.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimCrossSectionCollection, "CrossSectionCollection");
|
||||
CAF_PDM_SOURCE_INIT(RimIntersectionCollection, "CrossSectionCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCrossSectionCollection::RimCrossSectionCollection()
|
||||
RimIntersectionCollection::RimIntersectionCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Intersections", ":/CrossSections16x16.png", "", "");
|
||||
|
||||
@@ -47,7 +47,7 @@ RimCrossSectionCollection::RimCrossSectionCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCrossSectionCollection::~RimCrossSectionCollection()
|
||||
RimIntersectionCollection::~RimIntersectionCollection()
|
||||
{
|
||||
m_crossSections.deleteAllChildObjects();
|
||||
}
|
||||
@@ -55,7 +55,7 @@ RimCrossSectionCollection::~RimCrossSectionCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimCrossSectionCollection::objectToggleField()
|
||||
caf::PdmFieldHandle* RimIntersectionCollection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
}
|
||||
@@ -63,11 +63,13 @@ caf::PdmFieldHandle* RimCrossSectionCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::applySingleColorEffect()
|
||||
void RimIntersectionCollection::applySingleColorEffect()
|
||||
{
|
||||
if(!this->isActive()) return;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = m_crossSections[csIdx];
|
||||
RimIntersection* cs = m_crossSections[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
cs->crossSectionPartMgr()->applySingleColorEffect();
|
||||
@@ -78,12 +80,14 @@ void RimCrossSectionCollection::applySingleColorEffect()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
{
|
||||
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
|
||||
if(!this->isActive()) return;
|
||||
|
||||
for(size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = m_crossSections[csIdx];
|
||||
if (cs->isActive)
|
||||
RimIntersection* cs = m_crossSections[csIdx];
|
||||
if(cs->isActive)
|
||||
{
|
||||
cs->crossSectionPartMgr()->updateCellResultColor(timeStepIndex);
|
||||
}
|
||||
@@ -93,13 +97,13 @@ void RimCrossSectionCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform)
|
||||
void RimIntersectionCollection::appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform)
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = m_crossSections[csIdx];
|
||||
RimIntersection* cs = m_crossSections[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
cs->crossSectionPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform);
|
||||
@@ -116,7 +120,7 @@ void RimCrossSectionCollection::appendPartsToModel(cvf::ModelBasicList* model, c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::appendCrossSection(RimCrossSection* crossSection)
|
||||
void RimIntersectionCollection::appendCrossSection(RimIntersection* crossSection)
|
||||
{
|
||||
m_crossSections.push_back(crossSection);
|
||||
|
||||
@@ -134,7 +138,7 @@ void RimCrossSectionCollection::appendCrossSection(RimCrossSection* crossSection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimIntersectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &isActive)
|
||||
{
|
||||
@@ -150,16 +154,16 @@ void RimCrossSectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* chan
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimCrossSectionCollection::hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const
|
||||
bool RimIntersectionCollection::hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const
|
||||
{
|
||||
if (!isActive) return false;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = m_crossSections[csIdx];
|
||||
RimIntersection* cs = m_crossSections[csIdx];
|
||||
|
||||
if (cs->isActive &&
|
||||
cs->type() == RimCrossSection::CS_SIMULATION_WELL &&
|
||||
cs->type() == RimIntersection::CS_SIMULATION_WELL &&
|
||||
cs->simulationWell() == eclipseWell)
|
||||
{
|
||||
return true;
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
class RimCrossSection;
|
||||
class RimIntersection;
|
||||
class RimEclipseCellColors;
|
||||
class RimEclipseWell;
|
||||
|
||||
@@ -37,17 +37,17 @@ namespace cvf {
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimCrossSectionCollection : public caf::PdmObject
|
||||
class RimIntersectionCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimCrossSectionCollection();
|
||||
~RimCrossSectionCollection();
|
||||
RimIntersectionCollection();
|
||||
~RimIntersectionCollection();
|
||||
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
void appendCrossSection(RimCrossSection* crossSection);
|
||||
void appendCrossSection(RimIntersection* crossSection);
|
||||
|
||||
bool hasActiveCrossSectionForSimulationWell(RimEclipseWell* eclipseWell) const;
|
||||
|
||||
@@ -62,5 +62,5 @@ protected:
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimCrossSection*> m_crossSections;
|
||||
caf::PdmChildArrayField<RimIntersection*> m_crossSections;
|
||||
};
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCrossSectionCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersectionBoxCollection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimPropertyFilterCollection.h"
|
||||
@@ -124,7 +125,11 @@ RimView::RimView(void)
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&crossSectionCollection, "CrossSections", "Intersections", "", "", "");
|
||||
crossSectionCollection.uiCapability()->setUiHidden(true);
|
||||
crossSectionCollection = new RimCrossSectionCollection();
|
||||
crossSectionCollection = new RimIntersectionCollection();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&intersectionBoxCollection, "IntersectionBoxes", "Intersection Boxes", "", "", "");
|
||||
intersectionBoxCollection.uiCapability()->setUiHidden(true);
|
||||
intersectionBoxCollection = new RimIntersectionBoxCollection();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_gridCollection, "GridCollection", "GridCollection", "", "", "");
|
||||
m_gridCollection.uiCapability()->setUiHidden(true);
|
||||
@@ -178,6 +183,7 @@ RimView::~RimView(void)
|
||||
|
||||
delete m_rangeFilterCollection;
|
||||
delete m_overrideRangeFilterCollection;
|
||||
delete intersectionBoxCollection;
|
||||
delete crossSectionCollection;
|
||||
delete m_gridCollection;
|
||||
}
|
||||
|
||||
@@ -43,9 +43,10 @@
|
||||
class Rim3dOverlayInfoConfig;
|
||||
class RimCase;
|
||||
class RimCellRangeFilter;
|
||||
class RimGridCollection;
|
||||
class RimCellRangeFilterCollection;
|
||||
class RimCrossSectionCollection;
|
||||
class RimIntersectionCollection;
|
||||
class RimGridCollection;
|
||||
class RimIntersectionBoxCollection;
|
||||
class RimPropertyFilterCollection;
|
||||
class RimViewController;
|
||||
class RimViewLinker;
|
||||
@@ -96,7 +97,8 @@ public:
|
||||
void replaceRangeFilterCollectionWithOverride();
|
||||
|
||||
|
||||
caf::PdmChildField<RimCrossSectionCollection*> crossSectionCollection;
|
||||
caf::PdmChildField<RimIntersectionCollection*> crossSectionCollection;
|
||||
caf::PdmChildField<RimIntersectionBoxCollection*> intersectionBoxCollection;
|
||||
|
||||
// Draw style
|
||||
|
||||
|
||||
Reference in New Issue
Block a user