#5497 Fix crash in 3d Well Log Curves

This commit is contained in:
Gaute Lindkvist 2020-02-10 10:06:35 +01:00
parent 2949d3458d
commit d832674691
2 changed files with 28 additions and 20 deletions

View File

@ -71,33 +71,38 @@ void Riv3dWellLogPlanePartMgr::appendPlaneToModel( cvf::ModelBasicList*
if ( m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty() ) return;
if ( isStaticResult )
std::set<Rim3dWellLogCurve::DrawPlane> drawPlanes;
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
{
std::set<Rim3dWellLogCurve::DrawPlane> drawPlanes;
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
if ( rim3dWellLogCurve->showInView( m_gridView ) )
{
if ( rim3dWellLogCurve->showInView( m_gridView ) )
{
drawPlanes.insert( rim3dWellLogCurve->drawPlane() );
}
drawPlanes.insert( rim3dWellLogCurve->drawPlane() );
}
for ( Rim3dWellLogCurve::DrawPlane drawPlane : drawPlanes )
}
for ( Rim3dWellLogCurve::DrawPlane drawPlane : drawPlanes )
{
auto it = m_3dWellLogDrawSurfaceGeometryGenerators.find( drawPlane );
if ( it == m_3dWellLogDrawSurfaceGeometryGenerators.end() )
{
m_3dWellLogDrawSurfaceGeometryGenerators[drawPlane] = new Riv3dWellLogDrawSurfaceGenerator( m_wellPath.p() );
appendDrawSurfaceToModel( model, displayCoordTransform, wellPathClipBoundingBox, drawPlane, planeWidth() );
}
}
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
{
if ( rim3dWellLogCurve->showInView( m_gridView ) &&
rim3dWellLogCurve->isShowingTimeDependentResult() != isStaticResult )
{
append3dWellLogCurveToModel( model,
displayCoordTransform,
wellPathClipBoundingBox,
rim3dWellLogCurve,
m_3dWellLogDrawSurfaceGeometryGenerators[rim3dWellLogCurve->drawPlane()]
->vertices() );
auto it = m_3dWellLogDrawSurfaceGeometryGenerators.find( rim3dWellLogCurve->drawPlane() );
if ( it != m_3dWellLogDrawSurfaceGeometryGenerators.end() )
{
append3dWellLogCurveToModel( model,
displayCoordTransform,
wellPathClipBoundingBox,
rim3dWellLogCurve,
it->second->vertices() );
}
}
}
}

View File

@ -874,14 +874,17 @@ void RivWellPathPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicList*
// Well measurements visibility is independent of well path visibility
appendWellMeasurementsToModel( model, displayCoordTransform, characteristicCellSize );
RimGridView* gridView = dynamic_cast<RimGridView*>( m_rimView.p() );
if ( !gridView ) return;
if ( m_3dWellLogPlanePartMgr.isNull() )
if ( showWellPath )
{
m_3dWellLogPlanePartMgr = new Riv3dWellLogPlanePartMgr( m_rimWellPath, gridView );
RimGridView* gridView = dynamic_cast<RimGridView*>( m_rimView.p() );
if ( !gridView ) return;
if ( m_3dWellLogPlanePartMgr.isNull() )
{
m_3dWellLogPlanePartMgr = new Riv3dWellLogPlanePartMgr( m_rimWellPath, gridView );
}
m_3dWellLogPlanePartMgr->appendPlaneToModel( model, displayCoordTransform, wellPathClipBoundingBox, false );
}
m_3dWellLogPlanePartMgr->appendPlaneToModel( model, displayCoordTransform, wellPathClipBoundingBox, false );
}
//--------------------------------------------------------------------------------------------------