2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05: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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 02:45:23 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-10-13 06:44:53 -05:00
|
|
|
#include "RigSimWellData.h"
|
|
|
|
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
#include "cafPdmPointer.h"
|
2017-10-13 06:44:53 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
#include <list>
|
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class Part;
|
|
|
|
class ModelBasicList;
|
|
|
|
class DrawableGeo;
|
|
|
|
} // namespace cvf
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-03-13 10:16:41 -05:00
|
|
|
namespace caf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class DisplayCoordTransform;
|
2018-03-13 10:16:41 -05:00
|
|
|
}
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
class RivPipeGeometryGenerator;
|
2018-03-13 10:16:41 -05:00
|
|
|
class Rim3dView;
|
2017-10-13 02:29:42 -05:00
|
|
|
class RimSimWellInView;
|
2018-04-05 06:54:15 -05:00
|
|
|
class RivWellConnectionFactorGeometryGenerator;
|
2021-05-26 04:31:47 -05:00
|
|
|
struct RigWellResultPoint;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2017-01-03 03:09:57 -06:00
|
|
|
class RivSimWellPipesPartMgr : public cvf::Object
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
RivSimWellPipesPartMgr( RimSimWellInView* well );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
~RivSimWellPipesPartMgr() override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void appendDynamicGeometryPartsToModel( cvf::ModelBasicList* model,
|
|
|
|
size_t frameIndex,
|
|
|
|
const caf::DisplayCoordTransform* displayXf );
|
|
|
|
|
|
|
|
void appendFlattenedDynamicGeometryPartsToModel( cvf::ModelBasicList* model,
|
|
|
|
size_t frameIndex,
|
|
|
|
const caf::DisplayCoordTransform* displayXf,
|
|
|
|
double flattenedIntersectionExtentLength,
|
|
|
|
int branchIndex );
|
|
|
|
|
|
|
|
void updatePipeResultColor( size_t frameIndex );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-03-14 11:21:09 -05:00
|
|
|
std::vector<double> flattenedBranchWellHeadOffsets();
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
private:
|
2018-03-13 10:16:41 -05:00
|
|
|
Rim3dView* viewWithSettings();
|
2019-09-06 03:40:57 -05:00
|
|
|
void buildWellPipeParts( const caf::DisplayCoordTransform* displayXf,
|
|
|
|
bool doFlatten,
|
|
|
|
double flattenedIntersectionExtentLength,
|
|
|
|
int branchIndex,
|
|
|
|
size_t frameIndex );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmPointer<RimSimWellInView> m_simWellInView;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
struct RivPipeBranchData
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<RigWellResultPoint> m_cellIds;
|
|
|
|
cvf::ref<RivPipeGeometryGenerator> m_pipeGeomGenerator;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::Part> m_surfacePart;
|
|
|
|
cvf::ref<cvf::DrawableGeo> m_surfaceDrawable;
|
|
|
|
cvf::ref<cvf::DrawableGeo> m_largeSurfaceDrawable;
|
|
|
|
cvf::ref<cvf::Part> m_centerLinePart;
|
|
|
|
cvf::ref<cvf::DrawableGeo> m_centerLineDrawable;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-04-05 06:54:15 -05:00
|
|
|
cvf::ref<RivWellConnectionFactorGeometryGenerator> m_connectionFactorGeometryGenerator;
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::Part> m_connectionFactorsPart;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::list<RivPipeBranchData> m_wellBranches;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<std::vector<cvf::Vec3d>> m_pipeBranchesCLCoords;
|
|
|
|
std::vector<double> m_flattenedBranchWellHeadOffsets;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|