#1495 Add 'Completions' folder to RimWellPath

Move perforation intervals into folder
Move fishbone definitions and fishbone well paths into folder
This commit is contained in:
Magne Sjaastad 2017-05-19 15:44:32 +02:00
parent 1853f97bbc
commit 5ec2764c16
18 changed files with 218 additions and 67 deletions

View File

@ -21,6 +21,7 @@
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RiaLogging.h" #include "RiaLogging.h"
#include "RimFishbonesCollection.h"
#include "RimFishbonesMultipleSubs.h" #include "RimFishbonesMultipleSubs.h"
#include "RimWellPath.h" #include "RimWellPath.h"
@ -77,7 +78,7 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
size_t fishboneSubIndex = 0; size_t fishboneSubIndex = 0;
QTextStream stream(&exportFile); QTextStream stream(&exportFile);
for (RimFishbonesMultipleSubs* fishbone : wellPath->fishbonesSubs()) for (RimFishbonesMultipleSubs* fishbone : wellPath->fishbonesCollection()->fishbonesSubs())
{ {
if (!fishbone->isChecked()) continue; if (!fishbone->isChecked()) continue;

View File

@ -18,6 +18,7 @@
#include "RicNewFishbonesSubsAtMeasuredDepthFeature.h" #include "RicNewFishbonesSubsAtMeasuredDepthFeature.h"
#include "RimFishbonesCollection.h"
#include "RimFishbonesMultipleSubs.h" #include "RimFishbonesMultipleSubs.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimWellPath.h" #include "RimWellPath.h"
@ -44,9 +45,9 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered(bool isChecked
CVF_ASSERT(wellPath); CVF_ASSERT(wellPath);
RimFishbonesMultipleSubs* obj = new RimFishbonesMultipleSubs; RimFishbonesMultipleSubs* obj = new RimFishbonesMultipleSubs;
wellPath->fishbonesSubs.push_back(obj); wellPath->fishbonesCollection()->fishbonesSubs.push_back(obj);
obj->setName(QString("Fishbones Subs (%1)").arg(wellPath->fishbonesSubs.size())); obj->setName(QString("Fishbones Subs (%1)").arg(wellPath->fishbonesCollection()->fishbonesSubs.size()));
int integerValue = wellPathSelItem->m_measuredDepth; int integerValue = wellPathSelItem->m_measuredDepth;
obj->setMeasuredDepthAndCount(integerValue, 24, 1); obj->setMeasuredDepthAndCount(integerValue, 24, 1);

View File

@ -19,6 +19,7 @@
#include "RicNewFishbonesSubsFeature.h" #include "RicNewFishbonesSubsFeature.h"
#include "RimFishbonesMultipleSubs.h" #include "RimFishbonesMultipleSubs.h"
#include "RimFishbonesCollection.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -39,8 +40,8 @@ void RicNewFishbonesSubsFeature::onActionTriggered(bool isChecked)
CVF_ASSERT(wellPath); CVF_ASSERT(wellPath);
RimFishbonesMultipleSubs* obj = new RimFishbonesMultipleSubs; RimFishbonesMultipleSubs* obj = new RimFishbonesMultipleSubs;
obj->setName(QString("Fishbones Subs (%1)").arg(wellPath->fishbonesSubs.size())); obj->setName(QString("Fishbones Subs (%1)").arg(wellPath->fishbonesCollection()->fishbonesSubs.size()));
wellPath->fishbonesSubs.push_back(obj); wellPath->fishbonesCollection()->fishbonesSubs.push_back(obj);
wellPath->updateConnectedEditors(); wellPath->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(obj); RiuMainWindow::instance()->selectAsCurrentItem(obj);

View File

@ -50,7 +50,7 @@ void RicEditPerforationCollectionFeature::onActionTriggered(bool isChecked)
if (wellPath == nullptr) return; if (wellPath == nullptr) return;
RiuEditPerforationCollectionWidget dlg(nullptr, wellPath->m_perforationCollection); RiuEditPerforationCollectionWidget dlg(nullptr, wellPath->perforationIntervalCollection());
dlg.exec(); dlg.exec();
wellPath->updateConnectedEditors(); wellPath->updateConnectedEditors();
} }

View File

@ -50,7 +50,7 @@ void RicNewPerforationIntervalAtMeasuredDepthFeature::onActionTriggered(bool isC
int measuredDepth = wellPathSelItem->m_measuredDepth; int measuredDepth = wellPathSelItem->m_measuredDepth;
perforationInterval->setStartAndEndMD(measuredDepth, measuredDepth + 50); perforationInterval->setStartAndEndMD(measuredDepth, measuredDepth + 50);
wellPath->m_perforationCollection()->appendPerforation(perforationInterval); wellPath->perforationIntervalCollection()->appendPerforation(perforationInterval);
RimWellPathCollection* wellPathCollection = nullptr; RimWellPathCollection* wellPathCollection = nullptr;
wellPath->firstAncestorOrThisOfTypeAsserted(wellPathCollection); wellPath->firstAncestorOrThisOfTypeAsserted(wellPathCollection);

View File

@ -52,7 +52,7 @@ void RicNewPerforationIntervalFeature::onActionTriggered(bool isChecked)
RimPerforationInterval* perforationInterval = new RimPerforationInterval; RimPerforationInterval* perforationInterval = new RimPerforationInterval;
wellPath->m_perforationCollection()->appendPerforation(perforationInterval); wellPath->perforationIntervalCollection()->appendPerforation(perforationInterval);
RimWellPathCollection* wellPathCollection = nullptr; RimWellPathCollection* wellPathCollection = nullptr;
wellPath->firstAncestorOrThisOfType(wellPathCollection); wellPath->firstAncestorOrThisOfType(wellPathCollection);

View File

@ -24,6 +24,7 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimFishbonesMultipleSubs.h" #include "RimFishbonesMultipleSubs.h"
#include "RimFishbonesCollection.h"
#include "RimExportCompletionDataSettings.h" #include "RimExportCompletionDataSettings.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -161,7 +162,7 @@ void RicWellPathExportCompletionDataFeature::exportToFolder(RimWellPath* wellPat
formatter.keyword("COMPDAT"); formatter.keyword("COMPDAT");
formatter.header(header); formatter.header(header);
for (RimFishbonesMultipleSubs* subs : wellPath->fishbonesSubs) for (RimFishbonesMultipleSubs* subs : wellPath->fishbonesCollection()->fishbonesSubs())
{ {
for (size_t subIndex = 0; subIndex < subs->locationOfSubs().size(); ++subIndex) for (size_t subIndex = 0; subIndex < subs->locationOfSubs().size(); ++subIndex)
{ {
@ -605,7 +606,7 @@ void RicWellPathExportCompletionDataFeature::filterIntersections(std::vector<Hex
std::vector<WellSegmentLocation> RicWellPathExportCompletionDataFeature::findWellSegmentLocations(RimWellPath* wellPath) std::vector<WellSegmentLocation> RicWellPathExportCompletionDataFeature::findWellSegmentLocations(RimWellPath* wellPath)
{ {
std::vector<WellSegmentLocation> wellSegmentLocations; std::vector<WellSegmentLocation> wellSegmentLocations;
for (RimFishbonesMultipleSubs* subs : wellPath->fishbonesSubs) for (RimFishbonesMultipleSubs* subs : wellPath->fishbonesCollection()->fishbonesSubs())
{ {
for (size_t subIndex = 0; subIndex < subs->locationOfSubs().size(); ++subIndex) for (size_t subIndex = 0; subIndex < subs->locationOfSubs().size(); ++subIndex)
{ {

View File

@ -24,6 +24,7 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimFishboneWellPathCollection.h" #include "RimFishboneWellPathCollection.h"
#include "RimFishbonesCollection.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
@ -69,7 +70,7 @@ void RicWellPathImportCompletionsFileFeature::onActionTriggered(bool isChecked)
// Remember the path to next time // Remember the path to next time
app->setLastUsedDialogDirectory("WELLPATH_DIR", QFileInfo(wellPathFilePaths.last()).absolutePath()); app->setLastUsedDialogDirectory("WELLPATH_DIR", QFileInfo(wellPathFilePaths.last()).absolutePath());
objects[0]->m_completionCollection()->importCompletionsFromFile(wellPathFilePaths); objects[0]->fishbonesCollection()->wellPathCollection()->importCompletionsFromFile(wellPathFilePaths);
if (app->project()) if (app->project())
{ {

View File

@ -29,6 +29,7 @@
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
#include "RimFishboneWellPath.h" #include "RimFishboneWellPath.h"
#include "RimFishbonesCollection.h"
#include "RimFishboneWellPathCollection.h" #include "RimFishboneWellPathCollection.h"
#include "RimPerforationInterval.h" #include "RimPerforationInterval.h"
#include "RimPerforationCollection.h" #include "RimPerforationCollection.h"
@ -99,11 +100,11 @@ void RivWellPathPartMgr::appendFishbonesPartsToModel(cvf::ModelBasicList* model,
// This concept is taken from RivReservoirSimWellsPartMgr, and is required to be able to have // This concept is taken from RivReservoirSimWellsPartMgr, and is required to be able to have
// separate part managers for each view // separate part managers for each view
if (m_fishbonesPartMgrs.size() != m_rimWellPath->fishbonesSubs().size()) if (m_fishbonesPartMgrs.size() != m_rimWellPath->fishbonesCollection()->fishbonesSubs.size())
{ {
m_fishbonesPartMgrs.clear(); m_fishbonesPartMgrs.clear();
for (auto rimFishboneSubs : m_rimWellPath->fishbonesSubs()) for (auto rimFishboneSubs : m_rimWellPath->fishbonesCollection()->fishbonesSubs())
{ {
m_fishbonesPartMgrs.push_back(new RivFishbonesSubsPartMgr(rimFishboneSubs)); m_fishbonesPartMgrs.push_back(new RivFishbonesSubsPartMgr(rimFishboneSubs));
} }
@ -120,20 +121,22 @@ void RivWellPathPartMgr::appendFishbonesPartsToModel(cvf::ModelBasicList* model,
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivWellPathPartMgr::appendCompletionsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize) void RivWellPathPartMgr::appendCompletionsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize)
{ {
if (!m_rimWellPath || !m_rimWellPath->m_completionCollection->isChecked()) return; if (!m_rimWellPath || !m_rimWellPath->fishbonesCollection()->wellPathCollection()->isChecked()) return;
RivPipeGeometryGenerator geoGenerator; RivPipeGeometryGenerator geoGenerator;
for (RimFishboneWellPath* completion : m_rimWellPath->m_completionCollection()->m_completions()) std::vector<RimFishboneWellPath*> fishbonesWellPaths;
m_rimWellPath->descendantsIncludingThisOfType(fishbonesWellPaths);
for (RimFishboneWellPath* fbWellPath : fishbonesWellPaths)
{ {
if (!completion->isChecked()) continue; if (!fbWellPath->isChecked()) continue;
std::vector<cvf::Vec3d> displayCoords; std::vector<cvf::Vec3d> displayCoords;
for (auto lateralDomainCoords : completion->coordinates()) for (auto lateralDomainCoords : fbWellPath->coordinates())
{ {
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(lateralDomainCoords)); displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(lateralDomainCoords));
} }
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(completion); cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(fbWellPath);
cvf::Collection<cvf::Part> parts; cvf::Collection<cvf::Part> parts;
geoGenerator.cylinderWithCenterLineParts(&parts, displayCoords, m_rimWellPath->wellPathColor(), m_rimWellPath->combinedScaleFactor() * characteristicCellSize * 0.5); geoGenerator.cylinderWithCenterLineParts(&parts, displayCoords, m_rimWellPath->wellPathColor(), m_rimWellPath->combinedScaleFactor() * characteristicCellSize * 0.5);
@ -151,7 +154,7 @@ void RivWellPathPartMgr::appendCompletionsToModel(cvf::ModelBasicList* model, ca
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivWellPathPartMgr::appendPerforationsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize) void RivWellPathPartMgr::appendPerforationsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize)
{ {
if (!m_rimWellPath || !m_rimWellPath->m_perforationCollection->isChecked()) return; if (!m_rimWellPath || !m_rimWellPath->perforationIntervalCollection()->isChecked()) return;
RimWellPathCollection* wellPathCollection = this->wellPathCollection(); RimWellPathCollection* wellPathCollection = this->wellPathCollection();
if (!wellPathCollection) return; if (!wellPathCollection) return;
@ -166,7 +169,9 @@ void RivWellPathPartMgr::appendPerforationsToModel(cvf::ModelBasicList* model, c
double perforationRadius = wellPathRadius * 1.1; double perforationRadius = wellPathRadius * 1.1;
RivPipeGeometryGenerator geoGenerator; RivPipeGeometryGenerator geoGenerator;
for (RimPerforationInterval* perforation : m_rimWellPath->m_perforationCollection->m_perforations()) std::vector<RimPerforationInterval*> perforations;
m_rimWellPath->descendantsIncludingThisOfType(perforations);
for (RimPerforationInterval* perforation : perforations)
{ {
if (!perforation->isChecked()) continue; if (!perforation->isChecked()) continue;
if (perforation->startMD() > perforation->endMD()) continue; if (perforation->startMD() > perforation->endMD()) continue;

View File

@ -6,10 +6,12 @@ endif()
set (SOURCE_GROUP_HEADER_FILES set (SOURCE_GROUP_HEADER_FILES
${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.h ${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.h
${CEE_CURRENT_LIST_DIR}RimFishbonesCollection.h
) )
set (SOURCE_GROUP_SOURCE_FILES set (SOURCE_GROUP_SOURCE_FILES
${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.cpp ${CEE_CURRENT_LIST_DIR}RimFishbonesMultipleSubs.cpp
${CEE_CURRENT_LIST_DIR}RimFishbonesCollection.cpp
) )
list(APPEND CODE_HEADER_FILES list(APPEND CODE_HEADER_FILES

View File

@ -0,0 +1,63 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 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 "RimFishbonesCollection.h"
#include "RimEclipseWell.h"
#include "RimPerforationInterval.h"
#include "RimView.h"
#include "RimProject.h"
#include "RigWellPath.h"
#include "RifWellPathImporter.h"
#include "RiuMainWindow.h"
#include "RimFishboneWellPathCollection.h"
#include "RimFishbonesMultipleSubs.h"
CAF_PDM_SOURCE_INIT(RimFishbonesCollection, "FishbonesCollection");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimFishbonesCollection::RimFishbonesCollection()
{
CAF_PDM_InitObject("Fishbones", ":/Folder.png", "", "");
m_name.uiCapability()->setUiHidden(true);
m_name = "Fishbones";
CAF_PDM_InitFieldNoDefault(&fishbonesSubs, "FishbonesSubs", "fishbonesSubs", "", "", "");
fishbonesSubs.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_wellPathCollection, "WellPathCollection", "Well Paths", "", "", "");
m_wellPathCollection = new RimFishboneWellPathCollection;
m_wellPathCollection.uiCapability()->setUiHidden(true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimFishboneWellPathCollection* RimFishbonesCollection::wellPathCollection() const
{
return m_wellPathCollection();
}

View File

@ -0,0 +1,49 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 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 "RimCheckableNamedObject.h"
#include "cafPdmObject.h"
#include "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmChildField.h"
class RimFishbonesMultipleSubs;
class RimFishboneWellPathCollection;
//==================================================================================================
//
//
//
//==================================================================================================
class RimFishbonesCollection : public RimCheckableNamedObject
{
CAF_PDM_HEADER_INIT;
public:
RimFishbonesCollection();
RimFishboneWellPathCollection* wellPathCollection() const;
caf::PdmChildArrayField<RimFishbonesMultipleSubs*> fishbonesSubs;
private:
caf::PdmChildField<RimFishboneWellPathCollection*> m_wellPathCollection;
};

View File

@ -41,18 +41,10 @@ RimFishboneWellPathCollection::RimFishboneWellPathCollection()
CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", ""); CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", "");
m_name.uiCapability()->setUiHidden(true); m_name.uiCapability()->setUiHidden(true);
m_name = "Completions"; m_name = "Well Paths";
CAF_PDM_InitFieldNoDefault(&m_completions, "Completions", "WellPathCompletions", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_wellPaths, "WellPaths", "Well Paths", "", "", "");
m_completions.uiCapability()->setUiHidden(true); m_wellPaths.uiCapability()->setUiHidden(true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimFishboneWellPathCollection::~RimFishboneWellPathCollection()
{
m_completions.deleteAllChildObjects();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -70,7 +62,7 @@ void RimFishboneWellPathCollection::fieldChangedByUi(const caf::PdmFieldHandle*
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* completion) void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* completion)
{ {
m_completions.push_back(completion); m_wellPaths.push_back(completion);
updateConnectedEditors(); updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(completion); RiuMainWindow::instance()->selectAsCurrentItem(completion);
@ -82,13 +74,13 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
rimView->scheduleCreateDisplayModelAndRedraw(); rimView->scheduleCreateDisplayModelAndRedraw();
} }
uiCapability()->setUiHidden(!m_completions.empty()); uiCapability()->setUiHidden(!m_wellPaths.empty());
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimFishboneWellPathCollection::importCompletionsFromFile(const QList<QString> filePaths) void RimFishboneWellPathCollection::importCompletionsFromFile(const QStringList& filePaths)
{ {
RifWellPathImporter wellPathImporter; RifWellPathImporter wellPathImporter;

View File

@ -37,12 +37,14 @@ class RimFishboneWellPathCollection : public RimCheckableNamedObject
public: public:
RimFishboneWellPathCollection(); RimFishboneWellPathCollection();
~RimFishboneWellPathCollection();
void appendCompletion(RimFishboneWellPath* completion); void importCompletionsFromFile(const QStringList& filePaths);
void importCompletionsFromFile(const QList<QString> filePaths);
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
caf::PdmChildArrayField<RimFishboneWellPath*> m_completions; private:
void appendCompletion(RimFishboneWellPath* completion);
private:
caf::PdmChildArrayField<RimFishboneWellPath*> m_wellPaths;
}; };

View File

@ -30,8 +30,6 @@
#include "RimWellLogFile.h" #include "RimWellLogFile.h"
#include "RimWellLogPlotCollection.h" #include "RimWellLogPlotCollection.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
#include "RimFishboneWellPathCollection.h"
#include "RimPerforationCollection.h"
#include "RimFishbonesMultipleSubs.h" #include "RimFishbonesMultipleSubs.h"
#include "RimWellPathCompletions.h" #include "RimWellPathCompletions.h"
@ -105,14 +103,6 @@ RimWellPath::RimWellPath()
CAF_PDM_InitField(&wellPathRadiusScaleFactor, "WellPathRadiusScale", 1.0, "Well path radius scale", "", "", ""); 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", "", "", ""); CAF_PDM_InitField(&wellPathColor, "WellPathColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Well path color", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_completionCollection, "Completions_to_be_moved", "Completions", "", "", "");
m_completionCollection = new RimFishboneWellPathCollection;
m_completionCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_perforationCollection, "Perforations", "Perforations", "", "", "");
m_perforationCollection = new RimPerforationCollection;
m_perforationCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_completions, "Completions", "Completions", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_completions, "Completions", "Completions", "", "", "");
m_completions = new RimWellPathCompletions; m_completions = new RimWellPathCompletions;
m_completions.uiCapability()->setUiTreeHidden(true); m_completions.uiCapability()->setUiTreeHidden(true);
@ -120,9 +110,6 @@ RimWellPath::RimWellPath()
CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", "");
m_wellLogFile.uiCapability()->setUiHidden(true); m_wellLogFile.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&fishbonesSubs, "FishbonesSubs", "fishbonesSubs", "", "", "");
fishbonesSubs.uiCapability()->setUiHidden(true);
m_wellPath = NULL; m_wellPath = NULL;
} }
@ -174,6 +161,26 @@ void RimWellPath::setSurveyType(QString surveyType)
wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f); wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f);
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimFishbonesCollection* RimWellPath::fishbonesCollection()
{
CVF_ASSERT(m_completions);
return m_completions->fishbonesCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimPerforationCollection* RimWellPath::perforationIntervalCollection()
{
CVF_ASSERT(m_completions);
return m_completions->perforationCollection();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -296,16 +303,6 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
uiTreeOrdering.skipRemainingChildren(true); uiTreeOrdering.skipRemainingChildren(true);
uiTreeOrdering.add(&m_wellLogFile); uiTreeOrdering.add(&m_wellLogFile);
uiTreeOrdering.add(&m_completions); uiTreeOrdering.add(&m_completions);
if (!m_completionCollection->m_completions.empty())
{
uiTreeOrdering.add(&m_completionCollection);
}
if (!m_perforationCollection->m_perforations.empty())
{
uiTreeOrdering.add(&m_perforationCollection);
}
uiTreeOrdering.add(&fishbonesSubs);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ class RimWellLogFile;
class RimFishboneWellPathCollection; class RimFishboneWellPathCollection;
class RivWellPathPartMgr; class RivWellPathPartMgr;
class RimFishbonesMultipleSubs; class RimFishbonesCollection;
class RimPerforationCollection; class RimPerforationCollection;
class RimWellPathCompletions; class RimWellPathCompletions;
@ -74,13 +74,11 @@ public:
caf::PdmField<double> wellPathRadiusScaleFactor; caf::PdmField<double> wellPathRadiusScaleFactor;
caf::PdmChildField<RimWellLogFile*> m_wellLogFile; caf::PdmChildField<RimWellLogFile*> m_wellLogFile;
caf::PdmChildField<RimFishboneWellPathCollection*> m_completionCollection;
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection; RimFishbonesCollection* fishbonesCollection();
caf::PdmChildField<RimWellPathCompletions*> m_completions; RimPerforationCollection* perforationIntervalCollection();
RigWellPath* wellPathGeometry(); RigWellPath* wellPathGeometry();
caf::PdmChildArrayField<RimFishbonesMultipleSubs*> fishbonesSubs;
RivWellPathPartMgr* partMgr(); RivWellPathPartMgr* partMgr();
bool readWellPathFile(QString * errorMessage, RifWellPathImporter* wellPathImporter); bool readWellPathFile(QString * errorMessage, RifWellPathImporter* wellPathImporter);
@ -111,6 +109,8 @@ private:
caf::PdmField<QString> m_surveyType; caf::PdmField<QString> m_surveyType;
caf::PdmField<double> m_datumElevation; caf::PdmField<double> m_datumElevation;
caf::PdmChildField<RimWellPathCompletions*> m_completions;
cvf::ref<RigWellPath> m_wellPath; cvf::ref<RigWellPath> m_wellPath;
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr; cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
}; };

View File

@ -18,6 +18,9 @@
#include "RimWellPathCompletions.h" #include "RimWellPathCompletions.h"
#include "RimFishbonesCollection.h"
#include "RimPerforationCollection.h"
CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions"); CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
@ -27,6 +30,29 @@ CAF_PDM_SOURCE_INIT(RimWellPathCompletions, "WellPathCompletions");
RimWellPathCompletions::RimWellPathCompletions() RimWellPathCompletions::RimWellPathCompletions()
{ {
CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", ""); CAF_PDM_InitObject("WellPathCompletions", ":/WellCollection.png", "", "");
CAF_PDM_InitFieldNoDefault(&m_perforationCollection, "Perforations", "Perforations", "", "", "");
m_perforationCollection = new RimPerforationCollection;
m_perforationCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_fishbonesCollection, "Fishbones", "Fishbones", "", "", "");
m_fishbonesCollection = new RimFishbonesCollection;
m_fishbonesCollection.uiCapability()->setUiHidden(true);
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimFishbonesCollection* RimWellPathCompletions::fishbonesCollection() const
{
return m_fishbonesCollection;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimPerforationCollection* RimWellPathCompletions::perforationCollection() const
{
return m_perforationCollection;
}

View File

@ -19,7 +19,10 @@
#pragma once #pragma once
#include "cafPdmObject.h" #include "cafPdmObject.h"
#include "cafPdmChildField.h"
class RimFishbonesCollection;
class RimPerforationCollection;
//================================================================================================== //==================================================================================================
/// ///
@ -31,4 +34,11 @@ class RimWellPathCompletions : public caf::PdmObject
public: public:
RimWellPathCompletions(); RimWellPathCompletions();
RimFishbonesCollection* fishbonesCollection() const;
RimPerforationCollection* perforationCollection() const;
private:
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
}; };