Improve well path target configuration (#8570)

Improve the scripting possibilities for well targets
Added tests and examples
This commit is contained in:
Magne Sjaastad
2022-02-19 13:18:49 +01:00
committed by GitHub
parent 0b5bc2ba68
commit 5c72d31cc9
10 changed files with 326 additions and 263 deletions

View File

@@ -40,6 +40,11 @@ RimcRimWellPathGeometryDef_appendNewWellTarget::RimcRimWellPathGeometryDef_appen
CAF_PDM_InitObject( "Create and Add New Well Target", "", "", "Create and Add New Well Target" );
CAF_PDM_InitScriptableFieldNoDefault( &m_coordinate, "Coordinate", "", "", "", "Coordinate" );
CAF_PDM_InitScriptableField( &m_isAbsolute, "Absolute", false, "", "", "", "Relative or Absolute Coordinate" );
CAF_PDM_InitScriptableField( &m_useFixedAzimuth, "UseFixedAzimuth", false, "" );
CAF_PDM_InitScriptableField( &m_useFixedInclination, "UseFixedInclination", false, "" );
CAF_PDM_InitScriptableField( &m_fixedAzimuthValue, "FixedAzimuthValue", 0.0, "", "", "", "[Degrees]" );
CAF_PDM_InitScriptableField( &m_fixedInclinationValue, "FixedInclinationValue", 0.0, "", "", "", "[Degrees]" );
}
//--------------------------------------------------------------------------------------------------
@@ -60,6 +65,17 @@ caf::PdmObjectHandle* RimcRimWellPathGeometryDef_appendNewWellTarget::execute()
auto newTarget = new RimWellPathTarget;
newTarget->setAsPointTargetXYD(
cvf::Vec3d( relativeTargetPoint.x(), relativeTargetPoint.y(), -relativeTargetPoint.z() ) );
if ( m_useFixedAzimuth )
{
newTarget->setFixedAzimuth( m_fixedAzimuthValue );
}
if ( m_useFixedInclination )
{
newTarget->setFixedInclination( m_fixedInclinationValue );
}
geoDef->insertTarget( nullptr, newTarget );
geoDef->updateConnectedEditors();

View File

@@ -43,4 +43,9 @@ public:
private:
caf::PdmField<cvf::Vec3d> m_coordinate;
caf::PdmField<bool> m_isAbsolute;
caf::PdmField<bool> m_useFixedAzimuth;
caf::PdmField<double> m_fixedAzimuthValue;
caf::PdmField<bool> m_useFixedInclination;
caf::PdmField<double> m_fixedInclinationValue;
};