Well Lateral : Connect new lateral close to total depth

This commit is contained in:
Magne Sjaastad 2021-05-11 07:43:18 +02:00
parent 282c6f3586
commit 2eced13e28
2 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include "RicNewWellPathLateralAtDepthFeature.h"
#include "RigWellPath.h"
#include "RimWellPath.h"
#include "cafSelectionManager.h"
@ -47,6 +48,14 @@ void RicNewWellPathLateralFeature::onActionTriggered( bool isChecked )
if ( !parentWellPath ) return;
double measuredDepth = 0.0;
if ( parentWellPath->wellPathGeometry() && parentWellPath->wellPathGeometry()->measuredDepths().size() > 2 )
{
// Create new well close to the total depth of parent well
double mdCandidate = parentWellPath->wellPathGeometry()->measuredDepths().back() - 100.0;
measuredDepth = std::max( 0.0, mdCandidate );
}
RicNewWellPathLateralAtDepthFeature::createLateralAtMeasuredDepth( parentWellPath, measuredDepth );
}

View File

@ -598,6 +598,9 @@ void RimWellPathCollection::groupWellPaths( const std::vector<RimWellPath*>& wel
for ( auto wellPath : wellPathCommonName )
{
// Assign the group names as well name for export
wellPath->completionSettings()->setWellNameForExport( groupName );
auto wellPathGeometry = wellPath->wellPathGeometry();
if ( wellPathGeometry )
{