#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:
Magne Sjaastad
2021-06-29 14:17:35 +02:00
parent 3a1f2c8a05
commit a3d5847733
10 changed files with 291 additions and 8 deletions

View File

@@ -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
{