mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-03 20:57:39 -06:00
#2584 3D well log curves: Create a collection object to hold curves
This commit is contained in:
parent
00a0d2b1f6
commit
831eac7fd5
@ -20,6 +20,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurveCollection.h
|
||||
)
|
||||
|
||||
|
||||
@ -44,6 +45,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurveCollection.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
@ -0,0 +1,62 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018- 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 "Rim3dWellLogCurveCollection.h"
|
||||
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(Rim3dWellLogCurveCollection, "Rim3dWellLogCurveCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dWellLogCurveCollection::Rim3dWellLogCurveCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("3D Track", ":/WellLogCurve16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "ArrayOf3dWellLogCurves", "", "", "", "");
|
||||
m_3dWellLogCurves.uiCapability()->setUiTreeHidden(true);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dWellLogCurveCollection::~Rim3dWellLogCurveCollection()
|
||||
{
|
||||
m_3dWellLogCurves.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dWellLogCurveCollection::has3dWellLogCurves() const
|
||||
{
|
||||
return !m_3dWellLogCurves.empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogCurveCollection::add3dWellLogCurve(Rim3dWellLogCurve* curve)
|
||||
{
|
||||
if (curve)
|
||||
{
|
||||
m_3dWellLogCurves.push_back(curve);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018- 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"
|
||||
|
||||
class Rim3dWellLogCurve;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class Rim3dWellLogCurveCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
Rim3dWellLogCurveCollection();
|
||||
virtual ~Rim3dWellLogCurveCollection();
|
||||
|
||||
bool has3dWellLogCurves() const;
|
||||
void add3dWellLogCurve(Rim3dWellLogCurve* curve);
|
||||
|
||||
caf::PdmChildArrayField<Rim3dWellLogCurve*> m_3dWellLogCurves;
|
||||
};
|
@ -72,7 +72,7 @@ namespace caf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dWellLogCurve::Rim3dWellLogCurve()
|
||||
{
|
||||
CAF_PDM_InitObject("3d Well Log Curve", "", "", "");
|
||||
CAF_PDM_InitObject("3d Well Log Curve", ":/WellLogCurve16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_showCurve, "Show3dWellLogCurve", true, "Show 3d Well Log Curve", "", "", "");
|
||||
m_showCurve.uiCapability()->setUiHidden(true);
|
||||
@ -83,6 +83,7 @@ Rim3dWellLogCurve::Rim3dWellLogCurve()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", "");
|
||||
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
m_case = nullptr;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_eclipseResultDefinition, "CurveEclipseResult", "", "", "", "");
|
||||
m_eclipseResultDefinition.uiCapability()->setUiHidden(true);
|
||||
@ -115,11 +116,7 @@ Rim3dWellLogCurve::~Rim3dWellLogCurve()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogCurve::setPropertiesFromView(Rim3dView* view)
|
||||
{
|
||||
m_case = nullptr;
|
||||
if (view)
|
||||
{
|
||||
m_case = view->ownerCase();
|
||||
}
|
||||
if (!view) return;
|
||||
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
#include "Rim3dWellLogCurveCollection.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimProject.h"
|
||||
@ -129,7 +130,9 @@ RimWellPath::RimWellPath()
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogFiles, "WellLogFiles", "Well Log Files", "", "", "");
|
||||
m_wellLogFiles.uiCapability()->setUiTreeHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "ArrayOf3dWellLogCurves", "3D Track", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "CollectionOf3dWellLogCurves", "3D Track", "", "", "");
|
||||
m_3dWellLogCurves = new Rim3dWellLogCurveCollection;
|
||||
m_3dWellLogCurves.uiCapability()->setUiTreeHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_formationKeyInFile, "WellPathFormationKeyInFile", QString(""), "Key in File", "", "", "");
|
||||
m_formationKeyInFile.uiCapability()->setUiReadOnly(true);
|
||||
@ -160,11 +163,6 @@ RimWellPath::~RimWellPath()
|
||||
delete file;
|
||||
}
|
||||
|
||||
for (const auto& rim3dWellLogCurve : m_3dWellLogCurves())
|
||||
{
|
||||
delete rim3dWellLogCurve;
|
||||
}
|
||||
|
||||
RimProject* project;
|
||||
firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
@ -519,7 +517,7 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
||||
uiTreeOrdering.add(&m_completions);
|
||||
}
|
||||
|
||||
if (!m_3dWellLogCurves.empty())
|
||||
if (m_3dWellLogCurves->has3dWellLogCurves())
|
||||
{
|
||||
uiTreeOrdering.add(&m_3dWellLogCurves);
|
||||
}
|
||||
@ -808,7 +806,7 @@ const RigWellPathFormations* RimWellPath::formationsGeometry() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
|
||||
{
|
||||
m_3dWellLogCurves.push_back(rim3dWellLogCurve);
|
||||
m_3dWellLogCurves->add3dWellLogCurve(rim3dWellLogCurve);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -41,7 +41,7 @@ class RifWellPathFormationsImporter;
|
||||
class RigWellPath;
|
||||
class RimProject;
|
||||
class RimWellLogFile;
|
||||
class Rim3dWellLogCurve;
|
||||
class RimFractureTemplateCollection;
|
||||
class RimFishboneWellPathCollection;
|
||||
|
||||
class RimFishbonesCollection;
|
||||
@ -50,6 +50,8 @@ class RimWellPathCompletions;
|
||||
class RigWellPathFormations;
|
||||
|
||||
class RimWellPathFractureCollection;
|
||||
class Rim3dWellLogCurveCollection;
|
||||
class Rim3dWellLogCurve;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -175,7 +177,7 @@ private:
|
||||
|
||||
caf::PdmChildArrayField<RimWellLogFile*> m_wellLogFiles;
|
||||
|
||||
caf::PdmChildArrayField<Rim3dWellLogCurve*> m_3dWellLogCurves;
|
||||
caf::PdmChildField<Rim3dWellLogCurveCollection*> m_3dWellLogCurves;
|
||||
|
||||
caf::PdmChildField<RimWellLogFile*> m_wellLogFile_OBSOLETE;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user