Remove redundant part of hierarchical well paths

This commit is contained in:
Gaute Lindkvist
2020-10-16 07:36:29 +02:00
parent 7684596829
commit 362dcb4dd1
7 changed files with 95 additions and 20 deletions

View File

@@ -30,6 +30,7 @@
RigWellPath::RigWellPath()
: m_hasDatumElevation( false )
, m_datumElevation( 0.0 )
, m_startIndex( 0u )
, objectBeingDeleted( this )
{
}
@@ -42,6 +43,7 @@ RigWellPath::RigWellPath( const RigWellPath& rhs )
, m_measuredDepths( rhs.m_measuredDepths )
, m_hasDatumElevation( rhs.m_hasDatumElevation )
, m_datumElevation( rhs.m_datumElevation )
, m_startIndex( rhs.m_startIndex )
, objectBeingDeleted( this )
{
}
@@ -52,6 +54,7 @@ RigWellPath::RigWellPath( const RigWellPath& rhs )
RigWellPath::RigWellPath( const std::vector<cvf::Vec3d>& wellPathPoints, const std::vector<double>& measuredDepths )
: m_wellPathPoints( wellPathPoints )
, m_measuredDepths( measuredDepths )
, m_startIndex( 0u )
, objectBeingDeleted( this )
{
}
@@ -65,6 +68,7 @@ RigWellPath& RigWellPath::operator=( const RigWellPath& rhs )
m_measuredDepths = rhs.m_measuredDepths;
m_hasDatumElevation = rhs.m_hasDatumElevation;
m_datumElevation = rhs.m_datumElevation;
m_startIndex = rhs.m_startIndex;
return *this;
}
@@ -413,6 +417,22 @@ cvf::ref<RigWellPath> RigWellPath::commonGeometry( const std::vector<const RigWe
return cvf::ref<RigWellPath>( new RigWellPath( commonWellPathPoints, commonMDs ) );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigWellPath::setUniqueStartIndex( size_t uniqueStartIndex )
{
m_startIndex = uniqueStartIndex;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<cvf::Vec3d> RigWellPath::uniqueWellPathPoints() const
{
return std::vector<cvf::Vec3d>( m_wellPathPoints.begin() + m_startIndex, m_wellPathPoints.end() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -71,6 +71,8 @@ public:
double identicalTubeLength( const RigWellPath& otherWellPathGeometry ) const;
static cvf::ref<RigWellPath> commonGeometry( const std::vector<const RigWellPath*>& allGeometries );
void setUniqueStartIndex( size_t uniqueStartIndex );
std::vector<cvf::Vec3d> uniqueWellPathPoints() const;
std::pair<std::vector<cvf::Vec3d>, std::vector<double>>
clippedPointSubset( double startMD, double endMD, double* horizontalLengthAlongWellToStartClipPoint = nullptr ) const;
@@ -90,4 +92,5 @@ private:
bool m_hasDatumElevation;
double m_datumElevation;
size_t m_startIndex;
};