mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1603 Adjust start MD when importing fishbones laterals
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user