#1501 Fishbones : Increase number of coordinate digits when exporting laterals

This commit is contained in:
Magne Sjaastad 2017-05-19 09:13:22 +02:00
parent ac6d9b9d55
commit 8dd0df7901
2 changed files with 15 additions and 1 deletions

View File

@ -96,8 +96,13 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
for (auto coordMD : coordsAndMD)
{
int numberOfDecimals = 2;
// Export X and Y unchanged, invert sign of Z to get TVD, export MD unchanged
stream << coordMD.first.x() << " " << coordMD.first.y() << " " << -coordMD.first.z() << " " << coordMD.second << endl;
stream << formatNumber( coordMD.first.x(), numberOfDecimals);
stream << " " << formatNumber( coordMD.first.y(), numberOfDecimals);
stream << " " << formatNumber(-coordMD.first.z(), numberOfDecimals);
stream << " " << formatNumber( coordMD.second, numberOfDecimals) << endl;
}
stream << -999 << endl << endl;
}
@ -107,6 +112,14 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
RiaLogging::info("Completed export of Fishbones well path laterals to : " + completeFilename);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicExportFishbonesLateralsFeature::formatNumber(double val, int numberOfDecimals)
{
return QString("%1").arg(val, 0, 'f', numberOfDecimals);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -35,5 +35,6 @@ protected:
virtual bool isCommandEnabled() override;
private:
static QString formatNumber(double val, int numberOfDecimals);
static RimWellPath* selectedWellPath();
};