mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3353 Improve error messages from arc based geometry calculators.
Color dogleg text red if the constaint is not satisfied
This commit is contained in:
@@ -157,10 +157,11 @@ double RimWellPathTarget::radius1() const
|
||||
// Needs to be aware of unit to select correct DLS conversion
|
||||
// Degrees pr 100 ft
|
||||
// Degrees pr 10m
|
||||
// Degrees pr 30m
|
||||
|
||||
// Degrees pr 30m
|
||||
return 30.0/cvf::Math::toRadians(m_dogleg1);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -169,11 +170,50 @@ double RimWellPathTarget::radius2() const
|
||||
// Needs to be aware of unit to select correct DLS conversion
|
||||
// Degrees pr 100 ft
|
||||
// Degrees pr 10m
|
||||
// Degrees pr 30m
|
||||
|
||||
// Degrees pr 30m
|
||||
return 30.0/cvf::Math::toRadians(m_dogleg2);
|
||||
}
|
||||
|
||||
double doglegFromRadius(double radius)
|
||||
{
|
||||
return cvf::Math::toDegrees(30.0/radius);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTarget::flagRadius1AsIncorrect(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)));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dogleg1.uiCapability()->setUiContentTextColor(QColor());
|
||||
m_dogleg1.uiCapability()->setUiToolTip("");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathTarget::flagRadius2AsIncorrect(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)));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dogleg2.uiCapability()->setUiContentTextColor(QColor());
|
||||
m_dogleg2.uiCapability()->setUiToolTip("");
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user