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

This commit is contained in:
Magne Sjaastad committed 2021-06-28 14:44:45 +02:00
1 parent 62d67a52c7
commit d818a01b79
8 files changed
+83 -9

No files matched your search

@@ -127,9 +127,15 @@ void RimWellPathTieIn::updateFirstTargetFromParentWell()
newTarget = modeledWellPath->geometryDefinition()->activeWellTargets().front();
}
auto lastPoint = pointVector.back();
auto tangent = lastPoint - pointVector[pointVector.size() - 2];
newTarget->setAsPointXYZAndTangentTarget( { lastPoint[0], lastPoint[1], lastPoint[2] }, tangent );
auto lastPointXYZ = pointVector.back();
auto tangent = lastPointXYZ - pointVector[pointVector.size() - 2];
modeledWellPath->updateReferencePoint();
cvf::Vec3d referencePointXYZ = modeledWellPath->geometryDefinition()->anchorPointXyz();
cvf::Vec3d relativePointXYZ = lastPointXYZ - referencePointXYZ;
newTarget->setAsPointXYZAndTangentTarget( { relativePointXYZ[0], relativePointXYZ[1], relativePointXYZ[2] },
tangent );
}
}