#8195 Fracture: Show containment also when mesh is off.

This commit is contained in:
Kristian Bendiksen 2022-05-25 09:37:34 +02:00 committed by Magne Sjaastad
parent 29fdc29eb0
commit a47edd4fa6
2 changed files with 35 additions and 2 deletions

View File

@ -99,6 +99,8 @@ void RivWellFracturePartMgr::appendGeometryPartsToModel( cvf::ModelBasicList* mo
if ( stimPlanFracTemplate ) if ( stimPlanFracTemplate )
{ {
createVisibleFracturePolygons( stimPlanFracTemplate, eclView );
if ( eclView.fractureColors()->stimPlanResultColorType() == RimStimPlanColors::SINGLE_ELEMENT_COLOR ) if ( eclView.fractureColors()->stimPlanResultColorType() == RimStimPlanColors::SINGLE_ELEMENT_COLOR )
{ {
auto part = createStimPlanElementColorSurfacePart( eclView ); auto part = createStimPlanElementColorSurfacePart( eclView );
@ -1025,6 +1027,36 @@ cvf::ref<cvf::Part> RivWellFracturePartMgr::createStimPlanMeshPart( const RimEcl
return nullptr; return nullptr;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivWellFracturePartMgr::createVisibleFracturePolygons( RimStimPlanFractureTemplate* stimPlanFracTemplate,
const RimEclipseView& activeView )
{
if ( !m_rimFracture->fractureGrid() ) return;
std::vector<RigFractureCell> stimPlanCells = m_rimFracture->fractureGrid()->fractureCells();
QString resultNameFromColors = activeView.fractureColors()->uiResultName();
QString resultUnitFromColors = activeView.fractureColors()->unit();
std::vector<double> prCellResults =
stimPlanFracTemplate->fractureGridResults( resultNameFromColors,
resultUnitFromColors,
stimPlanFracTemplate->activeTimeStepIndex() );
m_visibleFracturePolygons.clear();
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
{
if ( prCellResults[cIdx] > 1e-7 )
{
const RigFractureCell& stimPlanCell = stimPlanCells[cIdx];
std::vector<cvf::Vec3d> stimPlanCellPolygon = stimPlanCell.getPolygon();
m_visibleFracturePolygons.push_back( stimPlanCellPolygon );
}
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1048,7 +1080,6 @@ cvf::ref<cvf::DrawableGeo>
resultUnitFromColors, resultUnitFromColors,
stimPlanFracTemplate->activeTimeStepIndex() ); stimPlanFracTemplate->activeTimeStepIndex() );
m_visibleFracturePolygons.clear();
for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx ) for ( size_t cIdx = 0; cIdx < stimPlanCells.size(); ++cIdx )
{ {
if ( prCellResults[cIdx] > 1e-7 ) if ( prCellResults[cIdx] > 1e-7 )
@ -1059,7 +1090,6 @@ cvf::ref<cvf::DrawableGeo>
{ {
stimPlanMeshVertices.push_back( static_cast<cvf::Vec3f>( cellCorner ) ); stimPlanMeshVertices.push_back( static_cast<cvf::Vec3f>( cellCorner ) );
} }
m_visibleFracturePolygons.push_back( stimPlanCellPolygon );
} }
} }

View File

@ -82,6 +82,9 @@ private:
cvf::ref<cvf::DrawableGeo> createStimPlanMeshDrawable( RimStimPlanFractureTemplate* stimPlanFracTemplate, cvf::ref<cvf::DrawableGeo> createStimPlanMeshDrawable( RimStimPlanFractureTemplate* stimPlanFracTemplate,
const RimEclipseView& activeView ); const RimEclipseView& activeView );
void createVisibleFracturePolygons( RimStimPlanFractureTemplate* stimPlanFracTemplate,
const RimEclipseView& activeView );
std::vector<cvf::Vec3d> fractureBorderPolygon(); std::vector<cvf::Vec3d> fractureBorderPolygon();
static cvf::ref<cvf::Part> createScalarMapperPart( cvf::DrawableGeo* drawableGeo, static cvf::ref<cvf::Part> createScalarMapperPart( cvf::DrawableGeo* drawableGeo,