mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7824 Modeled Well Path : Optional support for linking of wells
#7824 Modeled Well Path : Add to context menu in 3D view
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "RimCase.h"
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimWellPathGeometryDef.h"
|
||||
#include "RimWellPathGeometryDefTools.h"
|
||||
#include "RimWellPathTarget.h"
|
||||
|
||||
#include "RiuViewer.h"
|
||||
@@ -166,15 +167,19 @@ void RicWellTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Ve
|
||||
auto relativePositionXYZ = domainCoordXYZ - geomDef->anchorPointXyz();
|
||||
auto delta = target->targetPointXYZ() - relativePositionXYZ;
|
||||
|
||||
auto currentRefPointXyz = geomDef->anchorPointXyz();
|
||||
auto newRefPointXyz = currentRefPointXyz - delta;
|
||||
geomDef->setReferencePointXyz( newRefPointXyz );
|
||||
geomDef->changed.send( false );
|
||||
geomDef->updateWellPathVisualization( true );
|
||||
for ( auto wt : geomDef->activeWellTargets() )
|
||||
// Find all linked wells and update with delta change
|
||||
|
||||
std::vector<RimWellPathGeometryDef*> linkedWellPathGeoDefs;
|
||||
if ( geomDef->isReferencePointUpdatesLinked() )
|
||||
{
|
||||
wt->updateConnectedEditors();
|
||||
linkedWellPathGeoDefs = RimWellPathGeometryDefTools::linkedDefinitions();
|
||||
}
|
||||
else
|
||||
{
|
||||
linkedWellPathGeoDefs.push_back( geomDef );
|
||||
}
|
||||
|
||||
RimWellPathGeometryDefTools::updateLinkedGeometryDefinitions( linkedWellPathGeoDefs, delta );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user