mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve well path target configuration (#8570)
Improve the scripting possibilities for well targets Added tests and examples
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user