mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2581 3D well log curves: Create 3D curve object on a well path
This commit is contained in:
@@ -98,6 +98,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationCollection.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.h
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.h
|
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.h
|
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurve.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -200,6 +201,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationCollection.cpp
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurve.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES
|
list(APPEND CODE_HEADER_FILES
|
||||||
|
138
ApplicationCode/ProjectDataModel/Rim3dWellLogCurve.cpp
Normal file
138
ApplicationCode/ProjectDataModel/Rim3dWellLogCurve.cpp
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 "Rim3dWellLogCurve.h"
|
||||||
|
|
||||||
|
#include "RimEclipseCase.h"
|
||||||
|
#include "RimEclipseResultDefinition.h"
|
||||||
|
#include "RimGeoMechCase.h"
|
||||||
|
#include "RimGeoMechResultDefinition.h"
|
||||||
|
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT(Rim3dWellLogCurve, "Rim3dWellLogCurve");
|
||||||
|
|
||||||
|
namespace caf
|
||||||
|
{
|
||||||
|
template<>
|
||||||
|
void AppEnum< Rim3dWellLogCurve::DrawPlane >::setUp()
|
||||||
|
{
|
||||||
|
addItem(Rim3dWellLogCurve::HORIZONTAL_LEFT, "HORIZONTAL_LEFT", "Horizontal - Left");
|
||||||
|
addItem(Rim3dWellLogCurve::HORIZONTAL_RIGHT, "HORIZONTAL_RIGHT", "Horizontal - Right");
|
||||||
|
addItem(Rim3dWellLogCurve::VERTICAL_ABOVE, "VERTICAL_ABOVE", "Vertical - Above");
|
||||||
|
addItem(Rim3dWellLogCurve::VERTICAL_BELOW, "VERTICAL_BELOW", "Vertical - Below");
|
||||||
|
addItem(Rim3dWellLogCurve::CAMERA_ALIGNED_SIDE1, "CAMERA_ALIGNED_SIDE_1", "Camera Aligned - Side 1");
|
||||||
|
addItem(Rim3dWellLogCurve::CAMERA_ALIGNED_SIDE2, "CAMERA_ALIGNED_SIDE_2", "Camera Aligned - Side 2");
|
||||||
|
setDefault(Rim3dWellLogCurve::HORIZONTAL_LEFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void AppEnum< Rim3dWellLogCurve::DrawStyle >::setUp()
|
||||||
|
{
|
||||||
|
addItem(Rim3dWellLogCurve::LINE, "LINE", "Line");
|
||||||
|
addItem(Rim3dWellLogCurve::FILLED, "FILLED", "Filled");
|
||||||
|
setDefault(Rim3dWellLogCurve::LINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void AppEnum< Rim3dWellLogCurve::ColoringStyle >::setUp()
|
||||||
|
{
|
||||||
|
addItem(Rim3dWellLogCurve::SINGLE_COLOR, "SINGLE_COLOR", "Single Color");
|
||||||
|
addItem(Rim3dWellLogCurve::CURVE_VALUE, "CURVE_VALUE", "Curve Value");
|
||||||
|
addItem(Rim3dWellLogCurve::OTHER_RESULT, "OTHER_RESULT", "Other Result");
|
||||||
|
setDefault(Rim3dWellLogCurve::SINGLE_COLOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Rim3dWellLogCurve::Rim3dWellLogCurve()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject("3d Well Log Curve", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_drawPlane, "DrawPlane", "Draw Plane", "", "", "");
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_drawStyle, "DrawStyle", "Draw Style", "", "", "");
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_coloringStyle, "ColoringStyle", "Coloring Style", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", "");
|
||||||
|
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_eclipseResultDefinition, "CurveEclipseResult", "", "", "", "");
|
||||||
|
m_eclipseResultDefinition.uiCapability()->setUiHidden(true);
|
||||||
|
m_eclipseResultDefinition.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
m_eclipseResultDefinition = new RimEclipseResultDefinition;
|
||||||
|
m_eclipseResultDefinition->findField("MResultType")->uiCapability()->setUiName("Result Type");
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_geomResultDefinition, "CurveGeomechResult", "", "", "", "");
|
||||||
|
m_geomResultDefinition.uiCapability()->setUiHidden(true);
|
||||||
|
m_geomResultDefinition.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
m_geomResultDefinition = new RimGeoMechResultDefinition;
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&m_timeStep, "CurveTimeStep", 0, "Time Step", "", "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Rim3dWellLogCurve::~Rim3dWellLogCurve()
|
||||||
|
{
|
||||||
|
delete m_geomResultDefinition;
|
||||||
|
delete m_eclipseResultDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void Rim3dWellLogCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||||
|
{
|
||||||
|
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
|
||||||
|
|
||||||
|
curveDataGroup->add(&m_case);
|
||||||
|
|
||||||
|
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
|
||||||
|
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
|
||||||
|
|
||||||
|
if (eclipseCase)
|
||||||
|
{
|
||||||
|
m_eclipseResultDefinition->uiOrdering(uiConfigName, *curveDataGroup);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (geomCase)
|
||||||
|
{
|
||||||
|
m_geomResultDefinition->uiOrdering(uiConfigName, *curveDataGroup);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((eclipseCase && m_eclipseResultDefinition->hasDynamicResult())
|
||||||
|
|| geomCase)
|
||||||
|
{
|
||||||
|
curveDataGroup->add(&m_timeStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
caf::PdmUiGroup* formatGroup = uiOrdering.addNewGroup("Appearance");
|
||||||
|
formatGroup->add(&m_drawPlane);
|
||||||
|
formatGroup->add(&m_drawStyle);
|
||||||
|
formatGroup->add(&m_coloringStyle);
|
||||||
|
|
||||||
|
uiOrdering.skipRemainingFields();
|
||||||
|
}
|
80
ApplicationCode/ProjectDataModel/Rim3dWellLogCurve.h
Normal file
80
ApplicationCode/ProjectDataModel/Rim3dWellLogCurve.h
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 "cafAppEnum.h"
|
||||||
|
#include "cafPdmChildField.h"
|
||||||
|
#include "cafPdmField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
|
#include "RimCase.h"
|
||||||
|
|
||||||
|
class RimGeoMechResultDefinition;
|
||||||
|
class RimEclipseResultDefinition;
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class Rim3dWellLogCurve : public caf::PdmObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum DrawPlane
|
||||||
|
{
|
||||||
|
HORIZONTAL_LEFT,
|
||||||
|
HORIZONTAL_RIGHT,
|
||||||
|
VERTICAL_ABOVE,
|
||||||
|
VERTICAL_BELOW,
|
||||||
|
CAMERA_ALIGNED_SIDE1,
|
||||||
|
CAMERA_ALIGNED_SIDE2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DrawStyle
|
||||||
|
{
|
||||||
|
LINE,
|
||||||
|
FILLED
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ColoringStyle
|
||||||
|
{
|
||||||
|
SINGLE_COLOR,
|
||||||
|
CURVE_VALUE,
|
||||||
|
OTHER_RESULT
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
Rim3dWellLogCurve();
|
||||||
|
virtual ~Rim3dWellLogCurve();
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
caf::PdmPtrField<RimCase*> m_case;
|
||||||
|
caf::PdmField<int> m_timeStep;
|
||||||
|
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
||||||
|
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
||||||
|
|
||||||
|
caf::PdmField<caf::AppEnum<DrawPlane>> m_drawPlane;
|
||||||
|
caf::PdmField<caf::AppEnum<DrawStyle>> m_drawStyle;
|
||||||
|
caf::PdmField<caf::AppEnum<ColoringStyle>> m_coloringStyle;
|
||||||
|
};
|
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
|
#include "Rim3dWellLogCurve.h"
|
||||||
#include "RimFishbonesMultipleSubs.h"
|
#include "RimFishbonesMultipleSubs.h"
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
@@ -128,6 +129,8 @@ RimWellPath::RimWellPath()
|
|||||||
CAF_PDM_InitFieldNoDefault(&m_wellLogFiles, "WellLogFiles", "Well Log Files", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_wellLogFiles, "WellLogFiles", "Well Log Files", "", "", "");
|
||||||
m_wellLogFiles.uiCapability()->setUiTreeHidden(true);
|
m_wellLogFiles.uiCapability()->setUiTreeHidden(true);
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "ArrayOf3dWellLogCurves", "3D Track", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_formationKeyInFile, "WellPathFormationKeyInFile", QString(""), "Key in File", "", "", "");
|
CAF_PDM_InitField(&m_formationKeyInFile, "WellPathFormationKeyInFile", QString(""), "Key in File", "", "", "");
|
||||||
m_formationKeyInFile.uiCapability()->setUiReadOnly(true);
|
m_formationKeyInFile.uiCapability()->setUiReadOnly(true);
|
||||||
|
|
||||||
@@ -157,6 +160,11 @@ RimWellPath::~RimWellPath()
|
|||||||
delete file;
|
delete file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const auto& rim3dWellLogCurve : m_3dWellLogCurves())
|
||||||
|
{
|
||||||
|
delete rim3dWellLogCurve;
|
||||||
|
}
|
||||||
|
|
||||||
RimProject* project;
|
RimProject* project;
|
||||||
firstAncestorOrThisOfType(project);
|
firstAncestorOrThisOfType(project);
|
||||||
if (project)
|
if (project)
|
||||||
@@ -511,6 +519,11 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
|||||||
uiTreeOrdering.add(&m_completions);
|
uiTreeOrdering.add(&m_completions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_3dWellLogCurves.empty())
|
||||||
|
{
|
||||||
|
uiTreeOrdering.add(&m_3dWellLogCurves);
|
||||||
|
}
|
||||||
|
|
||||||
uiTreeOrdering.skipRemainingChildren(true);
|
uiTreeOrdering.skipRemainingChildren(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,6 +803,14 @@ const RigWellPathFormations* RimWellPath::formationsGeometry() const
|
|||||||
return m_wellPathFormations.p();
|
return m_wellPathFormations.p();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
|
||||||
|
{
|
||||||
|
m_3dWellLogCurves.push_back(rim3dWellLogCurve);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@@ -41,6 +41,7 @@ class RifWellPathFormationsImporter;
|
|||||||
class RigWellPath;
|
class RigWellPath;
|
||||||
class RimProject;
|
class RimProject;
|
||||||
class RimWellLogFile;
|
class RimWellLogFile;
|
||||||
|
class Rim3dWellLogCurve;
|
||||||
class RimFishboneWellPathCollection;
|
class RimFishboneWellPathCollection;
|
||||||
|
|
||||||
class RimFishbonesCollection;
|
class RimFishbonesCollection;
|
||||||
@@ -75,6 +76,8 @@ public:
|
|||||||
bool hasFormations() const;
|
bool hasFormations() const;
|
||||||
const RigWellPathFormations* formationsGeometry() const;
|
const RigWellPathFormations* formationsGeometry() const;
|
||||||
|
|
||||||
|
void add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve);
|
||||||
|
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||||
|
|
||||||
@@ -171,6 +174,8 @@ private:
|
|||||||
caf::PdmField<QString> m_formationKeyInFile;
|
caf::PdmField<QString> m_formationKeyInFile;
|
||||||
|
|
||||||
caf::PdmChildArrayField<RimWellLogFile*> m_wellLogFiles;
|
caf::PdmChildArrayField<RimWellLogFile*> m_wellLogFiles;
|
||||||
|
|
||||||
|
caf::PdmChildArrayField<Rim3dWellLogCurve*> m_3dWellLogCurves;
|
||||||
|
|
||||||
caf::PdmChildField<RimWellLogFile*> m_wellLogFile_OBSOLETE;
|
caf::PdmChildField<RimWellLogFile*> m_wellLogFile_OBSOLETE;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user