#2582 3D well log curves: Create add 3D well log extraction curve cmd

This commit is contained in:
Rebecca Cox
2018-03-07 12:02:13 +01:00
parent 846dd710e4
commit a37a9d3308
6 changed files with 108 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicHideIntersectionBoxFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicImportElementPropertyFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSelectColorResult.h
${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogCurveFeature.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}/RicImportElementPropertyFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSelectColorResult.cpp
${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogCurveFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicTogglePerspectiveViewFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportGeoMechCaseFeature.cpp

View 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");
}

View 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;
};

View File

@@ -263,6 +263,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder.addSeparator();
menuBuilder << "RicAdd3dWellLogCurveFeature";
menuBuilder.addSeparator();
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
menuBuilder << "RicNewWellPathFractureFeature";
menuBuilder << "RicNewFishbonesSubsFeature";

View File

@@ -809,6 +809,7 @@ const RigWellPathFormations* RimWellPath::formationsGeometry() const
void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
{
m_3dWellLogCurves.push_back(rim3dWellLogCurve);
updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -355,6 +355,10 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
menuBuilder.addSeparator();
menuBuilder << "RicAdd3dWellLogCurveFeature";
menuBuilder.addSeparator();
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
menuBuilder << "RicNewWellPathFractureAtPosFeature";