Compute measured depth if not present on file (#12872)

* Refactors RigWellPathGeometryTools to namespace
* Refactors measured depth calculation to utility.
* Calculates MD if missing from well path data
This commit is contained in:
Magne Sjaastad committed 2025-10-13 14:35:42 +02:00
1 parent 24ca039790
commit a236ae2051
4 files changed
+326 -307

No files matched your search

@@ -22,6 +22,7 @@
#include "RiaStringEncodingTools.h"
#include "RifWellPathImporter.h"
#include "Well/RigWellPathGeometryTools.h"
#include "well.hpp"
@@ -57,6 +58,17 @@ RifWellPathImporter::WellData RifRmsWellPathReader::readWellData( const QString&
md = values;
}
if ( !x.empty() && x.size() == y.size() && x.size() == z.size() && md.empty() )
{
std::vector<cvf::Vec3d> points;
points.resize( x.size() );
for ( size_t i = 0; i < x.size(); i++ )
{
points[i] = cvf::Vec3d( x[i], y[i], z[i] );
}
md = RigWellPathGeometryTools::calculateMeasuredDepth( points );
}
if ( !x.empty() && x.size() == y.size() && x.size() == z.size() && x.size() == md.size() )
{
auto wellData = RifWellPathImporter::WellData();