mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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. p4#: 21651
This commit is contained in:
parent
4a0c3d7ca9
commit
939c6ad156
202
ApplicationCode/ProjectDataModel/RimWellPath.cpp
Normal file
202
ApplicationCode/ProjectDataModel/RimWellPath.cpp
Normal file
@ -0,0 +1,202 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||
//
|
||||
// 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 "RiaStdInclude.h"
|
||||
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimCase.h"
|
||||
#include "RivWellPathPartMgr.h"
|
||||
#include "RifJsonEncodeDecode.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimReservoirView.h"
|
||||
#include "RimReservoirCellResultsCacher.h"
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimResultSlot.h"
|
||||
#include "RimCellEdgeResultSlot.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCellPropertyFilterCollection.h"
|
||||
#include "RimWellCollection.h"
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPath, "WellPath");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPath::RimWellPath()
|
||||
{
|
||||
CAF_PDM_InitObject("WellPath", ":/Well.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&name, "WellPathName", "Name", "", "", "");
|
||||
name.setUiReadOnly(true);
|
||||
name.setIOWritable(false);
|
||||
name.setIOReadable(false);
|
||||
name.setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&id, "WellPathId", "Id", "", "", "");
|
||||
id.setUiReadOnly(true);
|
||||
id.setIOWritable(false);
|
||||
id.setIOReadable(false);
|
||||
CAF_PDM_InitFieldNoDefault(&sourceSystem, "SourceSystem", "Source System", "", "", "");
|
||||
sourceSystem.setUiReadOnly(true);
|
||||
sourceSystem.setIOWritable(false);
|
||||
sourceSystem.setIOReadable(false);
|
||||
CAF_PDM_InitFieldNoDefault(&utmZone, "UTMZone", "UTM Zone", "", "", "");
|
||||
utmZone.setUiReadOnly(true);
|
||||
utmZone.setIOWritable(false);
|
||||
utmZone.setIOReadable(false);
|
||||
CAF_PDM_InitFieldNoDefault(&updateDate, "WellPathUpdateDate", "Update Date", "", "", "");
|
||||
updateDate.setUiReadOnly(true);
|
||||
updateDate.setIOWritable(false);
|
||||
updateDate.setIOReadable(false);
|
||||
CAF_PDM_InitFieldNoDefault(&updateUser, "WellPathUpdateUser", "Update User", "", "", "");
|
||||
updateUser.setUiReadOnly(true);
|
||||
updateUser.setIOWritable(false);
|
||||
updateUser.setIOReadable(false);
|
||||
CAF_PDM_InitFieldNoDefault(&m_surveyType, "WellPathSurveyType", "Survey Type", "", "", "");
|
||||
m_surveyType.setUiReadOnly(true);
|
||||
m_surveyType.setIOWritable(false);
|
||||
m_surveyType.setIOReadable(false);
|
||||
|
||||
CAF_PDM_InitField(&filepath, "WellPathFilepath", QString(""), "Filepath", "", "", "");
|
||||
filepath.setUiReadOnly(true);
|
||||
|
||||
CAF_PDM_InitField(&showWellPathLabel, "ShowWellPathLabel", true, "Show well path label", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&showWellPath, "ShowWellPath", true, "Show well path", "", "", "");
|
||||
showWellPath.setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&wellPathRadiusScaleFactor, "WellPathRadiusScale", 1.0, "Well path radius scale", "", "", "");
|
||||
CAF_PDM_InitField(&wellPathColor, "WellPathColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Well path color", "", "", "");
|
||||
|
||||
m_wellPath = NULL;
|
||||
m_project = NULL;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPath::~RimWellPath()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellPath::userDescriptionField()
|
||||
{
|
||||
return &name;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::setSurveyType(QString surveyType)
|
||||
{
|
||||
m_surveyType = surveyType;
|
||||
if (m_surveyType == "PLAN")
|
||||
wellPathColor = cvf::Color3f(0.999f, 0.333f, 0.0f);
|
||||
else if (m_surveyType == "PROTOTYPE")
|
||||
wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f);
|
||||
}
|
||||
|
||||
|
||||
RivWellPathPartMgr* RimWellPath::partMgr()
|
||||
{
|
||||
if (m_wellPathPartMgr.isNull())
|
||||
{
|
||||
m_wellPathPartMgr = new RivWellPathPartMgr(m_wellPathCollection, this);
|
||||
}
|
||||
|
||||
return m_wellPathPartMgr.p();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
partMgr()->scheduleGeometryRegen();
|
||||
if (m_project) m_project->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellPath::objectToggleField()
|
||||
{
|
||||
return &showWellPath;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read JSON file containing well path data
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::readWellPathFile()
|
||||
{
|
||||
RigWellPath* wellPathGeom = new RigWellPath();
|
||||
JsonReader jsonReader;
|
||||
QMap<QString, QVariant> jsonMap = jsonReader.decodeFile(filepath);
|
||||
|
||||
// General well info
|
||||
name = jsonMap["name"].toString();
|
||||
id = jsonMap["id"].toString();
|
||||
setSurveyType(jsonMap["surveyType"].toString());
|
||||
sourceSystem = jsonMap["sourceSystem"].toString();
|
||||
utmZone = jsonMap["utmZone"].toString();
|
||||
|
||||
// Convert updateDate from the following format:
|
||||
// "Number of milliseconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds"
|
||||
QString updateDateStr = jsonMap["updateDate"].toString().trimmed();
|
||||
uint updateDateUint = updateDateStr.toULongLong() / 1000; // should be within 32 bit, maximum number is 4294967295 which corresponds to year 2106
|
||||
QDateTime updateDateTime;
|
||||
updateDateTime.setTime_t(updateDateUint);
|
||||
//updateDate = updateDateTime.toString(Qt::SystemLocaleShortDate);
|
||||
updateDate = updateDateTime.toString("d MMMM yyyy");
|
||||
|
||||
updateUser = jsonMap["updateUser"].toString();
|
||||
printf("Read JSON file: well path name = %s\n filePath = %s\n",
|
||||
name().toStdString().c_str(),
|
||||
(const char*) filepath().toLocal8Bit());
|
||||
|
||||
double datumElevation = jsonMap["datumElevation"].toDouble();
|
||||
|
||||
// Well path points
|
||||
QList<QVariant> pathList = jsonMap["path"].toList();
|
||||
foreach (QVariant point, pathList)
|
||||
{
|
||||
QMap<QString, QVariant> coordinateMap = point.toMap();
|
||||
cvf::Vec3d vec3d(coordinateMap["east"].toDouble(), coordinateMap["north"].toDouble(), -(coordinateMap["tvd"].toDouble() - datumElevation));
|
||||
wellPathGeom->m_wellPathPoints.push_back(vec3d);
|
||||
//printf("Added point to well path: (%f, %f, %f)\n", vec3d.x(), vec3d.y(), vec3d.z());
|
||||
}
|
||||
|
||||
//jsonReader.dumpToFile(wellPathGeom->m_wellPathPoints, "c:\\temp\\jsonpoints.txt");
|
||||
setWellPathGeometry(wellPathGeom);
|
||||
}
|
79
ApplicationCode/ProjectDataModel/RimWellPath.h
Normal file
79
ApplicationCode/ProjectDataModel/RimWellPath.h
Normal file
@ -0,0 +1,79 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||
//
|
||||
// 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 "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
class RimProject;
|
||||
class RivWellPathPartMgr;
|
||||
class RimWellPathCollection;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellPath : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
|
||||
RimWellPath();
|
||||
virtual ~RimWellPath();
|
||||
|
||||
void setProject(RimProject* project) { m_project = project; }
|
||||
void setCollection(RimWellPathCollection* collection) { m_wellPathCollection = collection; }
|
||||
|
||||
virtual caf::PdmFieldHandle* userDescriptionField();
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<QString> id;
|
||||
caf::PdmField<QString> sourceSystem;
|
||||
caf::PdmField<QString> utmZone;
|
||||
caf::PdmField<QString> updateDate;
|
||||
caf::PdmField<QString> updateUser;
|
||||
void setSurveyType(QString surveyType);
|
||||
QString surveyType() { return m_surveyType; }
|
||||
caf::PdmField<QString> filepath;
|
||||
caf::PdmField<bool> showWellPathLabel;
|
||||
|
||||
caf::PdmField<bool> showWellPath;
|
||||
caf::PdmField<cvf::Color3f> wellPathColor;
|
||||
caf::PdmField<double> wellPathRadiusScaleFactor;
|
||||
|
||||
void setWellPathGeometry(RigWellPath* wellPathModel) { m_wellPath = wellPathModel; }
|
||||
RigWellPath* wellPathGeometry() { return m_wellPath.p(); }
|
||||
RivWellPathPartMgr* partMgr();
|
||||
|
||||
void readWellPathFile();
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_surveyType;
|
||||
cvf::ref<RigWellPath> m_wellPath;
|
||||
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
|
||||
caf::PdmPointer<RimWellPathCollection> m_wellPathCollection;
|
||||
RimProject* m_project;
|
||||
};
|
162
ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp
Normal file
162
ApplicationCode/ProjectDataModel/RimWellPathCollection.cpp
Normal file
@ -0,0 +1,162 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||
//
|
||||
// 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 "RiaStdInclude.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RivWellPathCollectionPartMgr.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimReservoirView.h"
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimReservoirCellResultsCacher.h"
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimResultSlot.h"
|
||||
#include "RimCellEdgeResultSlot.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCellPropertyFilterCollection.h"
|
||||
#include "RimWellCollection.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimWellPathCollection::WellVisibilityEnum::setUp()
|
||||
{
|
||||
addItem(RimWellPathCollection::FORCE_ALL_OFF, "FORCE_ALL_OFF", "Off");
|
||||
addItem(RimWellPathCollection::ALL_ON, "ALL_ON", "Individual");
|
||||
addItem(RimWellPathCollection::FORCE_ALL_ON, "FORCE_ALL_ON", "On");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPathCollection, "WellPaths");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection::RimWellPathCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Wells", ":/WellCollection.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&showWellPathLabel, "ShowWellPathLabel", true, "Show well path labels", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&wellPathVisibility, "GlobalWellPathVisibility", WellVisibilityEnum(ALL_ON), "Global well path visibility", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&wellPathRadiusScaleFactor, "WellPathRadiusScale", 0.5, "Well Path radius scale", "", "", "");
|
||||
CAF_PDM_InitField(&wellPathCrossSectionVertexCount, "WellPathVertexCount", 12, "Pipe vertex count", "", "", "");
|
||||
wellPathCrossSectionVertexCount.setIOWritable(false);
|
||||
wellPathCrossSectionVertexCount.setIOReadable(false);
|
||||
wellPathCrossSectionVertexCount.setUiHidden(true);
|
||||
CAF_PDM_InitField(&wellPathClip, "WellPathClip", true, "Clip Well Paths", "", "", "");
|
||||
CAF_PDM_InitField(&wellPathClipZDistance, "WellPathClipZDistance", 500, "Well path clipping depth distance", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&wellPaths, "WellPaths", "Well Paths", "", "", "");
|
||||
|
||||
m_wellPathCollectionPartManager = new RivWellPathCollectionPartMgr(this);
|
||||
m_project = NULL;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection::~RimWellPathCollection()
|
||||
{
|
||||
wellPaths.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
m_wellPathCollectionPartManager->scheduleGeometryRegen();
|
||||
if (m_project) m_project->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::setProject( RimProject* project )
|
||||
{
|
||||
m_project = project;
|
||||
for (size_t wellPathIdx = 0; wellPathIdx < wellPaths.size(); wellPathIdx++)
|
||||
{
|
||||
wellPaths[wellPathIdx]->setProject(m_project);
|
||||
wellPaths[wellPathIdx]->setCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read JSON files containing well path data
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::readWellPathFiles()
|
||||
{
|
||||
for (size_t wpIdx = 0; wpIdx < wellPaths.size(); wpIdx++)
|
||||
{
|
||||
wellPaths[wpIdx]->readWellPathFile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::addWellPaths( QStringList filePaths )
|
||||
{
|
||||
foreach (QString filePath, filePaths)
|
||||
{
|
||||
// Check if this file is already open
|
||||
bool alreadyOpen = false;
|
||||
for (size_t wpIdx = 0; wpIdx < wellPaths.size(); wpIdx++)
|
||||
{
|
||||
QFile f1;
|
||||
f1.setFileName(filePath);
|
||||
QString s1 = f1.fileName();
|
||||
QFile f2;
|
||||
f2.setFileName(wellPaths[wpIdx]->filepath());
|
||||
QString s2 = f2.fileName();
|
||||
if (s1 == s2)
|
||||
{
|
||||
printf("Attempting to open well path JSON file that is already open:\n %s\n", (const char*) filePath.toLocal8Bit());
|
||||
alreadyOpen = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!alreadyOpen)
|
||||
{
|
||||
RimWellPath* wellPath = new RimWellPath();
|
||||
wellPath->setProject(m_project);
|
||||
wellPath->setCollection(this);
|
||||
wellPath->filepath = filePath;
|
||||
wellPaths.push_back(wellPath);
|
||||
}
|
||||
}
|
||||
|
||||
readWellPathFiles();
|
||||
}
|
73
ApplicationCode/ProjectDataModel/RimWellPathCollection.h
Normal file
73
ApplicationCode/ProjectDataModel/RimWellPathCollection.h
Normal file
@ -0,0 +1,73 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||
//
|
||||
// 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 "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafAppEnum.h"
|
||||
#include <QString>
|
||||
|
||||
#include "RimWellPath.h"
|
||||
|
||||
class RivWellPathCollectionPartMgr;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellPathCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
|
||||
RimWellPathCollection();
|
||||
virtual ~RimWellPathCollection();
|
||||
|
||||
void setProject(RimProject* project);
|
||||
|
||||
enum WellVisibilityType
|
||||
{
|
||||
FORCE_ALL_OFF,
|
||||
ALL_ON,
|
||||
FORCE_ALL_ON
|
||||
};
|
||||
typedef caf::AppEnum<RimWellPathCollection::WellVisibilityType> WellVisibilityEnum;
|
||||
|
||||
caf::PdmField<bool> showWellPathLabel;
|
||||
|
||||
caf::PdmField<WellVisibilityEnum> wellPathVisibility;
|
||||
caf::PdmField<double> wellPathRadiusScaleFactor;
|
||||
caf::PdmField<int> wellPathCrossSectionVertexCount;
|
||||
caf::PdmField<bool> wellPathClip;
|
||||
caf::PdmField<int> wellPathClipZDistance;
|
||||
|
||||
caf::PdmPointersField<RimWellPath*> wellPaths;
|
||||
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
RivWellPathCollectionPartMgr* wellPathCollectionPartMgr() { return m_wellPathCollectionPartManager.p(); }
|
||||
|
||||
void readWellPathFiles();
|
||||
void addWellPaths(QStringList filePaths);
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimProject> m_project;
|
||||
cvf::ref<RivWellPathCollectionPartMgr> m_wellPathCollectionPartManager;
|
||||
};
|
Loading…
Reference in New Issue
Block a user