Added visualization of Well Paths in reservoir views.

Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
Known problems:
- Well paths are not shown in some types of reservoir views, for instance reservoir views showing well pipes. Will look into this later.
p4#: 21658
This commit is contained in:
Vidar Lundberg
2013-05-16 14:10:22 +02:00
parent 704facc1c1
commit 163ce74052
14 changed files with 171 additions and 12 deletions

View File

@@ -17,6 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RiaStdInclude.h"
#include "RiaApplication.h"
#include "cafEffectCache.h"
@@ -34,6 +35,8 @@
#include "RimResultCase.h"
#include "RimInputCase.h"
#include "RimReservoirView.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "cafCeetronNavigation.h"
#include "cafCadNavigation.h"
@@ -327,6 +330,41 @@ bool RiaApplication::loadProject(const QString& projectFileName)
// Add well paths
if (m_project->wellPathCollection == NULL)
{
printf("Create well path collection in loadProject.\n");
m_project->wellPathCollection = new RimWellPathCollection();
m_project->wellPathCollection->setProject(m_project);
}
#if 1
if (m_project && m_project->wellPathCollection) m_project->wellPathCollection->readWellPathFiles();
#else
// TESTCODE begin: Add hardcoded well paths from file
if (m_project && m_project->wellPathCollection->wellPaths.size() == 0)
{
QFile wellPathFile;
wellPathFile.setFileName("c:\\temp\\wellPaths.txt");
wellPathFile.open(QIODevice::ReadOnly | QIODevice::Text);
QByteArray filePath;
QList<QString> wellPathFilePaths;
for (filePath = wellPathFile.readLine().trimmed(); !wellPathFile.atEnd(); filePath = wellPathFile.readLine().trimmed())
{
if (filePath[0] == '#' || filePath.isEmpty())
continue;
wellPathFilePaths.push_back(filePath);
}
addWellPathsToModel(wellPathFilePaths);
}
else
{
// Read the well path files specified in the model (RimWellPathCollection / RimWellPath) into geometries (RigWellPath)
if (m_project && m_project->wellPathCollection) m_project->wellPathCollection->readWellPathFiles();
}
// TESTCODE end
#endif
caf::ProgressInfo caseProgress(casesToLoad.size() , "Reading Cases");
for (size_t cIdx = 0; cIdx < casesToLoad.size(); ++cIdx)
@@ -360,6 +398,28 @@ bool RiaApplication::loadProject(const QString& projectFileName)
}
//--------------------------------------------------------------------------------------------------
/// Add a list of well path file paths (JSON files) to the well path collection
//--------------------------------------------------------------------------------------------------
void RiaApplication::addWellPathsToModel(QList<QString> wellPathFilePaths)
{
if (m_project == NULL) return;
if (m_project->wellPathCollection == NULL)
{
printf("Create well path collection.\n");
m_project->wellPathCollection = new RimWellPathCollection();
m_project->wellPathCollection->setProject(m_project);
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(m_project);
}
if (m_project->wellPathCollection->wellPaths.empty())
printf("Well path collection is empty.\n");
if (m_project && m_project->wellPathCollection) m_project->wellPathCollection->addWellPaths(wellPathFilePaths);
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(m_project->wellPathCollection);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------