mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1040 - pre-proto - Updating position of well path fractures when md is changed, and calculaing correct position when creating new well path fracture from project view
This commit is contained in:
@@ -35,6 +35,7 @@ RimFracture::RimFracture(void)
|
||||
CAF_PDM_InitObject("Fracture", "", "", "");
|
||||
|
||||
m_rigFracture = new RigFracture;
|
||||
m_recomputeGeometry = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -87,7 +88,25 @@ void RimFracture::computeGeometry()
|
||||
nodeCoords[i] = nodeCoords[i] + static_cast<cvf::Vec3f>(center);
|
||||
}
|
||||
|
||||
m_rigFracture->setGeometry(polygonIndices, nodeCoords);
|
||||
m_rigFracture->setGeometry(polygonIndices, nodeCoords);
|
||||
|
||||
m_recomputeGeometry = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFracture::setRecomputeGeometryFlag()
|
||||
{
|
||||
m_recomputeGeometry = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFracture::isRecomputeGeometryFlagSet()
|
||||
{
|
||||
return m_recomputeGeometry;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -95,6 +114,8 @@ void RimFracture::computeGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFracture::hasValidGeometry() const
|
||||
{
|
||||
if (m_recomputeGeometry) return false;
|
||||
|
||||
return (nodeCoords().size() > 0 && polygonIndices().size() > 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user