#1500 Fishbones : Use global index to subs when exporting lateral geometry

This commit is contained in:
Magne Sjaastad 2017-05-19 09:51:19 +02:00
parent 8dd0df7901
commit 2b8b703258

View File

@ -74,6 +74,8 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
// x y TVD MD
// separate laterals using -999 on a single line
size_t fishboneSubIndex = 0;
QTextStream stream(&exportFile);
for (RimFishbonesMultipleSubs* fishbone : wellPath->fishbonesSubs())
{
@ -86,9 +88,9 @@ void RicExportFishbonesLateralsFeature::onActionTriggered(bool isChecked)
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMD = fishbone->coordsAndMDForLateral(subIndex, lateralIndex);
// Pad with "0" to get a total of two characters defining the sub index text
QString subIndexText = QString("%1").arg(subIndex, 2, 10, QChar('0'));
QString subIndexText = QString("%1").arg(fishboneSubIndex++, 2, 10, QChar('0'));
QString lateralNameCandidate = QString("%1__%2_%3_%4").arg(wellPath->name()).arg(fishbone->name()).arg(subIndexText).arg(lateralIndex);
QString lateralNameCandidate = QString("%1_%2_%3_%4").arg(wellPath->name()).arg("fishbone").arg(subIndexText).arg(lateralIndex);
QString lateralName = caf::Utils::makeValidFileBasename(lateralNameCandidate);