#7811 Modeled Well Path : Optionally use refpoint from top level well path

This commit is contained in:
Magne Sjaastad
2021-06-28 11:18:04 +02:00
parent 62d67a52c7
commit d818a01b79
8 changed files with 83 additions and 9 deletions

View File

@@ -140,6 +140,21 @@ void RicWellTarget3dEditor::slotUpdated( const cvf::Vec3d& origin, const cvf::Ve
target->firstAncestorOrThisOfTypeAsserted( geomDef );
if ( !geomDef ) return;
if ( geomDef->useReferencePointFromTopLevelWell() )
{
RimModeledWellPath* modeledWellPath = nullptr;
geomDef->firstAncestorOfType( modeledWellPath );
if ( modeledWellPath )
{
auto topLevelWellPath = dynamic_cast<RimModeledWellPath*>( modeledWellPath->topLevelWellPath() );
if ( topLevelWellPath )
{
// Manipulate the reference point of top level well path
geomDef = topLevelWellPath->geometryDefinition();
}
}
}
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
auto domainCoordXYZ = dispXf->transformToDomainCoord( origin );