Well Path Groups

This commit is contained in:
Gaute Lindkvist
2020-10-14 18:55:17 +02:00
parent 5ec3e2a7d7
commit 7684596829
10 changed files with 381 additions and 137 deletions

View File

@@ -374,14 +374,14 @@ double RigWellPath::identicalTubeLength( const RigWellPath& other ) const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigWellPath RigWellPath::commonGeometry( const std::vector<const RigWellPath*>& allGeometries )
cvf::ref<RigWellPath> RigWellPath::commonGeometry( const std::vector<const RigWellPath*>& allGeometries )
{
const double eps = 1.0e-8;
if ( allGeometries.empty() )
return RigWellPath();
return nullptr;
else if ( allGeometries.size() == 1u )
return *allGeometries.front();
return cvf::ref<RigWellPath>( new RigWellPath( *allGeometries.front() ) );
const RigWellPath* firstGeometry = allGeometries.front();
@@ -410,7 +410,7 @@ RigWellPath RigWellPath::commonGeometry( const std::vector<const RigWellPath*>&
break;
}
}
return RigWellPath( commonWellPathPoints, commonMDs );
return cvf::ref<RigWellPath>( new RigWellPath( commonWellPathPoints, commonMDs ) );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -70,7 +70,7 @@ public:
void twoClosestPoints( const cvf::Vec3d& position, cvf::Vec3d* p1, cvf::Vec3d* p2 ) const;
double identicalTubeLength( const RigWellPath& otherWellPathGeometry ) const;
static RigWellPath commonGeometry( const std::vector<const RigWellPath*>& allGeometries );
static cvf::ref<RigWellPath> commonGeometry( const std::vector<const RigWellPath*>& allGeometries );
std::pair<std::vector<cvf::Vec3d>, std::vector<double>>
clippedPointSubset( double startMD, double endMD, double* horizontalLengthAlongWellToStartClipPoint = nullptr ) const;