#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

@ -81,8 +81,8 @@ void RimSimWellFracture::updateAzimuthFromFractureDefinition()
if (orientation == RimFractureTemplate::ALONG_WELL_PATH || orientation== RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
updateBranchGeometry();
double simWellAzimuth = m_branchCenterLines[m_branchIndex].simWellAzimuthAngle(fracturePosition());
double simWellAzimuth = wellAzimuthAtFracturePosition();
if (orientation == RimFractureTemplate::TRANSVERSE_WELL_PATH )
{
azimuth = simWellAzimuth;
@ -100,6 +100,16 @@ void RimSimWellFracture::updateAzimuthFromFractureDefinition()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimSimWellFracture::wellAzimuthAtFracturePosition()
{
updateBranchGeometry();
double simWellAzimuth = m_branchCenterLines[m_branchIndex].simWellAzimuthAngle(fracturePosition());
return simWellAzimuth;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -44,6 +44,8 @@ public:
void updateFracturePositionFromLocation();
void updateAzimuthFromFractureDefinition() override;
double wellAzimuthAtFracturePosition() override;
protected:
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;

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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -43,6 +43,8 @@ public:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
virtual void updateAzimuthFromFractureDefinition() override;
double wellAzimuthAtFracturePosition() override;
protected:
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;