mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Making them correct. Doglegs with an actual value less than the user provided value are colored green. Removed the text stating that the constraint is not met.
This commit is contained in:
parent
effa3025e1
commit
f6675b7c45
@ -46,8 +46,10 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
|||||||
{!activeWellPathTargets[0].isTangentConstrained,
|
{!activeWellPathTargets[0].isTangentConstrained,
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
|
false,
|
||||||
true,
|
true,
|
||||||
std::numeric_limits<double>::infinity(),
|
std::numeric_limits<double>::infinity(),
|
||||||
|
false,
|
||||||
true,
|
true,
|
||||||
std::numeric_limits<double>::infinity()} );
|
std::numeric_limits<double>::infinity()} );
|
||||||
}
|
}
|
||||||
@ -60,8 +62,10 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
|||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
std::numeric_limits<double>::infinity(),
|
std::numeric_limits<double>::infinity(),
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
std::numeric_limits<double>::infinity()} );
|
std::numeric_limits<double>::infinity()} );
|
||||||
|
|
||||||
std::vector<WellTarget> adjustedWellPathTargets = activeWellPathTargets;
|
std::vector<WellTarget> adjustedWellPathTargets = activeWellPathTargets;
|
||||||
@ -130,6 +134,8 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
|||||||
target1Status.hasDerivedTangent = true;
|
target1Status.hasDerivedTangent = true;
|
||||||
target1Status.resultAzimuth = jCurve.endAzimuth() + M_PI;
|
target1Status.resultAzimuth = jCurve.endAzimuth() + M_PI;
|
||||||
target1Status.resultInclination = M_PI - jCurve.endInclination();
|
target1Status.resultInclination = M_PI - jCurve.endInclination();
|
||||||
|
|
||||||
|
target2Status.isRadius1Editable = true;
|
||||||
}
|
}
|
||||||
else // The complete wellpath is a straight line from target 1 to 2
|
else // The complete wellpath is a straight line from target 1 to 2
|
||||||
{
|
{
|
||||||
@ -210,6 +216,9 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
|||||||
m_lineArcEndpoints.push_back( sCurveCalc.firstArcEndpoint() + referencePointXyz );
|
m_lineArcEndpoints.push_back( sCurveCalc.firstArcEndpoint() + referencePointXyz );
|
||||||
m_lineArcEndpoints.push_back( sCurveCalc.secondArcStartpoint() + referencePointXyz );
|
m_lineArcEndpoints.push_back( sCurveCalc.secondArcStartpoint() + referencePointXyz );
|
||||||
m_lineArcEndpoints.push_back( target2.targetPointXYZ + referencePointXyz );
|
m_lineArcEndpoints.push_back( target2.targetPointXYZ + referencePointXyz );
|
||||||
|
|
||||||
|
target1Status.isRadius2Editable = true;
|
||||||
|
target2Status.isRadius1Editable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,6 +253,8 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
|||||||
|
|
||||||
m_lineArcEndpoints.push_back( target2.targetPointXYZ + referencePointXyz );
|
m_lineArcEndpoints.push_back( target2.targetPointXYZ + referencePointXyz );
|
||||||
|
|
||||||
|
target1Status.isRadius2Editable = true;
|
||||||
|
|
||||||
target2Status.hasDerivedTangent = true;
|
target2Status.hasDerivedTangent = true;
|
||||||
target2Status.resultAzimuth = jCurve.endAzimuth();
|
target2Status.resultAzimuth = jCurve.endAzimuth();
|
||||||
target2Status.resultInclination = jCurve.endInclination();
|
target2Status.resultInclination = jCurve.endInclination();
|
||||||
|
@ -45,8 +45,11 @@ public:
|
|||||||
double resultAzimuth;
|
double resultAzimuth;
|
||||||
double resultInclination;
|
double resultInclination;
|
||||||
|
|
||||||
|
bool isRadius1Editable;
|
||||||
bool hasOverriddenRadius1;
|
bool hasOverriddenRadius1;
|
||||||
double resultRadius1;
|
double resultRadius1;
|
||||||
|
|
||||||
|
bool isRadius2Editable;
|
||||||
bool hasOverriddenRadius2;
|
bool hasOverriddenRadius2;
|
||||||
double resultRadius2;
|
double resultRadius2;
|
||||||
};
|
};
|
||||||
|
@ -159,6 +159,7 @@ cvf::ref<RigWellPath> RimWellPathGeometryDef::createWellPathGeometry()
|
|||||||
|
|
||||||
RiaPolyArcLineSampler arcLineSampler( wellPathCalculator.startTangent(), wellPathCalculator.lineArcEndpoints() );
|
RiaPolyArcLineSampler arcLineSampler( wellPathCalculator.startTangent(), wellPathCalculator.lineArcEndpoints() );
|
||||||
|
|
||||||
|
|
||||||
arcLineSampler.sampledPointsAndMDs( 30,
|
arcLineSampler.sampledPointsAndMDs( 30,
|
||||||
false,
|
false,
|
||||||
&( wellPathGeometry->m_wellPathPoints ),
|
&( wellPathGeometry->m_wellPathPoints ),
|
||||||
@ -562,8 +563,8 @@ RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator()
|
|||||||
|
|
||||||
for ( size_t tIdx = 0; tIdx < wellTargets.size(); ++tIdx )
|
for ( size_t tIdx = 0; tIdx < wellTargets.size(); ++tIdx )
|
||||||
{
|
{
|
||||||
wellTargets[tIdx]->flagRadius1AsIncorrect( false, 0 );
|
wellTargets[tIdx]->flagRadius1AsIncorrect(targetStatuses[tIdx].isRadius1Editable, false, 0 );
|
||||||
wellTargets[tIdx]->flagRadius2AsIncorrect( false, 0 );
|
wellTargets[tIdx]->flagRadius2AsIncorrect(targetStatuses[tIdx].isRadius2Editable, false, 0 );
|
||||||
|
|
||||||
if ( targetStatuses[tIdx].hasDerivedTangent )
|
if ( targetStatuses[tIdx].hasDerivedTangent )
|
||||||
{
|
{
|
||||||
@ -573,12 +574,12 @@ RiaLineArcWellPathCalculator RimWellPathGeometryDef::lineArcWellPathCalculator()
|
|||||||
|
|
||||||
if ( targetStatuses[tIdx].hasOverriddenRadius1 )
|
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 )
|
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 )
|
if ( isIncorrect )
|
||||||
{
|
{
|
||||||
m_dogleg1.uiCapability()->setUiContentTextColor( Qt::red );
|
if ( actualRadius < radius1() )
|
||||||
m_dogleg1.uiCapability()->setUiToolTip( "The dogleg constraint is not satisfied! Actual Dogleg: " +
|
{
|
||||||
QString::number( doglegFromRadius( actualRadius ) ) );
|
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
|
else
|
||||||
{
|
{
|
||||||
m_dogleg1.uiCapability()->setUiContentTextColor( QColor() );
|
m_dogleg1.uiCapability()->setUiContentTextColor( QColor() );
|
||||||
m_dogleg1.uiCapability()->setUiToolTip( "" );
|
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 )
|
if ( isIncorrect )
|
||||||
{
|
{
|
||||||
m_dogleg2.uiCapability()->setUiContentTextColor( Qt::red );
|
if ( actualRadius < radius2() )
|
||||||
m_dogleg2.uiCapability()->setUiToolTip( "The dogleg constraint is not satisfied! Actual Dogleg: " +
|
{
|
||||||
QString::number( doglegFromRadius( actualRadius ) ) );
|
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
|
else
|
||||||
{
|
{
|
||||||
m_dogleg2.uiCapability()->setUiContentTextColor( QColor() );
|
m_dogleg2.uiCapability()->setUiContentTextColor( QColor() );
|
||||||
m_dogleg2.uiCapability()->setUiToolTip( "" );
|
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_hasTangentConstraintUiField.uiCapability()->setUiReadOnly( false );
|
||||||
m_targetType.uiCapability()->setUiReadOnly( false );
|
m_targetType.uiCapability()->setUiReadOnly( false );
|
||||||
m_targetPoint.uiCapability()->setUiReadOnly( false );
|
m_targetPoint.uiCapability()->setUiReadOnly( false );
|
||||||
m_dogleg2.uiCapability()->setUiReadOnly( false );
|
// m_dogleg2.uiCapability()->setUiReadOnly( false );
|
||||||
|
|
||||||
if ( m_targetType == POINT )
|
if ( m_targetType == POINT )
|
||||||
{
|
{
|
||||||
m_azimuth.uiCapability()->setUiReadOnly( true );
|
m_azimuth.uiCapability()->setUiReadOnly( true );
|
||||||
m_inclination.uiCapability()->setUiReadOnly( true );
|
m_inclination.uiCapability()->setUiReadOnly( true );
|
||||||
m_dogleg1.uiCapability()->setUiReadOnly( true );
|
// m_dogleg1.uiCapability()->setUiReadOnly( true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_azimuth.uiCapability()->setUiReadOnly( false );
|
m_azimuth.uiCapability()->setUiReadOnly( false );
|
||||||
m_inclination.uiCapability()->setUiReadOnly( false );
|
m_inclination.uiCapability()->setUiReadOnly( false );
|
||||||
m_dogleg1.uiCapability()->setUiReadOnly( false );
|
// m_dogleg1.uiCapability()->setUiReadOnly( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
RimWellPathGeometryDef* geomDef = nullptr;
|
RimWellPathGeometryDef* geomDef = nullptr;
|
||||||
firstAncestorOrThisOfTypeAsserted( geomDef );
|
firstAncestorOrThisOfTypeAsserted( geomDef );
|
||||||
|
|
||||||
if ( this == geomDef->firstActiveTarget() )
|
// if ( this == geomDef->firstActiveTarget() )
|
||||||
{
|
//{
|
||||||
m_dogleg1.uiCapability()->setUiReadOnly( true );
|
// m_dogleg1.uiCapability()->setUiReadOnly( true );
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
if ( this == geomDef->lastActiveTarget() )
|
// if ( this == geomDef->lastActiveTarget() )
|
||||||
{
|
//{
|
||||||
m_dogleg2.uiCapability()->setUiReadOnly( true );
|
// m_dogleg2.uiCapability()->setUiReadOnly( true );
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -53,8 +53,8 @@ public:
|
|||||||
cvf::Vec3d tangent() const;
|
cvf::Vec3d tangent() const;
|
||||||
double radius1() const;
|
double radius1() const;
|
||||||
double radius2() const;
|
double radius2() const;
|
||||||
void flagRadius1AsIncorrect( bool isIncorrect, double actualRadius );
|
void flagRadius1AsIncorrect( bool isEditable, bool isIncorrect, double actualRadius );
|
||||||
void flagRadius2AsIncorrect( bool isIncorrect, double actualRadius );
|
void flagRadius2AsIncorrect( bool isEditable, bool isIncorrect, double actualRadius );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
|
Loading…
Reference in New Issue
Block a user