mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2582 3D well log curves: Create add 3D well log extraction curve cmd
This commit is contained in:
@@ -31,6 +31,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionFeature.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionBoxFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionBoxFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicImportElementPropertyFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicImportElementPropertyFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicSelectColorResult.h
|
${CMAKE_CURRENT_LIST_DIR}/RicSelectColorResult.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogCurveFeature.h
|
||||||
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicWellLogsImportFileFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicWellLogsImportFileFeature.h
|
||||||
|
|
||||||
@@ -99,6 +100,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionFeature.cpp
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionBoxFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionBoxFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicImportElementPropertyFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicImportElementPropertyFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicSelectColorResult.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicSelectColorResult.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogCurveFeature.cpp
|
||||||
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicTogglePerspectiveViewFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicTogglePerspectiveViewFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicImportGeoMechCaseFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicImportGeoMechCaseFeature.cpp
|
||||||
|
|||||||
63
ApplicationCode/Commands/RicAdd3dWellLogCurveFeature.cpp
Normal file
63
ApplicationCode/Commands/RicAdd3dWellLogCurveFeature.cpp
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 "RicAdd3dWellLogCurveFeature.h"
|
||||||
|
|
||||||
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
|
#include "RicWellLogTools.h"
|
||||||
|
|
||||||
|
#include "Rim3dWellLogCurve.h"
|
||||||
|
#include "RimCase.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
CAF_CMD_SOURCE_INIT(RicAdd3dWellLogCurveFeature, "RicAdd3dWellLogCurveFeature");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RicAdd3dWellLogCurveFeature::isCommandEnabled()
|
||||||
|
{
|
||||||
|
std::vector<RimCase*> cases;
|
||||||
|
RiaApplication::instance()->project()->allCases(cases);
|
||||||
|
if (cases.empty()) return false;
|
||||||
|
|
||||||
|
return (RicWellLogTools::selectedWellPath() != nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicAdd3dWellLogCurveFeature::onActionTriggered(bool isChecked)
|
||||||
|
{
|
||||||
|
Rim3dWellLogCurve* rim3dWellLogCurve = new Rim3dWellLogCurve;
|
||||||
|
|
||||||
|
RicWellLogTools::selectedWellPath()->add3dWellLogCurve(rim3dWellLogCurve);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicAdd3dWellLogCurveFeature::setupActionLook(QAction* actionToSetup)
|
||||||
|
{
|
||||||
|
actionToSetup->setIcon(QIcon(":/WellLogCurve16x16.png"));
|
||||||
|
actionToSetup->setText("Add 3D Well Log Curve");
|
||||||
|
}
|
||||||
34
ApplicationCode/Commands/RicAdd3dWellLogCurveFeature.h
Normal file
34
ApplicationCode/Commands/RicAdd3dWellLogCurveFeature.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// 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 "cafCmdFeature.h"
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RicAdd3dWellLogCurveFeature : public caf::CmdFeature
|
||||||
|
{
|
||||||
|
CAF_CMD_HEADER_INIT;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool isCommandEnabled() override;
|
||||||
|
virtual void onActionTriggered( bool isChecked ) override;
|
||||||
|
virtual void setupActionLook( QAction* actionToSetup ) override;
|
||||||
|
};
|
||||||
@@ -263,6 +263,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
|
|
||||||
menuBuilder.addSeparator();
|
menuBuilder.addSeparator();
|
||||||
|
|
||||||
|
menuBuilder << "RicAdd3dWellLogCurveFeature";
|
||||||
|
|
||||||
|
menuBuilder.addSeparator();
|
||||||
|
|
||||||
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
|
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
|
||||||
menuBuilder << "RicNewWellPathFractureFeature";
|
menuBuilder << "RicNewWellPathFractureFeature";
|
||||||
menuBuilder << "RicNewFishbonesSubsFeature";
|
menuBuilder << "RicNewFishbonesSubsFeature";
|
||||||
|
|||||||
@@ -809,6 +809,7 @@ const RigWellPathFormations* RimWellPath::formationsGeometry() const
|
|||||||
void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
|
void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
|
||||||
{
|
{
|
||||||
m_3dWellLogCurves.push_back(rim3dWellLogCurve);
|
m_3dWellLogCurves.push_back(rim3dWellLogCurve);
|
||||||
|
updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -355,6 +355,10 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
|||||||
|
|
||||||
menuBuilder.addSeparator();
|
menuBuilder.addSeparator();
|
||||||
|
|
||||||
|
menuBuilder << "RicAdd3dWellLogCurveFeature";
|
||||||
|
|
||||||
|
menuBuilder.addSeparator();
|
||||||
|
|
||||||
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
|
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
|
||||||
|
|
||||||
menuBuilder << "RicNewWellPathFractureAtPosFeature";
|
menuBuilder << "RicNewWellPathFractureAtPosFeature";
|
||||||
|
|||||||
Reference in New Issue
Block a user