#1339 - pre-proto - Extracting function for azimuth angle of well

This commit is contained in:
astridkbjorke
2017-03-21 10:45:19 +01:00
parent d15d1a03a1
commit 96372c9077
4 changed files with 34 additions and 10 deletions

View File

@@ -96,15 +96,8 @@ void RimWellPathFracture::updateAzimuthFromFractureDefinition()
if (orientation == RimFractureTemplate::ALONG_WELL_PATH || orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
if (!objHandle) return;
double wellPathAzimuth = wellAzimuthAtFracturePosition();
RimWellPath* wellPath = nullptr;
objHandle->firstAncestorOrThisOfType(wellPath);
if (!wellPath) return;
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
double wellPathAzimuth = wellPathGeometry->wellPathAzimuthAngle(fracturePosition());
if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
azimuth = wellPathAzimuth;
@@ -122,6 +115,23 @@ void RimWellPathFracture::updateAzimuthFromFractureDefinition()
// }
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimWellPathFracture::wellAzimuthAtFracturePosition()
{
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(this);
if (!objHandle) return cvf::UNDEFINED_DOUBLE;
RimWellPath* wellPath = nullptr;
objHandle->firstAncestorOrThisOfType(wellPath);
if (!wellPath) return cvf::UNDEFINED_DOUBLE;
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
double wellPathAzimuth = wellPathGeometry->wellPathAzimuthAngle(fracturePosition());
return wellPathAzimuth;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------