mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5046 from OPM/bugfixes-wellpath-modelling
Bugfixes wellpath modeling
This commit is contained in:
@@ -159,6 +159,7 @@ cvf::ref<RigWellPath> RimWellPathGeometryDef::createWellPathGeometry()
|
||||
|
||||
RiaPolyArcLineSampler arcLineSampler( wellPathCalculator.startTangent(), wellPathCalculator.lineArcEndpoints() );
|
||||
|
||||
|
||||
arcLineSampler.sampledPointsAndMDs( 30,
|
||||
false,
|
||||
&( wellPathGeometry->m_wellPathPoints ),
|
||||
@@ -562,8 +563,8 @@ RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator()
|
||||
|
||||
for ( size_t tIdx = 0; tIdx < wellTargets.size(); ++tIdx )
|
||||
{
|
||||
wellTargets[tIdx]->flagRadius1AsIncorrect( false, 0 );
|
||||
wellTargets[tIdx]->flagRadius2AsIncorrect( false, 0 );
|
||||
wellTargets[tIdx]->flagRadius1AsIncorrect(targetStatuses[tIdx].isRadius1Editable, false, 0 );
|
||||
wellTargets[tIdx]->flagRadius2AsIncorrect(targetStatuses[tIdx].isRadius2Editable, false, 0 );
|
||||
|
||||
if ( targetStatuses[tIdx].hasDerivedTangent )
|
||||
{
|
||||
@@ -573,12 +574,12 @@ RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator()
|
||||
|
||||
if ( targetStatuses[tIdx].hasOverriddenRadius1 )
|
||||
{
|
||||
wellTargets[tIdx]->flagRadius1AsIncorrect( true, targetStatuses[tIdx].resultRadius1 );
|
||||
wellTargets[tIdx]->flagRadius1AsIncorrect( targetStatuses[tIdx].isRadius1Editable, true, targetStatuses[tIdx].resultRadius1 );
|
||||
}
|
||||
|
||||
if ( targetStatuses[tIdx].hasOverriddenRadius2 )
|
||||
{
|
||||
wellTargets[tIdx]->flagRadius2AsIncorrect( true, targetStatuses[tIdx].resultRadius2 );
|
||||
wellTargets[tIdx]->flagRadius2AsIncorrect( targetStatuses[tIdx].isRadius2Editable, true, targetStatuses[tIdx].resultRadius2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -201,37 +201,61 @@ double doglegFromRadius( double radius )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTarget::flagRadius1AsIncorrect( bool isIncorrect, double actualRadius )
|
||||
void RimWellPathTarget::flagRadius1AsIncorrect( bool isEditable, bool isIncorrect, double actualRadius )
|
||||
{
|
||||
if ( isIncorrect )
|
||||
{
|
||||
m_dogleg1.uiCapability()->setUiContentTextColor( Qt::red );
|
||||
m_dogleg1.uiCapability()->setUiToolTip( "The dogleg constraint is not satisfied! Actual Dogleg: " +
|
||||
QString::number( doglegFromRadius( actualRadius ) ) );
|
||||
if ( actualRadius < radius1() )
|
||||
{
|
||||
m_dogleg1.uiCapability()->setUiContentTextColor( Qt::red );
|
||||
m_dogleg1.uiCapability()->setUiToolTip(
|
||||
"Actual Dogleg: " + QString::number( doglegFromRadius( actualRadius ) ) +
|
||||
"\nThe dogleg constraint is not satisfied!" );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dogleg1.uiCapability()->setUiContentTextColor( Qt::darkGreen );
|
||||
m_dogleg1.uiCapability()->setUiToolTip( "Actual Dogleg: " +
|
||||
QString::number( doglegFromRadius( actualRadius ) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dogleg1.uiCapability()->setUiContentTextColor( QColor() );
|
||||
m_dogleg1.uiCapability()->setUiToolTip( "" );
|
||||
}
|
||||
|
||||
m_dogleg1.uiCapability()->setUiReadOnly( !isEditable );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTarget::flagRadius2AsIncorrect( bool isIncorrect, double actualRadius )
|
||||
void RimWellPathTarget::flagRadius2AsIncorrect( bool isEditable, bool isIncorrect, double actualRadius )
|
||||
{
|
||||
if ( isIncorrect )
|
||||
{
|
||||
m_dogleg2.uiCapability()->setUiContentTextColor( Qt::red );
|
||||
m_dogleg2.uiCapability()->setUiToolTip( "The dogleg constraint is not satisfied! Actual Dogleg: " +
|
||||
QString::number( doglegFromRadius( actualRadius ) ) );
|
||||
if ( actualRadius < radius2() )
|
||||
{
|
||||
m_dogleg2.uiCapability()->setUiContentTextColor( Qt::red );
|
||||
m_dogleg2.uiCapability()->setUiToolTip(
|
||||
"Actual Dogleg: " + QString::number( doglegFromRadius( actualRadius ) ) +
|
||||
"\nThe dogleg constraint is not satisfied!" );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dogleg2.uiCapability()->setUiContentTextColor( Qt::darkGreen );
|
||||
m_dogleg2.uiCapability()->setUiToolTip( "Actual Dogleg: " +
|
||||
QString::number( doglegFromRadius( actualRadius ) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dogleg2.uiCapability()->setUiContentTextColor( QColor() );
|
||||
m_dogleg2.uiCapability()->setUiToolTip( "" );
|
||||
}
|
||||
|
||||
m_dogleg2.uiCapability()->setUiReadOnly( !isEditable );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -296,33 +320,33 @@ void RimWellPathTarget::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderi
|
||||
m_hasTangentConstraintUiField.uiCapability()->setUiReadOnly( false );
|
||||
m_targetType.uiCapability()->setUiReadOnly( false );
|
||||
m_targetPoint.uiCapability()->setUiReadOnly( false );
|
||||
m_dogleg2.uiCapability()->setUiReadOnly( false );
|
||||
// m_dogleg2.uiCapability()->setUiReadOnly( false );
|
||||
|
||||
if ( m_targetType == POINT )
|
||||
{
|
||||
m_azimuth.uiCapability()->setUiReadOnly( true );
|
||||
m_inclination.uiCapability()->setUiReadOnly( true );
|
||||
m_dogleg1.uiCapability()->setUiReadOnly( true );
|
||||
// m_dogleg1.uiCapability()->setUiReadOnly( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_azimuth.uiCapability()->setUiReadOnly( false );
|
||||
m_inclination.uiCapability()->setUiReadOnly( false );
|
||||
m_dogleg1.uiCapability()->setUiReadOnly( false );
|
||||
// m_dogleg1.uiCapability()->setUiReadOnly( false );
|
||||
}
|
||||
|
||||
RimWellPathGeometryDef* geomDef = nullptr;
|
||||
firstAncestorOrThisOfTypeAsserted( geomDef );
|
||||
|
||||
if ( this == geomDef->firstActiveTarget() )
|
||||
{
|
||||
m_dogleg1.uiCapability()->setUiReadOnly( true );
|
||||
}
|
||||
|
||||
if ( this == geomDef->lastActiveTarget() )
|
||||
{
|
||||
m_dogleg2.uiCapability()->setUiReadOnly( true );
|
||||
}
|
||||
// if ( this == geomDef->firstActiveTarget() )
|
||||
//{
|
||||
// m_dogleg1.uiCapability()->setUiReadOnly( true );
|
||||
//}
|
||||
//
|
||||
// if ( this == geomDef->lastActiveTarget() )
|
||||
//{
|
||||
// m_dogleg2.uiCapability()->setUiReadOnly( true );
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -53,8 +53,8 @@ public:
|
||||
cvf::Vec3d tangent() const;
|
||||
double radius1() const;
|
||||
double radius2() const;
|
||||
void flagRadius1AsIncorrect( bool isIncorrect, double actualRadius );
|
||||
void flagRadius2AsIncorrect( bool isIncorrect, double actualRadius );
|
||||
void flagRadius1AsIncorrect( bool isEditable, bool isIncorrect, double actualRadius );
|
||||
void flagRadius2AsIncorrect( bool isEditable, bool isIncorrect, double actualRadius );
|
||||
|
||||
private:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
||||
Reference in New Issue
Block a user