mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1501 Fishbones : Increase number of coordinate digits when exporting laterals
This commit is contained in:
parent
ac6d9b9d55
commit
8dd0df7901
@ -96,8 +96,13 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
|
|||||||
|
|
||||||
for (auto coordMD : coordsAndMD)
|
for (auto coordMD : coordsAndMD)
|
||||||
{
|
{
|
||||||
|
int numberOfDecimals = 2;
|
||||||
|
|
||||||
// Export X and Y unchanged, invert sign of Z to get TVD, export MD unchanged
|
// 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;
|
stream << -999 << endl << endl;
|
||||||
}
|
}
|
||||||
@ -107,6 +112,14 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
|
|||||||
RiaLogging::info("Completed export of Fishbones well path laterals to : " + completeFilename);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -35,5 +35,6 @@ protected:
|
|||||||
virtual bool isCommandEnabled() override;
|
virtual bool isCommandEnabled() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static QString formatNumber(double val, int numberOfDecimals);
|
||||||
static RimWellPath* selectedWellPath();
|
static RimWellPath* selectedWellPath();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user