Files
ResInsight/ApplicationCode/ProjectDataModel/RimEclipseWell.h
T

106 lines
4.5 KiB
C++
Raw Normal View History

2012-05-18 09:45:23 +02:00
/////////////////////////////////////////////////////////////////////////////////
//
2014-09-23 15:04:57 +02:00
// Copyright (C) 2011- Statoil ASA
// Copyright (C) 2013- Ceetron Solutions AS
// Copyright (C) 2011-2012 Ceetron AS
2012-05-18 09:45:23 +02:00
//
// 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 "cafPdmField.h"
#include "cafPdmObject.h"
#include "cafPdmPointer.h"
#include "cafAppEnum.h"
2014-07-24 10:11:43 +02:00
// Include to make Pdm work for cvf::Color
2017-01-18 09:56:42 +01:00
#include "cafPdmFieldCvfColor.h"
2014-07-24 10:11:43 +02:00
2017-02-24 13:18:27 +01:00
#include "cvfObject.h"
#include "cvfVector3.h"
class RigSingleWellResultsData;
class RigWellResultFrame;
struct RigWellResultPoint;
2014-07-24 10:11:43 +02:00
2012-05-18 09:45:23 +02:00
//==================================================================================================
///
///
//==================================================================================================
2015-06-25 12:08:00 +02:00
class RimEclipseWell : public caf::PdmObject
2012-05-18 09:45:23 +02:00
{
CAF_PDM_HEADER_INIT;
public:
2015-06-25 12:08:00 +02:00
RimEclipseWell();
virtual ~RimEclipseWell();
2012-05-18 09:45:23 +02:00
void setWellResults(RigSingleWellResultsData* wellResults, size_t resultWellIndex);
2017-01-18 09:56:42 +01:00
RigSingleWellResultsData* wellResults();
const RigSingleWellResultsData* wellResults() const;
size_t resultWellIndex() const;
bool isWellCellsVisible() const;
bool isWellPipeVisible(size_t frameIndex) const;
bool isWellSpheresVisible(size_t frameIndex) const;
bool isUsingCellCenterForPipe() const;
virtual caf::PdmFieldHandle* userDescriptionField() override;
virtual caf::PdmFieldHandle* objectToggleField() override;
2012-05-18 09:45:23 +02:00
void calculateWellPipeStaticCenterLine( std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds);
void calculateWellPipeDynamicCenterLine(size_t timeStepIdx,
std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds);
2012-05-18 09:45:23 +02:00
void wellHeadTopBottomPosition(size_t frameIndex, cvf::Vec3d* top, cvf::Vec3d* bottom);
double pipeRadius();
2013-09-06 15:45:21 +02:00
caf::PdmField<bool> showWell;
2012-05-18 09:45:23 +02:00
caf::PdmField<QString> name;
caf::PdmField<bool> showWellLabel;
caf::PdmField<bool> showWellHead;
caf::PdmField<bool> showWellPipe;
caf::PdmField<bool> showWellSpheres;
caf::PdmField<double> wellHeadScaleFactor;
caf::PdmField<double> pipeScaleFactor;
2012-05-18 09:45:23 +02:00
caf::PdmField<cvf::Color3f> wellPipeColor;
caf::PdmField<bool> showWellCells;
caf::PdmField<bool> showWellCellFence;
2012-05-18 09:45:23 +02:00
protected:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
private:
bool intersectsDynamicWellCellsFilteredCells(size_t frameIndex) const;
bool intersectsStaticWellCellsFilteredCells() const;
bool intersectsWellCellsFilteredCells(const RigWellResultFrame &wrsf, size_t frameIndex) const;
2012-05-18 09:45:23 +02:00
private:
2013-04-16 09:53:31 +02:00
cvf::ref<RigSingleWellResultsData> m_wellResults;
size_t m_resultWellIndex;
2012-05-18 09:45:23 +02:00
};