mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve how wells are connected during import
When importing new wells, consider all wells when connecting multi segment wells Make sure that import of individual well paths will give the same ordering as importing all wells in a single operation.
This commit is contained in:
@@ -81,7 +81,7 @@ RimStimPlanModel* RicNewStimPlanModelFeature::addStimPlanModel( RimWellPath*
|
||||
stimPlanModel->setThicknessDirectionWellPath( thicknessDirectionWellPath );
|
||||
|
||||
std::vector<RimWellPath*> wellPaths = { thicknessDirectionWellPath };
|
||||
wellPathCollection->addWellPaths( wellPaths, false );
|
||||
wellPathCollection->addWellPaths( wellPaths );
|
||||
|
||||
if ( project )
|
||||
{
|
||||
|
@@ -127,9 +127,8 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
|
||||
// Load well path from file
|
||||
QStringList wellPathFilePaths;
|
||||
wellPathFilePaths << ui.wellPathFilePath();
|
||||
bool importGrouped = false;
|
||||
QStringList errorMessages;
|
||||
std::vector<RimWellPath*> wellPaths = RicImportWellPaths::importWellPaths( wellPathFilePaths, importGrouped, &errorMessages );
|
||||
std::vector<RimWellPath*> wellPaths = RicImportWellPaths::importWellPaths( wellPathFilePaths, &errorMessages );
|
||||
if ( wellPaths.empty() ) return;
|
||||
|
||||
wellPath = wellPaths[0];
|
||||
|
@@ -118,7 +118,7 @@ void RicWellPathsImportSsihubFeature::onActionTriggered( bool isChecked )
|
||||
if ( wellPaths.size() > 0 )
|
||||
{
|
||||
QStringList errorMessages;
|
||||
app->addWellPathsToModel( wellPaths, false, &errorMessages );
|
||||
app->addWellPathsToModel( wellPaths, &errorMessages );
|
||||
app->project()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
|
@@ -163,7 +163,7 @@ void RicCreateMultipleWellPathLaterals::slotAppendFractures()
|
||||
|
||||
newModeledWellPath->wellPathTieIn()->setTieInMeasuredDepth( measuredDepth );
|
||||
|
||||
wellPathCollection->addWellPath( newModeledWellPath, false );
|
||||
wellPathCollection->addWellPath( newModeledWellPath );
|
||||
newModeledWellPath->resolveReferencesRecursively();
|
||||
|
||||
newModeledWellPath->updateReferencePoint();
|
||||
|
@@ -66,7 +66,6 @@ RicImportWellPaths::RicImportWellPaths()
|
||||
{
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_wellPathFolder, "wellPathFolder", "" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_wellPathFiles, "wellPathFiles", "" );
|
||||
CAF_PDM_InitScriptableField( &m_importGrouped, "importGrouped", false, "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -124,7 +123,7 @@ caf::PdmScriptResponse RicImportWellPaths::execute()
|
||||
caf::PdmScriptResponse response;
|
||||
if ( !wellPathFiles.empty() )
|
||||
{
|
||||
std::vector<RimWellPath*> importedWellPaths = importWellPaths( wellPathFiles, m_importGrouped(), &warningMessages );
|
||||
std::vector<RimWellPath*> importedWellPaths = importWellPaths( wellPathFiles, &warningMessages );
|
||||
if ( !importedWellPaths.empty() )
|
||||
{
|
||||
RicImportWellPathsResult* wellPathsResult = new RicImportWellPathsResult;
|
||||
@@ -157,15 +156,14 @@ caf::PdmScriptResponse RicImportWellPaths::execute()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*>
|
||||
RicImportWellPaths::importWellPaths( const QStringList& wellPathFilePaths, bool importGrouped, QStringList* errorMessages )
|
||||
std::vector<RimWellPath*> RicImportWellPaths::importWellPaths( const QStringList& wellPathFilePaths, QStringList* errorMessages )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( "WELLPATH_DIR", QFileInfo( wellPathFilePaths.last() ).absolutePath() );
|
||||
|
||||
std::vector<RimWellPath*> wellPaths = app->addWellPathsToModel( wellPathFilePaths, importGrouped, errorMessages );
|
||||
std::vector<RimWellPath*> wellPaths = app->addWellPathsToModel( wellPathFilePaths, errorMessages );
|
||||
|
||||
RimProject* project = app->project();
|
||||
|
||||
|
@@ -42,7 +42,7 @@ public:
|
||||
RicImportWellPaths();
|
||||
caf::PdmScriptResponse execute() override;
|
||||
|
||||
static std::vector<RimWellPath*> importWellPaths( const QStringList& wellPathFilePaths, bool importGrouped, QStringList* errorMessages );
|
||||
static std::vector<RimWellPath*> importWellPaths( const QStringList& wellPathFilePaths, QStringList* errorMessages );
|
||||
|
||||
protected:
|
||||
static QStringList wellPathNameFilters();
|
||||
@@ -54,5 +54,4 @@ protected:
|
||||
protected:
|
||||
caf::PdmField<QString> m_wellPathFolder;
|
||||
caf::PdmField<std::vector<QString>> m_wellPathFiles;
|
||||
caf::PdmField<bool> m_importGrouped;
|
||||
};
|
||||
|
@@ -80,7 +80,7 @@ void RicNewEditableWellPathFeature::onActionTriggered( bool isChecked )
|
||||
newWellPaths.back()->setName( "Well-" + QString::number( modelledWellpathCount + 1 ) );
|
||||
newModeledWellPath->setWellPathColor( RiaColorTables::editableWellPathsPaletteColors().cycledColor3f( modelledWellpathCount ) );
|
||||
|
||||
wellPathCollection->addWellPaths( newWellPaths, false );
|
||||
wellPathCollection->addWellPaths( newWellPaths );
|
||||
wellPathCollection->uiCapability()->updateConnectedEditors();
|
||||
|
||||
newModeledWellPath->geometryDefinition()->enableTargetPointPicking( true );
|
||||
|
@@ -116,8 +116,7 @@ RimModeledWellPath* RicNewWellPathLateralAtDepthFeature::createLateralAtMeasured
|
||||
|
||||
newModeledWellPath->createWellPathGeometry();
|
||||
|
||||
bool importGrouped = false;
|
||||
wellPathColl->addWellPath( newModeledWellPath, importGrouped );
|
||||
wellPathColl->addWellPath( newModeledWellPath );
|
||||
wellPathColl->updateAllRequiredEditors();
|
||||
|
||||
project->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
|
@@ -155,7 +155,7 @@ RimModeledWellPath* RicPasteModeledWellPathFeature::duplicateAndInitializeWellPa
|
||||
QString name = sourceWellPath->name() + "(copy)";
|
||||
destinationWellPath->setName( name );
|
||||
|
||||
wpc->addWellPath( destinationWellPath, false );
|
||||
wpc->addWellPath( destinationWellPath );
|
||||
|
||||
// Resolve references, will connect to the fracture template
|
||||
destinationWellPath->resolveReferencesRecursively();
|
||||
|
Reference in New Issue
Block a user