#1603 Adjust start MD when importing fishbones laterals

This commit is contained in:
Bjørnar Grip Fjær
2017-06-15 12:48:22 +02:00
parent 5365d92e66
commit 9caf412b6c
4 changed files with 44 additions and 27 deletions

View File

@@ -23,6 +23,7 @@
#include "RimFishboneWellPath.h"
#include "RimView.h"
#include "RimProject.h"
#include "RimFishbonesCollection.h"
#include "RigWellPath.h"
@@ -53,6 +54,36 @@ RimFishboneWellPathCollection::RimFishboneWellPathCollection()
m_pipeProperties = new RimFishbonesPipeProperties;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFishboneWellPathCollection::importCompletionsFromFile(const QStringList& filePaths)
{
RifWellPathImporter wellPathImporter;
for (const QString& filePath : filePaths)
{
size_t wellDataCount = wellPathImporter.wellDataCount(filePath);
for (size_t i = 0; i < wellDataCount; ++i)
{
RifWellPathImporter::WellData wellData = wellPathImporter.readWellData(filePath, i);
RimFishboneWellPath* wellCompletion = new RimFishboneWellPath();
wellCompletion->setName(wellData.m_name);
wellCompletion->setCoordinates(wellData.m_wellPathGeometry->m_wellPathPoints);
wellCompletion->setMeasuredDepths(wellData.m_wellPathGeometry->m_measuredDepths);
appendCompletion(wellCompletion);
}
}
RimFishbonesCollection* fishbonesCollection;
firstAncestorOrThisOfType(fishbonesCollection);
if (fishbonesCollection != nullptr)
{
fishbonesCollection->recalculateStartMD();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -106,25 +137,3 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
project->reloadCompletionTypeResultsInAllViews();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFishboneWellPathCollection::importCompletionsFromFile(const QStringList& filePaths)
{
RifWellPathImporter wellPathImporter;
foreach(const QString& filePath, filePaths) {
size_t wellDataCount = wellPathImporter.wellDataCount(filePath);
for (size_t i = 0; i < wellDataCount; ++i)
{
RifWellPathImporter::WellData wellData = wellPathImporter.readWellData(filePath, i);
RimFishboneWellPath* wellCompletion = new RimFishboneWellPath();
wellCompletion->setName(wellData.m_name);
wellCompletion->setCoordinates(wellData.m_wellPathGeometry->m_wellPathPoints);
wellCompletion->setMeasuredDepths(wellData.m_wellPathGeometry->m_measuredDepths);
appendCompletion(wellCompletion);
}
}
}