#1294 - Renaming and moving ascii export feature, now RicAsciiExportWellLogPlotFeature. Adding functionality for getting data to export (but formatting is still missing)

This commit is contained in:
astridkbjorke
2017-03-09 14:27:41 +01:00
parent 7f511f7004
commit b89efbf73e
9 changed files with 91 additions and 20 deletions

View File

@@ -31,6 +31,8 @@
#include <math.h>
#include "RimWellAllocationPlot.h"
#include "RimWellLogCurve.h"
#include "RigWellLogCurveData.h"
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
@@ -383,6 +385,42 @@ QWidget* RimWellLogPlot::viewWidget()
return m_viewer;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimWellLogPlot::asciiDataForPlotExport()
{
QString out;
for (RimWellLogTrack* track : m_tracks)
{
out += "\n" + track->description() + "\n";
std::vector<RimWellLogCurve* > curves = track->curvesVector();
for (RimWellLogCurve* curve : curves)
{
out += curve->curveName() + "\n";
const RigWellLogCurveData* curveData = curve->curveData();
std::vector<double> xPlotValues = curveData->xPlotValues();
std::vector<double> depths;
depths = curveData->measuredDepthPlotValues(RimDefines::UNIT_NONE);
if (!(depths.size() == xPlotValues.size())) return out;
for (int i = xPlotValues.size()-1; i >= 0; i--)
{
out += QString::number(depths[i]) + " " + QString::number(xPlotValues[i]) + " \n";
}
}
}
return out;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------